linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/mlx4: Assign boolean values to a bool variable
@ 2020-11-07  6:53 xiakaixu1987
  2020-11-08  8:20 ` Tariq Toukan
  0 siblings, 1 reply; 5+ messages in thread
From: xiakaixu1987 @ 2020-11-07  6:53 UTC (permalink / raw)
  To: tariqt, tariqt; +Cc: netdev, linux-kernel, Kaixu Xia

From: Kaixu Xia <kaixuxia@tencent.com>

Fix the following coccinelle warnings:

./drivers/net/ethernet/mellanox/mlx4/en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 502d1b97855c..b0f79a5151cf 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -684,7 +684,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
 	xdp_prog = rcu_dereference(ring->xdp_prog);
 	xdp.rxq = &ring->xdp_rxq;
 	xdp.frame_sz = priv->frag_info[0].frag_stride;
-	doorbell_pending = 0;
+	doorbell_pending = false;
 
 	/* We assume a 1:1 mapping between CQEs and Rx descriptors, so Rx
 	 * descriptor offset can be deduced from the CQE index instead of
-- 
2.20.0


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

* Re: [PATCH] net/mlx4: Assign boolean values to a bool variable
  2020-11-07  6:53 [PATCH] net/mlx4: Assign boolean values to a bool variable xiakaixu1987
@ 2020-11-08  8:20 ` Tariq Toukan
  2020-11-09  7:07   ` kaixuxia
  0 siblings, 1 reply; 5+ messages in thread
From: Tariq Toukan @ 2020-11-08  8:20 UTC (permalink / raw)
  To: xiakaixu1987, tariqt, tariqt; +Cc: netdev, linux-kernel, Kaixu Xia



On 11/7/2020 8:53 AM, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
> 
> Fix the following coccinelle warnings:
> 

Hi Kaixu,

Which coccinelle version gave this warning?


> ./drivers/net/ethernet/mellanox/mlx4/en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable
> 
> Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
> ---
>   drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> index 502d1b97855c..b0f79a5151cf 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> @@ -684,7 +684,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
>   	xdp_prog = rcu_dereference(ring->xdp_prog);
>   	xdp.rxq = &ring->xdp_rxq;
>   	xdp.frame_sz = priv->frag_info[0].frag_stride;
> -	doorbell_pending = 0;
> +	doorbell_pending = false;
>   
>   	/* We assume a 1:1 mapping between CQEs and Rx descriptors, so Rx
>   	 * descriptor offset can be deduced from the CQE index instead of
> 


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

* Re: [PATCH] net/mlx4: Assign boolean values to a bool variable
  2020-11-08  8:20 ` Tariq Toukan
@ 2020-11-09  7:07   ` kaixuxia
  2020-11-09  9:33     ` Tariq Toukan
  0 siblings, 1 reply; 5+ messages in thread
From: kaixuxia @ 2020-11-09  7:07 UTC (permalink / raw)
  To: Tariq Toukan, tariqt, tariqt; +Cc: netdev, linux-kernel, Kaixu Xia



On 2020/11/8 16:20, Tariq Toukan wrote:
> 
> 
> On 11/7/2020 8:53 AM, xiakaixu1987@gmail.com wrote:
>> From: Kaixu Xia <kaixuxia@tencent.com>
>>
>> Fix the following coccinelle warnings:
>>
> 
> Hi Kaixu,
> 
> Which coccinelle version gave this warning?

Hi Tariq,

The version is coccinelle-1.0.7.

Thanks,
Kaixu
> 
> 
>> ./drivers/net/ethernet/mellanox/mlx4/en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable
>>
>> Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
>> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
>> ---
>>   drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
>> index 502d1b97855c..b0f79a5151cf 100644
>> --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
>> +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
>> @@ -684,7 +684,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
>>       xdp_prog = rcu_dereference(ring->xdp_prog);
>>       xdp.rxq = &ring->xdp_rxq;
>>       xdp.frame_sz = priv->frag_info[0].frag_stride;
>> -    doorbell_pending = 0;
>> +    doorbell_pending = false;
>>         /* We assume a 1:1 mapping between CQEs and Rx descriptors, so Rx
>>        * descriptor offset can be deduced from the CQE index instead of
>>
> 

-- 
kaixuxia

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

* Re: [PATCH] net/mlx4: Assign boolean values to a bool variable
  2020-11-09  7:07   ` kaixuxia
@ 2020-11-09  9:33     ` Tariq Toukan
  2020-11-10  1:38       ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Tariq Toukan @ 2020-11-09  9:33 UTC (permalink / raw)
  To: kaixuxia, tariqt, tariqt; +Cc: netdev, linux-kernel, Kaixu Xia



On 11/9/2020 9:07 AM, kaixuxia wrote:
> 
> 
> On 2020/11/8 16:20, Tariq Toukan wrote:
>>
>>
>> On 11/7/2020 8:53 AM, xiakaixu1987@gmail.com wrote:
>>> From: Kaixu Xia <kaixuxia@tencent.com>
>>>
>>> Fix the following coccinelle warnings:
>>>
>>
>> Hi Kaixu,
>>
>> Which coccinelle version gave this warning?
> 
> Hi Tariq,
> 
> The version is coccinelle-1.0.7.
> 
> Thanks,
> Kaixu
>>
>>
>>> ./drivers/net/ethernet/mellanox/mlx4/en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable
>>>
>>> Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
>>> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>


Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

Thanks,
Tariq


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

* Re: [PATCH] net/mlx4: Assign boolean values to a bool variable
  2020-11-09  9:33     ` Tariq Toukan
@ 2020-11-10  1:38       ` Jakub Kicinski
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2020-11-10  1:38 UTC (permalink / raw)
  To: Tariq Toukan; +Cc: kaixuxia, tariqt, tariqt, netdev, linux-kernel, Kaixu Xia

On Mon, 9 Nov 2020 11:33:17 +0200 Tariq Toukan wrote:
> >>> ./drivers/net/ethernet/mellanox/mlx4/en_rx.c:687:1-17: WARNING: Assignment of 0/1 to bool variable
> >>>
> >>> Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
> >>> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>  
> 
> Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

Applied, thanks.

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

end of thread, other threads:[~2020-11-10  1:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07  6:53 [PATCH] net/mlx4: Assign boolean values to a bool variable xiakaixu1987
2020-11-08  8:20 ` Tariq Toukan
2020-11-09  7:07   ` kaixuxia
2020-11-09  9:33     ` Tariq Toukan
2020-11-10  1:38       ` Jakub Kicinski

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