diff mbox series

[net-next] net/mlx4: clean up a type issue

Message ID 52d0814a-7287-4160-94b5-ac7939ac61c6@moroto.mountain (mailing list archive)
State Accepted
Commit bc758ade614576d1c1b167af0246ada8c916c804
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net/mlx4: clean up a type issue | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1342 this patch: 1342
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 1365 this patch: 1365
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1365 this patch: 1365
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter July 25, 2023, 5:39 a.m. UTC
These functions returns type bool, not pointers, so return false instead
of NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
Not a bug.  Targetting net-next.

 drivers/net/ethernet/mellanox/mlx4/mcg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Randy Dunlap July 25, 2023, 5:42 a.m. UTC | #1
Hi Dan,

On 7/24/23 22:39, Dan Carpenter wrote:
> These functions returns type bool, not pointers, so return false instead
> of NULL.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

LGTM. Thanks.
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>

> ---
> Not a bug.  Targetting net-next.
> 
>  drivers/net/ethernet/mellanox/mlx4/mcg.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
> index f1716a83a4d3..24d0c7c46878 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
> @@ -294,7 +294,7 @@ static bool check_duplicate_entry(struct mlx4_dev *dev, u8 port,
>  	struct mlx4_promisc_qp *dqp, *tmp_dqp;
>  
>  	if (port < 1 || port > dev->caps.num_ports)
> -		return NULL;
> +		return false;
>  
>  	s_steer = &mlx4_priv(dev)->steer[port - 1];
>  
> @@ -375,7 +375,7 @@ static bool can_remove_steering_entry(struct mlx4_dev *dev, u8 port,
>  	bool ret = false;
>  
>  	if (port < 1 || port > dev->caps.num_ports)
> -		return NULL;
> +		return false;
>  
>  	s_steer = &mlx4_priv(dev)->steer[port - 1];
>
Leon Romanovsky July 25, 2023, 5:47 a.m. UTC | #2
On Tue, Jul 25, 2023 at 08:39:47AM +0300, Dan Carpenter wrote:
> These functions returns type bool, not pointers, so return false instead
> of NULL.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> Not a bug.  Targetting net-next.
> 
>  drivers/net/ethernet/mellanox/mlx4/mcg.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Tariq Toukan July 25, 2023, 6:55 p.m. UTC | #3
On 25/07/2023 8:39, Dan Carpenter wrote:
> These functions returns type bool, not pointers, so return false instead
> of NULL.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> Not a bug.  Targetting net-next.
> 
>   drivers/net/ethernet/mellanox/mlx4/mcg.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
> index f1716a83a4d3..24d0c7c46878 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
> @@ -294,7 +294,7 @@ static bool check_duplicate_entry(struct mlx4_dev *dev, u8 port,
>   	struct mlx4_promisc_qp *dqp, *tmp_dqp;
>   
>   	if (port < 1 || port > dev->caps.num_ports)
> -		return NULL;
> +		return false;
>   
>   	s_steer = &mlx4_priv(dev)->steer[port - 1];
>   
> @@ -375,7 +375,7 @@ static bool can_remove_steering_entry(struct mlx4_dev *dev, u8 port,
>   	bool ret = false;
>   
>   	if (port < 1 || port > dev->caps.num_ports)
> -		return NULL;
> +		return false;
>   
>   	s_steer = &mlx4_priv(dev)->steer[port - 1];
>   

Thanks for your patch.
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
patchwork-bot+netdevbpf@kernel.org July 27, 2023, 5:20 a.m. UTC | #4
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 25 Jul 2023 08:39:47 +0300 you wrote:
> These functions returns type bool, not pointers, so return false instead
> of NULL.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> Not a bug.  Targetting net-next.
> 
> [...]

Here is the summary with links:
  - [net-next] net/mlx4: clean up a type issue
    https://git.kernel.org/netdev/net-next/c/bc758ade6145

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
index f1716a83a4d3..24d0c7c46878 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -294,7 +294,7 @@  static bool check_duplicate_entry(struct mlx4_dev *dev, u8 port,
 	struct mlx4_promisc_qp *dqp, *tmp_dqp;
 
 	if (port < 1 || port > dev->caps.num_ports)
-		return NULL;
+		return false;
 
 	s_steer = &mlx4_priv(dev)->steer[port - 1];
 
@@ -375,7 +375,7 @@  static bool can_remove_steering_entry(struct mlx4_dev *dev, u8 port,
 	bool ret = false;
 
 	if (port < 1 || port > dev->caps.num_ports)
-		return NULL;
+		return false;
 
 	s_steer = &mlx4_priv(dev)->steer[port - 1];