* [PATCH net-next] octeontx2-af: Remove set but not used variable 'block'
@ 2018-10-19 12:51 YueHaibing
2018-10-19 13:36 ` Sunil Kovvuri
2018-10-23 2:29 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: YueHaibing @ 2018-10-19 12:51 UTC (permalink / raw)
To: Sunil Goutham, Linu Cherian, Geetha sowjanya, Jerin Jacob,
David S. Miller
Cc: YueHaibing, netdev, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c: In function 'rvu_npa_init':
drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c:446:20: warning:
variable 'block' set but not used [-Wunused-but-set-variable]
It never used since introduction in
commit 7a37245ef23f ("octeontx2-af: NPA block admin queue init")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
index 0e43a69..7531fdc 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
@@ -443,15 +443,12 @@ static int npa_aq_init(struct rvu *rvu, struct rvu_block *block)
int rvu_npa_init(struct rvu *rvu)
{
struct rvu_hwinfo *hw = rvu->hw;
- struct rvu_block *block;
int blkaddr, err;
blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPA, 0);
if (blkaddr < 0)
return 0;
- block = &hw->block[blkaddr];
-
/* Initialize admin queue */
err = npa_aq_init(rvu, &hw->block[blkaddr]);
if (err)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] octeontx2-af: Remove set but not used variable 'block'
2018-10-19 12:51 [PATCH net-next] octeontx2-af: Remove set but not used variable 'block' YueHaibing
@ 2018-10-19 13:36 ` Sunil Kovvuri
2018-10-21 10:07 ` YueHaibing
2018-10-23 2:29 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Sunil Kovvuri @ 2018-10-19 13:36 UTC (permalink / raw)
To: yuehaibing
Cc: Sunil Goutham, Linu Cherian, Geetha sowjanya, jerinj,
David S. Miller, Linux Netdev List, kernel-janitors
On Fri, Oct 19, 2018 at 6:11 PM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c: In function 'rvu_npa_init':
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c:446:20: warning:
> variable 'block' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in
> commit 7a37245ef23f ("octeontx2-af: NPA block admin queue init")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
> index 0e43a69..7531fdc 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
> @@ -443,15 +443,12 @@ static int npa_aq_init(struct rvu *rvu, struct rvu_block *block)
> int rvu_npa_init(struct rvu *rvu)
> {
> struct rvu_hwinfo *hw = rvu->hw;
> - struct rvu_block *block;
> int blkaddr, err;
>
> blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPA, 0);
> if (blkaddr < 0)
> return 0;
>
> - block = &hw->block[blkaddr];
> -
> /* Initialize admin queue */
> err = npa_aq_init(rvu, &hw->block[blkaddr]);
> if (err)
>
Thanks for the patch.
Which GCC version do you use ?
Before submitting patches I did test compiling specifically with these
"make arch=X86 -j8 -Werror=unused-function -Wunused-but-set-variable"
but that didn't throw these warnings.
Thanks,
Sunil.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] octeontx2-af: Remove set but not used variable 'block'
2018-10-19 13:36 ` Sunil Kovvuri
@ 2018-10-21 10:07 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-10-21 10:07 UTC (permalink / raw)
To: Sunil Kovvuri
Cc: Sunil Goutham, Linu Cherian, Geetha sowjanya, jerinj,
David S. Miller, Linux Netdev List, kernel-janitors
On 2018/10/19 21:36, Sunil Kovvuri wrote:
> On Fri, Oct 19, 2018 at 6:11 PM YueHaibing <yuehaibing@huawei.com> wrote:
>>
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c: In function 'rvu_npa_init':
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c:446:20: warning:
>> variable 'block' set but not used [-Wunused-but-set-variable]
>>
>> It never used since introduction in
>> commit 7a37245ef23f ("octeontx2-af: NPA block admin queue init")
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
>> index 0e43a69..7531fdc 100644
>> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
>> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
>> @@ -443,15 +443,12 @@ static int npa_aq_init(struct rvu *rvu, struct rvu_block *block)
>> int rvu_npa_init(struct rvu *rvu)
>> {
>> struct rvu_hwinfo *hw = rvu->hw;
>> - struct rvu_block *block;
>> int blkaddr, err;
>>
>> blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPA, 0);
>> if (blkaddr < 0)
>> return 0;
>>
>> - block = &hw->block[blkaddr];
>> -
>> /* Initialize admin queue */
>> err = npa_aq_init(rvu, &hw->block[blkaddr]);
>> if (err)
>>
>
> Thanks for the patch.
> Which GCC version do you use ?
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
> Before submitting patches I did test compiling specifically with these
> "make arch=X86 -j8 -Werror=unused-function -Wunused-but-set-variable"
> but that didn't throw these warnings.
>
> Thanks,
> Sunil.
>
> .
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] octeontx2-af: Remove set but not used variable 'block'
2018-10-19 12:51 [PATCH net-next] octeontx2-af: Remove set but not used variable 'block' YueHaibing
2018-10-19 13:36 ` Sunil Kovvuri
@ 2018-10-23 2:29 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2018-10-23 2:29 UTC (permalink / raw)
To: yuehaibing; +Cc: sgoutham, lcherian, gakula, jerinj, netdev, kernel-janitors
From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 19 Oct 2018 12:51:28 +0000
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c: In function 'rvu_npa_init':
> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c:446:20: warning:
> variable 'block' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in
> commit 7a37245ef23f ("octeontx2-af: NPA block admin queue init")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-23 10:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-19 12:51 [PATCH net-next] octeontx2-af: Remove set but not used variable 'block' YueHaibing
2018-10-19 13:36 ` Sunil Kovvuri
2018-10-21 10:07 ` YueHaibing
2018-10-23 2:29 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).