lkml.org 
[lkml]   [2022]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V4] staging: rtl8192e: Fix signedness bug in rtllib_rx_assoc_resp()
From
在 4/15/22 2:58 PM, Dan Carpenter 写道:
> On Fri, Apr 15, 2022 at 02:39:27PM +0800, Haowen Bai wrote:
>> This commit message suggested by Dan Carpenter as below:
> You don't need to add this. If you feel you must then put it below the
> --- cut off line and it will be stored on lore.kernel.org until the end
> of time.
>
>> @@ -2292,8 +2298,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));
> The error code is not a le16. It's just an int. The way to prevent
> these kinds of issues in the future is to run Sparse with the endian
> checking enabled.
>
> https://lwn.net/Articles/205624/
>
> regards,
> dan carpenter
>
Dear Dan Carpenter
Got it, thank you for your professional and patience.

--
Haowen Bai

\
 
 \ /
  Last update: 2022-04-18 03:48    [W:0.057 / U:1.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site