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] [thread-next>] [day] [month] [year] [list]
Message-ID: <678014c5-5d2d-7128-88ea-c71a71410dd3@linux.intel.com>
Date: Wed, 3 Apr 2024 11:21:02 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Luke Jones <luke@...nes.dev>
cc: Hans de Goede <hdegoede@...hat.com>, corentin.chary@...il.com, 
    platform-driver-x86@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 5/9] platform/x86: asus-wmi: store a min default for
 ppt options

On Wed, 3 Apr 2024, Luke Jones wrote:

> On Tuesday, 2 April 2024 11:49:50 PM NZDT Ilpo Järvinen wrote:
> > On Tue, 2 Apr 2024, Luke D. Jones wrote:
> > > Laptops with any of the ppt or nv tunables default to the minimum setting
> > > on boot so we can safely assume a stored value is correct.
> > > 
> > > This patch adds storing of those values in the local struct, and enables
> > > reading of those values back. To prevent creating a series of byte holes
> > > in the struct the "<name>_available" bool is removed and
> > > `asus_sysfs_is_visible()` uses the `ASUS_WMI_DEVID_<name>` directly.
> > > 
> > > Signed-off-by: Luke D. Jones <luke@...nes.dev>
> > > ---
> > > 
> > >  drivers/platform/x86/asus-wmi.c | 127 +++++++++++++++++++++++++-------
> > >  1 file changed, 99 insertions(+), 28 deletions(-)
> > > 
> > > diff --git a/drivers/platform/x86/asus-wmi.c
> > > b/drivers/platform/x86/asus-wmi.c index b795f9c1941f..c80afa385532 100644
> > > --- a/drivers/platform/x86/asus-wmi.c
> > > +++ b/drivers/platform/x86/asus-wmi.c
> > > @@ -262,13 +262,13 @@ struct asus_wmi {
> > > 
> > >  	u32 gpu_mux_dev;
> > >  	
> > >  	/* Tunables provided by ASUS for gaming laptops */
> > > 
> > > -	bool ppt_pl2_sppt_available;
> > > -	bool ppt_pl1_spl_available;
> > > -	bool ppt_apu_sppt_available;
> > > -	bool ppt_plat_sppt_available;
> > > -	bool ppt_fppt_available;
> > > -	bool nv_dyn_boost_available;
> > > -	bool nv_temp_tgt_available;
> > > +	u32 ppt_pl2_sppt;
> > > +	u32 ppt_pl1_spl;
> > > +	u32 ppt_apu_sppt;
> > > +	u32 ppt_platform_sppt;
> > > +	u32 ppt_fppt;
> > > +	u32 nv_dynamic_boost;
> > > +	u32 nv_temp_target;
> > > 
> > >  	u32 kbd_rgb_dev;
> > >  	bool kbd_rgb_state_available;
> > > 
> > > @@ -1020,11 +1020,21 @@ static ssize_t ppt_pl2_sppt_store(struct device
> > > *dev,> 
> > >  		return -EIO;
> > >  	
> > >  	}
> > > 
> > > +	asus->ppt_pl2_sppt = value;
> > > 
> > >  	sysfs_notify(&asus->platform_device->dev.kobj, NULL, 
> "ppt_pl2_sppt");
> > >  	
> > >  	return count;
> > >  
> > >  }
> > > 
> > > -static DEVICE_ATTR_WO(ppt_pl2_sppt);
> > > +
> > > +static ssize_t ppt_pl2_sppt_show(struct device *dev,
> > > +				       struct device_attribute 
> *attr,
> > > +				       char *buf)
> > > +{
> > > +	struct asus_wmi *asus = dev_get_drvdata(dev);
> > > +
> > > +	return sysfs_emit(buf, "%d\n", asus->ppt_pl2_sppt);
> > 
> > Use %u for u32 values. This applies to all sysfs_emits in this patch.
> 
> Thought checkpatch or the compiler would catch that. Done.
> 
> I've added your reviewed tag due to the simplicity of the change requested. I 
> hope this was okay.

Hi,

Please don't add Reviewed-by tags automatically in the future. Its 
meaning is not that the person has looked the patch.

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ