* [PATCH net-next] net/mlx4: clean up a type issue
@ 2023-07-25 5:39 Dan Carpenter
2023-07-25 5:42 ` Randy Dunlap
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Dan Carpenter @ 2023-07-25 5:39 UTC (permalink / raw)
To: Tariq Toukan
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, linux-rdma, kernel-janitors
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];
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net/mlx4: clean up a type issue
2023-07-25 5:39 [PATCH net-next] net/mlx4: clean up a type issue Dan Carpenter
@ 2023-07-25 5:42 ` Randy Dunlap
2023-07-25 5:47 ` Leon Romanovsky
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2023-07-25 5:42 UTC (permalink / raw)
To: Dan Carpenter, Tariq Toukan
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, linux-rdma, kernel-janitors
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];
>
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net/mlx4: clean up a type issue
2023-07-25 5:39 [PATCH net-next] net/mlx4: clean up a type issue Dan Carpenter
2023-07-25 5:42 ` Randy Dunlap
@ 2023-07-25 5:47 ` Leon Romanovsky
2023-07-25 18:55 ` Tariq Toukan
2023-07-27 5:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2023-07-25 5:47 UTC (permalink / raw)
To: Dan Carpenter
Cc: Tariq Toukan, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-rdma, kernel-janitors
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net/mlx4: clean up a type issue
2023-07-25 5:39 [PATCH net-next] net/mlx4: clean up a type issue Dan Carpenter
2023-07-25 5:42 ` Randy Dunlap
2023-07-25 5:47 ` Leon Romanovsky
@ 2023-07-25 18:55 ` Tariq Toukan
2023-07-27 5:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Tariq Toukan @ 2023-07-25 18:55 UTC (permalink / raw)
To: Dan Carpenter, Tariq Toukan
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, linux-rdma, kernel-janitors
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net/mlx4: clean up a type issue
2023-07-25 5:39 [PATCH net-next] net/mlx4: clean up a type issue Dan Carpenter
` (2 preceding siblings ...)
2023-07-25 18:55 ` Tariq Toukan
@ 2023-07-27 5:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-27 5:20 UTC (permalink / raw)
To: Dan Carpenter
Cc: tariqt, davem, edumazet, kuba, pabeni, netdev, linux-rdma,
kernel-janitors
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-27 5:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-25 5:39 [PATCH net-next] net/mlx4: clean up a type issue Dan Carpenter
2023-07-25 5:42 ` Randy Dunlap
2023-07-25 5:47 ` Leon Romanovsky
2023-07-25 18:55 ` Tariq Toukan
2023-07-27 5:20 ` patchwork-bot+netdevbpf
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).