Re: [PATCH v11 05/15] platform/x86: lenovo-wmi-other: Fix tunable_attr_01 struct members

From: Ilpo Järvinen

Date: Fri May 08 2026 - 10:37:55 EST


On Thu, 7 May 2026, Derek J. Clark wrote:

> In struct tunable_attr_01 the capdata pointer is unused and the size of
> the id members is u32 when it should be u8. Fix these prior to adding
> additional members.
>
> No functional change intended.
>
> Reviewed-by: Mark Pearson <mpearson-lenovo@xxxxxxxxx>
> Fixes: e1a5fe662b59 ("platform/x86: Add Lenovo Capability Data 01 WMI Driver")

This too does not need fixes tag as there is no user visible bug that is
being fixed. An unused variable isn't bug even if it's a good thing to
maintain such cleanliness while coding.

--
i.

> Cc: stable@xxxxxxxxxxxxxxx
> Reviewed-by: Rong Zhang <i@xxxxxxxx>
> Tested-by: Rong Zhang <i@xxxxxxxx>
> Signed-off-by: Derek J. Clark <derekjohn.clark@xxxxxxxxx>
> ---
> drivers/platform/x86/lenovo/wmi-other.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/lenovo/wmi-other.c b/drivers/platform/x86/lenovo/wmi-other.c
> index 1e06b894cfcc..50a03f5fd6ab 100644
> --- a/drivers/platform/x86/lenovo/wmi-other.c
> +++ b/drivers/platform/x86/lenovo/wmi-other.c
> @@ -546,11 +546,10 @@ static void lwmi_om_fan_info_collect_cd_fan(struct device *dev, struct cd_list *
> /* ======== fw_attributes (component: lenovo-wmi-capdata 01) ======== */
>
> struct tunable_attr_01 {
> - struct capdata01 *capdata;
> struct device *dev;
> - u32 feature_id;
> - u32 device_id;
> - u32 type_id;
> + u8 feature_id;
> + u8 device_id;
> + u8 type_id;
> };
>
> static struct tunable_attr_01 ppt_pl1_spl = {
>