mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 1/2] platform/x86: msi-wmi-platform: Rename "data" variable
@ 2025-04-14 14:04 Armin Wolf
  2025-04-14 14:04 ` [PATCH v3 2/2] platform/x86: msi-wmi-platform: Workaround a ACPI firmware bug Armin Wolf
  2025-04-15 14:08 ` [PATCH v3 1/2] platform/x86: msi-wmi-platform: Rename "data" variable Ilpo Järvinen
  0 siblings, 2 replies; 3+ messages in thread
From: Armin Wolf @ 2025-04-14 14:04 UTC (permalink / raw)
  To: hdegoede, ilpo.jarvinen, lkml; +Cc: platform-driver-x86, linux-kernel

Rename the "data" variable inside msi_wmi_platform_read() to avoid
a name collision when the driver adds support for a state container
struct (that is to be called "data" too) in the future.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
Changes since v2:
 - none

Changes since v1:
 - added patch
---
 drivers/platform/x86/msi-wmi-platform.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/msi-wmi-platform.c b/drivers/platform/x86/msi-wmi-platform.c
index 9b5c7f8c79b0..e15681dfca8d 100644
--- a/drivers/platform/x86/msi-wmi-platform.c
+++ b/drivers/platform/x86/msi-wmi-platform.c
@@ -173,7 +173,7 @@ static int msi_wmi_platform_read(struct device *dev, enum hwmon_sensor_types typ
 	struct wmi_device *wdev = dev_get_drvdata(dev);
 	u8 input[32] = { 0 };
 	u8 output[32];
-	u16 data;
+	u16 value;
 	int ret;
 
 	ret = msi_wmi_platform_query(wdev, MSI_PLATFORM_GET_FAN, input, sizeof(input), output,
@@ -181,11 +181,11 @@ static int msi_wmi_platform_read(struct device *dev, enum hwmon_sensor_types typ
 	if (ret < 0)
 		return ret;
 
-	data = get_unaligned_be16(&output[channel * 2 + 1]);
-	if (!data)
+	value = get_unaligned_be16(&output[channel * 2 + 1]);
+	if (!value)
 		*val = 0;
 	else
-		*val = 480000 / data;
+		*val = 480000 / value;
 
 	return 0;
 }
-- 
2.39.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-15 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-14 14:04 [PATCH v3 1/2] platform/x86: msi-wmi-platform: Rename "data" variable Armin Wolf
2025-04-14 14:04 ` [PATCH v3 2/2] platform/x86: msi-wmi-platform: Workaround a ACPI firmware bug Armin Wolf
2025-04-15 14:08 ` [PATCH v3 1/2] platform/x86: msi-wmi-platform: Rename "data" variable Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®