All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kurt Borja" <kuurtb@gmail.com>
To: "Derek J. Clark" <derekjohn.clark@gmail.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Armin Wolf" <W_Armin@gmx.de>, "Jonathan Corbet" <corbet@lwn.net>,
	"Mario Limonciello" <superm1@kernel.org>,
	"Luke Jones" <luke@ljones.dev>, "Xino Ni" <nijs1@lenovo.com>,
	"Zhixin Zhang" <zhangzx36@lenovo.com>,
	"Mia Shao" <shaohz1@lenovo.com>,
	"Mark Pearson" <mpearson-lenovo@squebb.ca>,
	"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>,
	"Cody T . -H . Chiu" <codyit@gmail.com>,
	"John Martens" <johnfanv2@gmail.com>,
	<platform-driver-x86@vger.kernel.org>,
	<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v8 5/6] platform/x86: Add Lenovo Gamezone WMI Driver
Date: Tue, 06 May 2025 11:03:23 -0300	[thread overview]
Message-ID: <D9P4TWUVLG8M.1A075SO65RWON@gmail.com> (raw)
In-Reply-To: <20250505010659.1450984-6-derekjohn.clark@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

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@gmx.de>
> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2025-05-06 14:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05  1:06 [PATCH v8 0/6] platform/x86: Add Lenovo WMI Gaming Series Drivers Derek J. Clark
2025-05-05  1:06 ` [PATCH v8 1/6] platform/x86: Add lenovo-wmi-* driver Documentation Derek J. Clark
2025-05-06 10:49   ` ALOK TIWARI
2025-05-06 12:12     ` Armin Wolf
2025-05-06 12:43       ` ALOK TIWARI
2025-05-05  1:06 ` [PATCH v8 2/6] platform/x86: Add lenovo-wmi-helpers Derek J. Clark
2025-05-06 11:22   ` ALOK TIWARI
2025-05-05  1:06 ` [PATCH v8 3/6] platform/x86: Add Lenovo WMI Events Driver Derek J. Clark
2025-05-06 11:39   ` ALOK TIWARI
2025-05-05  1:06 ` [PATCH v8 4/6] platform/x86: Add Lenovo Capability Data 01 WMI Driver Derek J. Clark
2025-05-05  1:32   ` Armin Wolf
2025-05-05  3:41     ` Derek J. Clark
2025-05-05  1:06 ` [PATCH v8 5/6] platform/x86: Add Lenovo Gamezone " Derek J. Clark
2025-05-06 12:40   ` ALOK TIWARI
2025-05-06 14:03   ` Kurt Borja [this message]
2025-05-05  1:06 ` [PATCH v8 6/6] platform/x86: Add Lenovo Other Mode " Derek J. Clark
2025-05-06 14:07   ` Kurt Borja
2025-05-08 21:53   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D9P4TWUVLG8M.1A075SO65RWON@gmail.com \
    --to=kuurtb@gmail.com \
    --cc=W_Armin@gmx.de \
    --cc=codyit@gmail.com \
    --cc=corbet@lwn.net \
    --cc=derekjohn.clark@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=johnfanv2@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=nijs1@lenovo.com \
    --cc=pgriffais@valvesoftware.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=shaohz1@lenovo.com \
    --cc=superm1@kernel.org \
    --cc=zhangzx36@lenovo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.