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: <D9P4TWUVLG8M.1A075SO65RWON@gmail.com>
Date: Tue, 06 May 2025 11:03:23 -0300
From: "Kurt Borja" <kuurtb@...il.com>
To: "Derek J. Clark" <derekjohn.clark@...il.com>, "Hans de Goede"
 <hdegoede@...hat.com>, Ilpo Järvinen
 <ilpo.jarvinen@...ux.intel.com>
Cc: "Armin Wolf" <W_Armin@....de>, "Jonathan Corbet" <corbet@....net>,
 "Mario Limonciello" <superm1@...nel.org>, "Luke Jones" <luke@...nes.dev>,
 "Xino Ni" <nijs1@...ovo.com>, "Zhixin Zhang" <zhangzx36@...ovo.com>, "Mia
 Shao" <shaohz1@...ovo.com>, "Mark Pearson" <mpearson-lenovo@...ebb.ca>,
 "Pierre-Loup A . Griffais" <pgriffais@...vesoftware.com>, "Cody T . -H .
 Chiu" <codyit@...il.com>, "John Martens" <johnfanv2@...il.com>,
 <platform-driver-x86@...r.kernel.org>, <linux-doc@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 5/6] platform/x86: Add Lenovo Gamezone WMI Driver

Hi Derek,

Sparse throws a couple of warnings when compiling with C=1:

On Sun May 4, 2025 at 10:06 PM -03, Derek J. Clark wrote:
> Adds lenovo-wmi-gamezone driver which provides the Lenovo Gamezone WMI
> interface that comes on Lenovo "Gaming Series" hardware. Provides ACPI
> platform profiles over WMI.
>
> Reviewed-by: Armin Wolf <W_Armin@....de>
> Signed-off-by: Derek J. Clark <derekjohn.clark@...il.com>
...
> +/**
> + * lwmi_gz_thermal_mode_supported() - Get the version of the WMI
> + * interface to determine the support level.
> + * @wdev: The Gamezone WMI device.
> + * @supported: Pointer to return the support level with.
> + *
> + * Return: 0 on success, or an error code.
> + */
> +static int lwmi_gz_thermal_mode_supported(struct wmi_device *wdev,
> +					  int *supported)
> +{
> +	return lwmi_dev_evaluate_int(wdev, 0x0, LWMI_GZ_METHOD_ID_SMARTFAN_SUP,
> +				     0, 0, supported);

The 4th parameter of this function takes a pointer. NULL should be
passed instead of `0`.

> +}
> +
> +/**
> + * lwmi_gz_thermal_mode_get() - Get the current thermal mode.
> + * @wdev: The Gamezone interface WMI device.
> + * @mode: Pointer to return the thermal mode with.
> + *
> + * Return: 0 on success, or an error code.
> + */
> +static int lwmi_gz_thermal_mode_get(struct wmi_device *wdev,
> +				    enum thermal_mode *mode)
> +{
> +	return lwmi_dev_evaluate_int(wdev, 0x0, LWMI_GZ_METHOD_ID_SMARTFAN_GET,
> +				     0, 0, mode);

Same here.

-- 
 ~ Kurt

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ