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: <ed5f3419-6324-0327-c3bf-04ad91b2c0b1@huawei.com>
Date:   Mon, 13 Aug 2018 17:24:34 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     "Shaikh, Shahed" <Shahed.Shaikh@...ium.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "Chickles, Derek" <Derek.Chickles@...ium.com>,
        "Burla, Satananda" <Satananda.Burla@...ium.com>,
        "Manlunas, Felix" <Felix.Manlunas@...ium.com>,
        "Vatsavayi, Raghu" <Raghu.Vatsavayi@...ium.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] liquidio: remove set but not used variable
 'is25G'


On 2018/8/13 17:08, Shaikh, Shahed wrote:
>> -----Original Message-----
>> From: netdev-owner@...r.kernel.org <netdev-owner@...r.kernel.org> On
>> Behalf Of YueHaibing
>> Sent: Monday, August 13, 2018 12:51 PM
>> To: davem@...emloft.net; Chickles, Derek <Derek.Chickles@...ium.com>;
>> Burla, Satananda <Satananda.Burla@...ium.com>; Manlunas, Felix
>> <Felix.Manlunas@...ium.com>; Vatsavayi, Raghu
>> <Raghu.Vatsavayi@...ium.com>
>> Cc: linux-kernel@...r.kernel.org; netdev@...r.kernel.org; YueHaibing
>> <yuehaibing@...wei.com>
>> Subject: [PATCH net-next] liquidio: remove set but not used variable 'is25G'
>>
>> External Email
>>
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/net/ethernet/cavium/liquidio/lio_ethtool.c: In function
>> 'lio_set_link_ksettings':
>> drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:392:6: warning:
>>  variable 'is25G' set but not used [-Wunused-but-set-variable]
>>
>> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
>> ---
>>  drivers/net/ethernet/cavium/liquidio/lio_ethtool.c | 7 ++-----
>>  1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
>> b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
>> index 807ea2c..5ce604a 100644
>> --- a/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
>> +++ b/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c
>> @@ -389,16 +389,13 @@ static int lio_set_link_ksettings(struct net_device
>> *netdev,
>>         struct lio *lio = GET_LIO(netdev);
>>         struct oct_link_info *linfo;
>>         struct octeon_device *oct;
>> -       u32 is25G = 0;
>>
>>         oct = lio->oct_dev;
>>
>>         linfo = &lio->linfo;
>>
>> -       if (oct->subsystem_id == OCTEON_CN2350_25GB_SUBSYS_ID ||
>> -           oct->subsystem_id == OCTEON_CN2360_25GB_SUBSYS_ID) {
>> -               is25G = 1;
>> -       } else {
>> +       if (!(oct->subsystem_id == OCTEON_CN2350_25GB_SUBSYS_ID ||
>> +             oct->subsystem_id == OCTEON_CN2360_25GB_SUBSYS_ID)) {
>>                 return -EOPNOTSUPP;
>>         }
> 
> You can also remove braces which are not required for single line.

Yes, thanks.  Will post v2

> Thanks,
> Shahed
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ