public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] platform/x86: asus-armoury: remove unused macro parameter
@ 2025-11-11 19:11 Denis Benato
  2025-11-11 19:11 ` [PATCH 2/2] platform/x86: asus-armoury: add support for FX507VV Denis Benato
  2025-11-12 12:32 ` [PATCH 1/2] platform/x86: asus-armoury: remove unused macro parameter Ilpo Järvinen
  0 siblings, 2 replies; 3+ messages in thread
From: Denis Benato @ 2025-11-11 19:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: platform-driver-x86, Hans de Goede, Ilpo Järvinen,
	Limonciello, Mario, Luke D . Jones, Alok Tiwari, Derek John Clark,
	Mateusz Schyboll, porfet828, Denis Benato, Denis Benato

Increase consistency of macros used to get/set uint attributes: remove the unused _fmt macro parameter.

Signed-off-by: Denis Benato <denis.benato@linux.dev>
---
 drivers/platform/x86/asus-armoury.c | 4 ++--
 drivers/platform/x86/asus-armoury.h | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/asus-armoury.c b/drivers/platform/x86/asus-armoury.c
index d57fbb5dc3d3..9f67218ecd14 100644
--- a/drivers/platform/x86/asus-armoury.c
+++ b/drivers/platform/x86/asus-armoury.c
@@ -527,7 +527,7 @@ static ssize_t gpu_mux_mode_current_value_store(struct kobject *kobj,
 
 	return count;
 }
-ASUS_WMI_SHOW_INT(gpu_mux_mode_current_value, "%u\n", asus_armoury.gpu_mux_dev_id);
+ASUS_WMI_SHOW_INT(gpu_mux_mode_current_value, asus_armoury.gpu_mux_dev_id);
 ASUS_ATTR_GROUP_BOOL(gpu_mux_mode, "gpu_mux_mode", "Set the GPU display MUX mode");
 
 static ssize_t dgpu_disable_current_value_store(struct kobject *kobj,
@@ -561,7 +561,7 @@ static ssize_t dgpu_disable_current_value_store(struct kobject *kobj,
 
 	return count;
 }
-ASUS_WMI_SHOW_INT(dgpu_disable_current_value, "%d\n", ASUS_WMI_DEVID_DGPU);
+ASUS_WMI_SHOW_INT(dgpu_disable_current_value, ASUS_WMI_DEVID_DGPU);
 ASUS_ATTR_GROUP_BOOL(dgpu_disable, "dgpu_disable", "Disable the dGPU");
 
 /* Values map for eGPU activation requests. */
diff --git a/drivers/platform/x86/asus-armoury.h b/drivers/platform/x86/asus-armoury.h
index 5e1ab729277a..8f7e5da087a6 100644
--- a/drivers/platform/x86/asus-armoury.h
+++ b/drivers/platform/x86/asus-armoury.h
@@ -81,7 +81,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr
 					_max, NULL, _wmi);			\
 	}
 
-#define ASUS_WMI_SHOW_INT(_attr, _fmt, _wmi)					\
+#define ASUS_WMI_SHOW_INT(_attr, _wmi)						\
 	static ssize_t _attr##_show(struct kobject *kobj,			\
 				    struct kobj_attribute *attr, char *buf)	\
 	{									\
@@ -101,7 +101,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr
 		__ASUS_ATTR_RO(_attrname, _prop)
 
 #define __ATTR_RO_INT_GROUP_ENUM(_attrname, _wmi, _fsname, _possible, _dispname)\
-	ASUS_WMI_SHOW_INT(_attrname##_current_value, "%d\n", _wmi);		\
+	ASUS_WMI_SHOW_INT(_attrname##_current_value, _wmi);		\
 	static struct kobj_attribute attr_##_attrname##_current_value =		\
 		__ASUS_ATTR_RO(_attrname, current_value);			\
 	__ATTR_SHOW_FMT(display_name, _attrname, "%s\n", _dispname);		\
@@ -122,7 +122,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr
 #define __ATTR_RW_INT_GROUP_ENUM(_attrname, _minv, _maxv, _wmi, _fsname,\
 				 _possible, _dispname)			\
 	__WMI_STORE_INT(_attrname##_current_value, _minv, _maxv, _wmi);	\
-	ASUS_WMI_SHOW_INT(_attrname##_current_value, "%d\n", _wmi);	\
+	ASUS_WMI_SHOW_INT(_attrname##_current_value, _wmi);	\
 	static struct kobj_attribute attr_##_attrname##_current_value =	\
 		__ASUS_ATTR_RW(_attrname, current_value);		\
 	__ATTR_SHOW_FMT(display_name, _attrname, "%s\n", _dispname);	\
@@ -227,7 +227,7 @@ ssize_t armoury_attr_uint_show(struct kobject *kobj, struct kobj_attribute *attr
 	}
 
 #define ASUS_ATTR_GROUP_INT_VALUE_ONLY_RO(_attrname, _fsname, _wmi, _dispname)	\
-	ASUS_WMI_SHOW_INT(_attrname##_current_value, "%d\n", _wmi);		\
+	ASUS_WMI_SHOW_INT(_attrname##_current_value, _wmi);		\
 	static struct kobj_attribute attr_##_attrname##_current_value =		\
 		__ASUS_ATTR_RO(_attrname, current_value);			\
 	__ATTR_SHOW_FMT(display_name, _attrname, "%s\n", _dispname);		\
-- 
2.51.2


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

end of thread, other threads:[~2025-11-12 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-11 19:11 [PATCH 1/2] platform/x86: asus-armoury: remove unused macro parameter Denis Benato
2025-11-11 19:11 ` [PATCH 2/2] platform/x86: asus-armoury: add support for FX507VV Denis Benato
2025-11-12 12:32 ` [PATCH 1/2] platform/x86: asus-armoury: remove unused macro parameter 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