[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61a272a5-3c6f-4e69-2ce9-b7c58b427750@lwfinger.net>
Date: Sat, 5 Jan 2019 10:02:23 -0600
From: Larry Finger <Larry.Finger@...inger.net>
To: Július Milan <jmilan.dev@...il.com>,
linux-kernel@...r.kernel.org
Cc: devel@...verdev.osuosl.org, linux-wireless@...r.kernel.org,
gregkh@...uxfoundation.org, ajay.kathat@...rochip.com,
adham.abozaeid@...rochip.com
Subject: Re: [PATCH v2] staging: wilc1000: fix cast to restricted __le32
On 1/5/19 3:10 AM, Július Milan wrote:
> Fixes the following sparse warnings:
>
> drivers/staging/wilc1000/host_interface.c:2360:30: warning:
> incorrect type in assignment (different base types)
> expected restricted __le32 [addressable] [assigned] [usertype] frame_type
> got restricted __le16 [usertype] <noident>
>
> Fixes: 147ccfd451024 ("staging: wilc1000: handle mgmt_frame_register ops from cfg82011 context")
> Signed-off-by: Július Milan <jmilan.dev@...il.com>
> ---
> drivers/staging/wilc1000/host_interface.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 5dae6e7155d3..07c3d6293573 100644
> --- a/struct wilc_reg_frame
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -2357,7 +2357,7 @@ void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
> default:
> break;
> }
> - reg_frame.frame_type = cpu_to_le16(frame_type);
> + reg_frame.frame_type = cpu_to_le32(frame_type);
> result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
> wilc_get_vif_idx(vif));
> if (result)
Before you send V3, are you sure this is the correct fix? As "frame_type" is
input as u16, it seems to me that the frame_type member of struct wilc_reg_frame
should be __le16, not __le32.
Larry
Powered by blists - more mailing lists