lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a586bc5f-d7af-c1cc-8213-b63639061947@huawei.com>
Date:   Tue, 28 Apr 2020 20:39:50 +0800
From:   Jason Yan <yanaijie@...wei.com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     <wambui.karugax@...il.com>, <devel@...verdev.osuosl.org>,
        <linux-kernel@...r.kernel.org>, Hulk Robot <hulkci@...wei.com>
Subject: Re: [PATCH 2/7] staging: rtl8723bs: os_dep: remove set but not used
 'size'



在 2020/4/28 20:28, Greg KH 写道:
> On Mon, Apr 27, 2020 at 11:23:37AM +0800, Jason Yan wrote:
>> And also remove the NULL check before kfree() because kfree() can handle
>> NULL pointers correctly.
>>
>> Fix the following gcc warning:
>>
>> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:157:6: warning:
>> variable ‘size’ set but not used [-Wunused-but-set-variable]
>>    u32 size = 0;
>>        ^~~~
>>
>> Reported-by: Hulk Robot <hulkci@...wei.com>
>> Signed-off-by: Jason Yan <yanaijie@...wei.com>
>> ---
>>   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 11 -----------
>>   1 file changed, 11 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
>> index 1ba85a43f05a..b037868fbf22 100644
>> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
>> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
>> @@ -154,17 +154,6 @@ static struct ieee80211_supported_band *rtw_spt_band_alloc(
>>   
>>   static void rtw_spt_band_free(struct ieee80211_supported_band *spt_band)
>>   {
>> -	u32 size = 0;
>> -
>> -	if (!spt_band)
>> -		return;
>> -
>> -	if (spt_band->band == NL80211_BAND_2GHZ)
>> -	{
>> -		size = sizeof(struct ieee80211_supported_band)
>> -			+ sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM
>> -			+ sizeof(struct ieee80211_rate)*RTW_G_RATES_NUM;
>> -	}
>>   	kfree(spt_band);
>>   }
> 
> This function can now be removed and replaced with the call to kfree(),
> right?  Can you send a follow-on patch to do that?
> 

Sure.

> thanks,
> 
> greg k-h
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ