From: YueHaibing <yuehaibing@huawei.com>
To: "Shaikh, Shahed" <Shahed.Shaikh@cavium.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"Chickles, Derek" <Derek.Chickles@cavium.com>,
"Burla, Satananda" <Satananda.Burla@cavium.com>,
"Manlunas, Felix" <Felix.Manlunas@cavium.com>,
"Vatsavayi, Raghu" <Raghu.Vatsavayi@cavium.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] liquidio: remove set but not used variable 'is25G'
Date: Mon, 13 Aug 2018 17:24:34 +0800 [thread overview]
Message-ID: <ed5f3419-6324-0327-c3bf-04ad91b2c0b1@huawei.com> (raw)
In-Reply-To: <BY2PR07MB245416297A60474BA77A99A39D390@BY2PR07MB2454.namprd07.prod.outlook.com>
On 2018/8/13 17:08, Shaikh, Shahed wrote:
>> -----Original Message-----
>> From: netdev-owner@vger.kernel.org <netdev-owner@vger.kernel.org> On
>> Behalf Of YueHaibing
>> Sent: Monday, August 13, 2018 12:51 PM
>> To: davem@davemloft.net; Chickles, Derek <Derek.Chickles@cavium.com>;
>> Burla, Satananda <Satananda.Burla@cavium.com>; Manlunas, Felix
>> <Felix.Manlunas@cavium.com>; Vatsavayi, Raghu
>> <Raghu.Vatsavayi@cavium.com>
>> Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; YueHaibing
>> <yuehaibing@huawei.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@huawei.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
>
>
>
prev parent reply other threads:[~2018-08-13 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-13 7:21 [PATCH net-next] liquidio: remove set but not used variable 'is25G' YueHaibing
2018-08-13 9:08 ` Shaikh, Shahed
2018-08-13 9:24 ` YueHaibing [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ed5f3419-6324-0327-c3bf-04ad91b2c0b1@huawei.com \
--to=yuehaibing@huawei.com \
--cc=Derek.Chickles@cavium.com \
--cc=Felix.Manlunas@cavium.com \
--cc=Raghu.Vatsavayi@cavium.com \
--cc=Satananda.Burla@cavium.com \
--cc=Shahed.Shaikh@cavium.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox