From: "Zhang, Rui" <rui.zhang@intel.com>
To: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"rjw@rjwysocki.net" <rjw@rjwysocki.net>
Cc: "srinivas.pandruvada@linux.intel.com"
<srinivas.pandruvada@linux.intel.com>,
"david.e.box@linux.intel.com" <david.e.box@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH v1 7/8] thermal: intel: intel_pch: Rename board ID symbols
Date: Tue, 31 Jan 2023 11:17:55 +0000 [thread overview]
Message-ID: <03b213dd351605d34f3d2ebc29fc3795cd2a58d2.camel@intel.com> (raw)
In-Reply-To: <2144306.Icojqenx9y@kreacher>
On Mon, 2023-01-30 at 20:04 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Use capitals in the names of the board ID symbols and add the PCH_
> prefix to each of them for consistency.
>
> Also rename the board_ids enum accordingly.
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/thermal/intel/intel_pch_thermal.c | 54 +++++++++++++++--
> -------------
> 1 file changed, 27 insertions(+), 27 deletions(-)
>
> Index: linux-pm/drivers/thermal/intel/intel_pch_thermal.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/intel/intel_pch_thermal.c
> +++ linux-pm/drivers/thermal/intel/intel_pch_thermal.c
> @@ -135,38 +135,38 @@ static struct thermal_zone_device_ops tz
> .critical = pch_critical,
> };
>
> -enum board_ids {
> - board_hsw,
> - board_wpt,
> - board_skl,
> - board_cnl,
> - board_cml,
> - board_lwb,
> - board_wbg,
> +enum pch_board_ids {
> + PCH_BOARD_HSW = 0,
> + PCH_BOARD_WPT,
> + PCH_BOARD_SKL,
> + PCH_BOARD_CNL,
> + PCH_BOARD_CML,
> + PCH_BOARD_LWB,
> + PCH_BOARD_WBG,
> };
>
> static const struct board_info {
> const char *name;
> } board_info[] = {
Now struct board_info has "name" field only, so maybe we can remove
struct board_info, and use a "static const char *" array instead?
BTW, I'm building a kernel with this patch series as well as
https://patchwork.kernel.org/project/linux-pm/list/?series=717084,
will update the test result later.
thanks,
rui
> - [board_hsw] = {
> + [PCH_BOARD_HSW] = {
> .name = "pch_haswell",
> },
> - [board_wpt] = {
> + [PCH_BOARD_WPT] = {
> .name = "pch_wildcat_point",
> },
> - [board_skl] = {
> + [PCH_BOARD_SKL] = {
> .name = "pch_skylake",
> },
> - [board_cnl] = {
> + [PCH_BOARD_CNL] = {
> .name = "pch_cannonlake",
> },
> - [board_cml] = {
> + [PCH_BOARD_CML] = {
> .name = "pch_cometlake",
> },
> - [board_lwb] = {
> + [PCH_BOARD_LWB] = {
> .name = "pch_lewisburg",
> },
> - [board_wbg] = {
> + [PCH_BOARD_WBG] = {
> .name = "pch_wellsburg",
> },
> };
> @@ -174,7 +174,7 @@ static const struct board_info {
> static int intel_pch_thermal_probe(struct pci_dev *pdev,
> const struct pci_device_id *id)
> {
> - enum board_ids board_id = id->driver_data;
> + enum pch_board_ids board_id = id->driver_data;
> const struct board_info *bi = &board_info[board_id];
> struct pch_thermal_device *ptd;
> u16 trip_temp;
> @@ -372,27 +372,27 @@ static int intel_pch_thermal_resume(stru
>
> static const struct pci_device_id intel_pch_thermal_id[] = {
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_HSW_1),
> - .driver_data = board_hsw, },
> + .driver_data = PCH_BOARD_HSW, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_HSW_2),
> - .driver_data = board_hsw, },
> + .driver_data = PCH_BOARD_HSW, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_WPT),
> - .driver_data = board_wpt, },
> + .driver_data = PCH_BOARD_WPT, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_SKL),
> - .driver_data = board_skl, },
> + .driver_data = PCH_BOARD_SKL, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_SKL_H),
> - .driver_data = board_skl, },
> + .driver_data = PCH_BOARD_SKL, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_CNL),
> - .driver_data = board_cnl, },
> + .driver_data = PCH_BOARD_CNL, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_CNL_H),
> - .driver_data = board_cnl, },
> + .driver_data = PCH_BOARD_CNL, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_CNL_LP),
> - .driver_data = board_cnl, },
> + .driver_data = PCH_BOARD_CNL, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_CML_H),
> - .driver_data = board_cml, },
> + .driver_data = PCH_BOARD_CML, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_LWB),
> - .driver_data = board_lwb, },
> + .driver_data = PCH_BOARD_LWB, },
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_WBG),
> - .driver_data = board_wbg, },
> + .driver_data = PCH_BOARD_WBG, },
> { 0, },
> };
> MODULE_DEVICE_TABLE(pci, intel_pch_thermal_id);
>
>
>
next prev parent reply other threads:[~2023-01-31 11:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 18:56 [PATCH v1 0/8] thermal: intel: intel_pch: Code simplification and cleanups Rafael J. Wysocki
2023-01-30 18:58 ` [PATCH v1 1/8] thermal: intel: intel_pch: Make pch_wpt_add_acpi_psv_trip() return int Rafael J. Wysocki
2023-01-31 13:16 ` Daniel Lezcano
2023-01-30 18:59 ` [PATCH v1 2/8] thermal: intel: intel_pch: Eliminate redundant return pointers Rafael J. Wysocki
2023-01-31 13:19 ` Daniel Lezcano
2023-01-31 14:54 ` Daniel Lezcano
2023-01-30 19:00 ` [PATCH v1 3/8] thermal: intel: intel_pch: Rename device operations callbacks Rafael J. Wysocki
2023-01-31 14:55 ` Daniel Lezcano
2023-01-30 19:02 ` [PATCH v1 4/8] thermal: intel: intel_pch: Eliminate device operations object Rafael J. Wysocki
2023-01-31 14:57 ` Daniel Lezcano
2023-01-30 19:03 ` [PATCH v1 5/8] thermal: intel: intel_pch: Fold two functions into their callers Rafael J. Wysocki
2023-01-31 15:58 ` Daniel Lezcano
2023-01-30 19:04 ` [PATCH v1 6/8] thermal: intel: intel_pch: Fold suspend and resume routines " Rafael J. Wysocki
2023-01-31 15:59 ` Daniel Lezcano
2023-01-30 19:04 ` [PATCH v1 7/8] thermal: intel: intel_pch: Rename board ID symbols Rafael J. Wysocki
2023-01-31 11:17 ` Zhang, Rui [this message]
2023-01-31 13:08 ` Rafael J. Wysocki
2023-01-31 16:00 ` Daniel Lezcano
2023-01-30 19:07 ` [PATCH v1 8/8] thermal: intel: intel_pch: Refer to thermal zone name directly Rafael J. Wysocki
2023-01-31 16:02 ` Daniel Lezcano
2023-01-31 19:20 ` Rafael J. Wysocki
2023-01-31 23:41 ` Daniel Lezcano
2023-01-30 19:13 ` [PATCH v1 0/8] thermal: intel: intel_pch: Code simplification and cleanups Rafael J. Wysocki
2023-02-01 9:30 ` Zhang, Rui
2023-02-01 9:06 ` Zhang, Rui
2023-02-01 9:08 ` Zhang, Rui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=03b213dd351605d34f3d2ebc29fc3795cd2a58d2.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=david.e.box@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox