Re: [PATCH V2] staging: rtl8192e: Fix signedness bug in rtllib_rx_assoc_resp()
From: Fabio M. De Francesco
Date: Fri Apr 15 2022 - 01:22:44 EST
On venerdì 15 aprile 2022 04:09:31 CEST Haowen Bai wrote:
> function rtllib_rx_assoc_resp () unsigned errcode receive auth_parse()'s
> errcode -ENOMEM.
>
> Signed-off-by: Haowen Bai <baihaowen@xxxxxxxxx>
> ---
> V1->V2: reduce return random value; print its own error message.
>
> drivers/staging/rtl8192e/rtllib_softmac.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> [snip]
It looks like you are doing too many things and that those aren't even
discussed in your commit message.
> @@ -2292,8 +2292,8 @@ static void rtllib_rx_auth_resp(struct
rtllib_device *ieee, struct sk_buff *skb)
> if (errcode) {
> ieee->softmac_stats.rx_auth_rs_err++;
> netdev_info(ieee->dev,
> - "Authentication response status code
0x%x",
> - errcode);
> + "Authentication response status code %d",
> + le16_to_cpu(errcode));
Why did you call le16_to_cpu(errcode)?
If I'm not missing something, it looks that auth_parse() already returns
native endian u16 values.
Thanks,
Fabio M. De Francesco