linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] net/mlx5e: Remove redundant assignment
@ 2019-03-02 19:39 Gustavo A. R. Silva
  2019-03-03 15:20 ` Roi Dayan
  0 siblings, 1 reply; 10+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-02 19:39 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky, David S. Miller, Eli Britstein
  Cc: netdev, linux-rdma, linux-kernel, Gustavo A. R. Silva

Remove redundant assignment to tun_entropy->enabled.

Addesses-Coverity-ID: 1477328 ("Unused value")
Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
index 40f4a19b1ce1..be69c1d7941a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
@@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
 	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
 	tun_entropy->num_enabling_entries = 0;
 	tun_entropy->num_disabling_entries = 0;
-	tun_entropy->enabled = entropy_flags.calc_enabled;
-	tun_entropy->enabled =
-		(entropy_flags.calc_supported) ?
-		entropy_flags.calc_enabled : true;
+	tun_entropy->enabled = entropy_flags.calc_supported ?
+			       entropy_flags.calc_enabled : true;
 }
 
 static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH][next] net/mlx5e: Remove redundant assignment
  2019-03-02 19:39 [PATCH][next] net/mlx5e: Remove redundant assignment Gustavo A. R. Silva
@ 2019-03-03 15:20 ` Roi Dayan
  2019-03-03 17:31   ` Eli Britstein
  2019-03-04  6:26   ` Leon Romanovsky
  0 siblings, 2 replies; 10+ messages in thread
From: Roi Dayan @ 2019-03-03 15:20 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Saeed Mahameed, Leon Romanovsky,
	David S. Miller, Eli Britstein
  Cc: netdev, linux-rdma, linux-kernel



On 02/03/2019 21:39, Gustavo A. R. Silva wrote:
> Remove redundant assignment to tun_entropy->enabled.
> 
> Addesses-Coverity-ID: 1477328 ("Unused value")
> Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")

the commit doesn't fix any real issue but is more of a cleanup.
so I'm not sure if fixes line is relevant or not.
beside that looks ok.

Reviewed-by: Roi Dayan <roid@mellanox.com>


> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
> index 40f4a19b1ce1..be69c1d7941a 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
> @@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
>  	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
>  	tun_entropy->num_enabling_entries = 0;
>  	tun_entropy->num_disabling_entries = 0;
> -	tun_entropy->enabled = entropy_flags.calc_enabled;
> -	tun_entropy->enabled =
> -		(entropy_flags.calc_supported) ?
> -		entropy_flags.calc_enabled : true;
> +	tun_entropy->enabled = entropy_flags.calc_supported ?
> +			       entropy_flags.calc_enabled : true;
>  }
>  
>  static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][next] net/mlx5e: Remove redundant assignment
  2019-03-03 15:20 ` Roi Dayan
@ 2019-03-03 17:31   ` Eli Britstein
  2019-03-18 17:35     ` Gustavo A. R. Silva
  2019-03-04  6:26   ` Leon Romanovsky
  1 sibling, 1 reply; 10+ messages in thread
From: Eli Britstein @ 2019-03-03 17:31 UTC (permalink / raw)
  To: Roi Dayan, Gustavo A. R. Silva, Saeed Mahameed, Leon Romanovsky,
	David S. Miller
  Cc: netdev, linux-rdma, linux-kernel

Reviewed-by: Eli Britstein <elibr@mellanox.com>

On 3/3/2019 5:20 PM, Roi Dayan wrote:
>
> On 02/03/2019 21:39, Gustavo A. R. Silva wrote:
>> Remove redundant assignment to tun_entropy->enabled.
>>
>> Addesses-Coverity-ID: 1477328 ("Unused value")
>> Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")
> the commit doesn't fix any real issue but is more of a cleanup.
> so I'm not sure if fixes line is relevant or not.
> beside that looks ok.
>
> Reviewed-by: Roi Dayan <roid@mellanox.com>
>
>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> ---
>>   drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++----
>>   1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
>> index 40f4a19b1ce1..be69c1d7941a 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
>> @@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
>>   	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
>>   	tun_entropy->num_enabling_entries = 0;
>>   	tun_entropy->num_disabling_entries = 0;
>> -	tun_entropy->enabled = entropy_flags.calc_enabled;
>> -	tun_entropy->enabled =
>> -		(entropy_flags.calc_supported) ?
>> -		entropy_flags.calc_enabled : true;
>> +	tun_entropy->enabled = entropy_flags.calc_supported ?
>> +			       entropy_flags.calc_enabled : true;
>>   }
>>   
>>   static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,
>>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][next] net/mlx5e: Remove redundant assignment
  2019-03-03 15:20 ` Roi Dayan
  2019-03-03 17:31   ` Eli Britstein
@ 2019-03-04  6:26   ` Leon Romanovsky
  2019-03-05 22:21     ` Saeed Mahameed
  1 sibling, 1 reply; 10+ messages in thread
From: Leon Romanovsky @ 2019-03-04  6:26 UTC (permalink / raw)
  To: Roi Dayan
  Cc: Gustavo A. R. Silva, Saeed Mahameed, David S. Miller,
	Eli Britstein, netdev, linux-rdma, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

On Sun, Mar 03, 2019 at 03:20:57PM +0000, Roi Dayan wrote:
>
>
> On 02/03/2019 21:39, Gustavo A. R. Silva wrote:
> > Remove redundant assignment to tun_entropy->enabled.
> >
> > Addesses-Coverity-ID: 1477328 ("Unused value")
> > Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")
>
> the commit doesn't fix any real issue but is more of a cleanup.
> so I'm not sure if fixes line is relevant or not.
> beside that looks ok.

It doesn't matter if it is real issue or not, the code is wrong and
should be fixed. This alone is enough to see the Fixes line.

Thanks,
Acked-by: Leon Romanovsky <leonro@mellanox.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][next] net/mlx5e: Remove redundant assignment
  2019-03-04  6:26   ` Leon Romanovsky
@ 2019-03-05 22:21     ` Saeed Mahameed
  2019-03-06  3:03       ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Saeed Mahameed @ 2019-03-05 22:21 UTC (permalink / raw)
  To: Roi Dayan, leon
  Cc: davem, netdev, gustavo, Eli Britstein, linux-rdma, linux-kernel

On Mon, 2019-03-04 at 08:26 +0200, Leon Romanovsky wrote:
> On Sun, Mar 03, 2019 at 03:20:57PM +0000, Roi Dayan wrote:
> > 
> > On 02/03/2019 21:39, Gustavo A. R. Silva wrote:
> > > Remove redundant assignment to tun_entropy->enabled.
> > > 
> > > Addesses-Coverity-ID: 1477328 ("Unused value")
> > > Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port
> > > tunnel entropy calculation")
> > 
> > the commit doesn't fix any real issue but is more of a cleanup.
> > so I'm not sure if fixes line is relevant or not.
> > beside that looks ok.
> 
> It doesn't matter if it is real issue or not, the code is wrong and
> should be fixed. This alone is enough to see the Fixes line.
> 
> Thanks,
> Acked-by: Leon Romanovsky <leonro@mellanox.com>

Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Dave, Do you think such patch should go to net, or do you want me to
send it in my next pull request to net-next, once it is open of course
?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][next] net/mlx5e: Remove redundant assignment
  2019-03-05 22:21     ` Saeed Mahameed
@ 2019-03-06  3:03       ` David Miller
  2019-03-09  0:27         ` Saeed Mahameed
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2019-03-06  3:03 UTC (permalink / raw)
  To: saeedm; +Cc: roid, leon, netdev, gustavo, elibr, linux-rdma, linux-kernel

From: Saeed Mahameed <saeedm@mellanox.com>
Date: Tue, 5 Mar 2019 22:21:39 +0000

> On Mon, 2019-03-04 at 08:26 +0200, Leon Romanovsky wrote:
>> On Sun, Mar 03, 2019 at 03:20:57PM +0000, Roi Dayan wrote:
>> > 
>> > On 02/03/2019 21:39, Gustavo A. R. Silva wrote:
>> > > Remove redundant assignment to tun_entropy->enabled.
>> > > 
>> > > Addesses-Coverity-ID: 1477328 ("Unused value")
>> > > Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port
>> > > tunnel entropy calculation")
>> > 
>> > the commit doesn't fix any real issue but is more of a cleanup.
>> > so I'm not sure if fixes line is relevant or not.
>> > beside that looks ok.
>> 
>> It doesn't matter if it is real issue or not, the code is wrong and
>> should be fixed. This alone is enough to see the Fixes line.
>> 
>> Thanks,
>> Acked-by: Leon Romanovsky <leonro@mellanox.com>
> 
> Acked-by: Saeed Mahameed <saeedm@mellanox.com>
> Dave, Do you think such patch should go to net, or do you want me to
> send it in my next pull request to net-next, once it is open of course
> ?

This feels more like net-next stuff to me, thanks for asking.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][next] net/mlx5e: Remove redundant assignment
  2019-03-06  3:03       ` David Miller
@ 2019-03-09  0:27         ` Saeed Mahameed
  0 siblings, 0 replies; 10+ messages in thread
From: Saeed Mahameed @ 2019-03-09  0:27 UTC (permalink / raw)
  To: davem
  Cc: netdev, linux-kernel, gustavo, Roi Dayan, leon, linux-rdma,
	Eli Britstein

On Tue, 2019-03-05 at 19:03 -0800, David Miller wrote:
> From: Saeed Mahameed <saeedm@mellanox.com>
> Date: Tue, 5 Mar 2019 22:21:39 +0000
> 
> > On Mon, 2019-03-04 at 08:26 +0200, Leon Romanovsky wrote:
> > > On Sun, Mar 03, 2019 at 03:20:57PM +0000, Roi Dayan wrote:
> > > > On 02/03/2019 21:39, Gustavo A. R. Silva wrote:
> > > > > Remove redundant assignment to tun_entropy->enabled.
> > > > > 
> > > > > Addesses-Coverity-ID: 1477328 ("Unused value")
> > > > > Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling
> > > > > port
> > > > > tunnel entropy calculation")
> > > > 
> > > > the commit doesn't fix any real issue but is more of a cleanup.
> > > > so I'm not sure if fixes line is relevant or not.
> > > > beside that looks ok.
> > > 
> > > It doesn't matter if it is real issue or not, the code is wrong
> > > and
> > > should be fixed. This alone is enough to see the Fixes line.
> > > 
> > > Thanks,
> > > Acked-by: Leon Romanovsky <leonro@mellanox.com>
> > 
> > Acked-by: Saeed Mahameed <saeedm@mellanox.com>
> > Dave, Do you think such patch should go to net, or do you want me
> > to
> > send it in my next pull request to net-next, once it is open of
> > course
> > ?
> 
> This feels more like net-next stuff to me, thanks for asking.

Applied to net-next-mlx5, will be sent in the next pull request when
net-next reopens, Thanks!


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][next] net/mlx5e: Remove redundant assignment
  2019-03-03 17:31   ` Eli Britstein
@ 2019-03-18 17:35     ` Gustavo A. R. Silva
  2019-03-18 18:10       ` Saeed Mahameed
  0 siblings, 1 reply; 10+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-18 17:35 UTC (permalink / raw)
  To: Eli Britstein, Roi Dayan, Saeed Mahameed, Leon Romanovsky,
	David S. Miller
  Cc: netdev, linux-rdma, linux-kernel

Hi all,

Friendly ping:

Who can take this?

Thanks
--
Gustavo

On 3/3/19 11:31 AM, Eli Britstein wrote:
> Reviewed-by: Eli Britstein <elibr@mellanox.com>
> 
> On 3/3/2019 5:20 PM, Roi Dayan wrote:
>>
>> On 02/03/2019 21:39, Gustavo A. R. Silva wrote:
>>> Remove redundant assignment to tun_entropy->enabled.
>>>
>>> Addesses-Coverity-ID: 1477328 ("Unused value")
>>> Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling port tunnel entropy calculation")
>> the commit doesn't fix any real issue but is more of a cleanup.
>> so I'm not sure if fixes line is relevant or not.
>> beside that looks ok.
>>
>> Reviewed-by: Roi Dayan <roid@mellanox.com>
>>
>>
>>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>>> ---
>>>   drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6 ++----
>>>   1 file changed, 2 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
>>> index 40f4a19b1ce1..be69c1d7941a 100644
>>> --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
>>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
>>> @@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct mlx5_tun_entropy *tun_entropy,
>>>   	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
>>>   	tun_entropy->num_enabling_entries = 0;
>>>   	tun_entropy->num_disabling_entries = 0;
>>> -	tun_entropy->enabled = entropy_flags.calc_enabled;
>>> -	tun_entropy->enabled =
>>> -		(entropy_flags.calc_supported) ?
>>> -		entropy_flags.calc_enabled : true;
>>> +	tun_entropy->enabled = entropy_flags.calc_supported ?
>>> +			       entropy_flags.calc_enabled : true;
>>>   }
>>>   
>>>   static int mlx5_set_entropy(struct mlx5_tun_entropy *tun_entropy,
>>>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][next] net/mlx5e: Remove redundant assignment
  2019-03-18 17:35     ` Gustavo A. R. Silva
@ 2019-03-18 18:10       ` Saeed Mahameed
  2019-03-18 19:25         ` Gustavo A. R. Silva
  0 siblings, 1 reply; 10+ messages in thread
From: Saeed Mahameed @ 2019-03-18 18:10 UTC (permalink / raw)
  To: davem, gustavo, Eli Britstein, Roi Dayan, leon
  Cc: netdev, linux-kernel, linux-rdma

On Mon, 2019-03-18 at 12:35 -0500, Gustavo A. R. Silva wrote:
> Hi all,
> 
> Friendly ping:
> 
> Who can take this?
> 


Hi Gustavo, 

I already replied on March 8, that this patch was applied to my branch,
net-next-mlx5,

https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/commit/?h=net-next-mlx5&id=6279999c6e3de5a93312a2d66b3fd6ac8636f260

Once net-next is open, this patch is going to make it there as part of
my next pull request to Dave.

Thanks,
Saeed.

> Thanks
> --
> Gustavo
> 
> On 3/3/19 11:31 AM, Eli Britstein wrote:
> > Reviewed-by: Eli Britstein <elibr@mellanox.com>
> > 
> > On 3/3/2019 5:20 PM, Roi Dayan wrote:
> > > On 02/03/2019 21:39, Gustavo A. R. Silva wrote:
> > > > Remove redundant assignment to tun_entropy->enabled.
> > > > 
> > > > Addesses-Coverity-ID: 1477328 ("Unused value")
> > > > Fixes: 97417f6182f8 ("net/mlx5e: Fix GRE key by controlling
> > > > port tunnel entropy calculation")
> > > the commit doesn't fix any real issue but is more of a cleanup.
> > > so I'm not sure if fixes line is relevant or not.
> > > beside that looks ok.
> > > 
> > > Reviewed-by: Roi Dayan <roid@mellanox.com>
> > > 
> > > 
> > > > Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> > > > ---
> > > >   drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c | 6
> > > > ++----
> > > >   1 file changed, 2 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git
> > > > a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
> > > > b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
> > > > index 40f4a19b1ce1..be69c1d7941a 100644
> > > > --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
> > > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/port_tun.c
> > > > @@ -80,10 +80,8 @@ void mlx5_init_port_tun_entropy(struct
> > > > mlx5_tun_entropy *tun_entropy,
> > > >   	mlx5_query_port_tun_entropy(mdev, &entropy_flags);
> > > >   	tun_entropy->num_enabling_entries = 0;
> > > >   	tun_entropy->num_disabling_entries = 0;
> > > > -	tun_entropy->enabled = entropy_flags.calc_enabled;
> > > > -	tun_entropy->enabled =
> > > > -		(entropy_flags.calc_supported) ?
> > > > -		entropy_flags.calc_enabled : true;
> > > > +	tun_entropy->enabled = entropy_flags.calc_supported ?
> > > > +			       entropy_flags.calc_enabled :
> > > > true;
> > > >   }
> > > >   
> > > >   static int mlx5_set_entropy(struct mlx5_tun_entropy
> > > > *tun_entropy,
> > > > 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH][next] net/mlx5e: Remove redundant assignment
  2019-03-18 18:10       ` Saeed Mahameed
@ 2019-03-18 19:25         ` Gustavo A. R. Silva
  0 siblings, 0 replies; 10+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-18 19:25 UTC (permalink / raw)
  To: Saeed Mahameed, davem, Eli Britstein, Roi Dayan, leon
  Cc: netdev, linux-kernel, linux-rdma



On 3/18/19 1:10 PM, Saeed Mahameed wrote:
> On Mon, 2019-03-18 at 12:35 -0500, Gustavo A. R. Silva wrote:
>> Hi all,
>>
>> Friendly ping:
>>
>> Who can take this?
>>
> 
> 
> Hi Gustavo, 
> 
> I already replied on March 8, that this patch was applied to my branch,
> net-next-mlx5,
> 

Oh, somehow I missed that one.

> https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/commit/?h=net-next-mlx5&id=6279999c6e3de5a93312a2d66b3fd6ac8636f260
> 
> Once net-next is open, this patch is going to make it there as part of
> my next pull request to Dave.
> 

Sounds great. :)

Thanks, Saeed.

--
Gustavo

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-03-18 19:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-02 19:39 [PATCH][next] net/mlx5e: Remove redundant assignment Gustavo A. R. Silva
2019-03-03 15:20 ` Roi Dayan
2019-03-03 17:31   ` Eli Britstein
2019-03-18 17:35     ` Gustavo A. R. Silva
2019-03-18 18:10       ` Saeed Mahameed
2019-03-18 19:25         ` Gustavo A. R. Silva
2019-03-04  6:26   ` Leon Romanovsky
2019-03-05 22:21     ` Saeed Mahameed
2019-03-06  3:03       ` David Miller
2019-03-09  0:27         ` Saeed Mahameed

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).