lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a488f1e9-11f2-d6ca-49a6-91eac3c3a053@linux.intel.com>
Date: Wed, 12 Nov 2025 14:32:22 +0200 (EET)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Denis Benato <denis.benato@...ux.dev>
cc: LKML <linux-kernel@...r.kernel.org>, platform-driver-x86@...r.kernel.org, 
    Hans de Goede <hansg@...nel.org>, 
    "Limonciello, Mario" <mario.limonciello@....com>, 
    "Luke D . Jones" <luke@...nes.dev>, Alok Tiwari <alok.a.tiwari@...cle.com>, 
    Derek John Clark <derekjohn.clark@...il.com>, 
    Mateusz Schyboll <dragonn@...pl>, porfet828@...il.com, 
    Denis Benato <benato.denis96@...il.com>
Subject: Re: [PATCH 1/2] platform/x86: asus-armoury: remove unused macro
 parameter

On Tue, 11 Nov 2025, Denis Benato wrote:

> Increase consistency of macros used to get/set uint attributes: remove the unused _fmt macro parameter.
> 
> Signed-off-by: Denis Benato <denis.benato@...ux.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);		\
> 

I've folded these into the the original commits (to the 2nd & 9th change).

-- 
 i.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ