* [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code
@ 2020-05-07 11:50 Tang Bin
2020-05-07 13:40 ` Leon Romanovsky
2020-05-07 20:18 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Tang Bin @ 2020-05-07 11:50 UTC (permalink / raw)
To: davem, saeedm, leon
Cc: netdev, linux-rdma, linux-kernel, Tang Bin, Zhang Shengju
Use IS_ERR() and PTR_ERR() instead of PTR_ZRR_OR_ZERO()
to simplify code, avoid redundant judgements.
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
index af4ebd295..00e7add0b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
@@ -93,9 +93,8 @@ static int mlx5e_route_lookup_ipv4(struct mlx5e_priv *priv,
}
rt = ip_route_output_key(dev_net(mirred_dev), fl4);
- ret = PTR_ERR_OR_ZERO(rt);
- if (ret)
- return ret;
+ if (IS_ERR(rt))
+ return PTR_ERR(rt);
if (mlx5_lag_is_multipath(mdev) && rt->rt_gw_family != AF_INET) {
ip_rt_put(rt);
--
2.20.1.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code
2020-05-07 11:50 [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code Tang Bin
@ 2020-05-07 13:40 ` Leon Romanovsky
2020-05-07 20:18 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2020-05-07 13:40 UTC (permalink / raw)
To: Tang Bin; +Cc: davem, saeedm, netdev, linux-rdma, linux-kernel, Zhang Shengju
On Thu, May 07, 2020 at 07:50:10PM +0800, Tang Bin wrote:
> Use IS_ERR() and PTR_ERR() instead of PTR_ZRR_OR_ZERO()
> to simplify code, avoid redundant judgements.
>
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code
2020-05-07 11:50 [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code Tang Bin
2020-05-07 13:40 ` Leon Romanovsky
@ 2020-05-07 20:18 ` David Miller
2020-05-13 9:48 ` Tang Bin
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2020-05-07 20:18 UTC (permalink / raw)
To: tangbin; +Cc: saeedm, leon, netdev, linux-rdma, linux-kernel, zhangshengju
From: Tang Bin <tangbin@cmss.chinamobile.com>
Date: Thu, 7 May 2020 19:50:10 +0800
> Use IS_ERR() and PTR_ERR() instead of PTR_ZRR_OR_ZERO()
> to simplify code, avoid redundant judgements.
>
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Saeed, please pick this up.
Thank you.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code
2020-05-07 20:18 ` David Miller
@ 2020-05-13 9:48 ` Tang Bin
2020-05-15 22:28 ` Saeed Mahameed
0 siblings, 1 reply; 6+ messages in thread
From: Tang Bin @ 2020-05-13 9:48 UTC (permalink / raw)
To: David Miller; +Cc: saeedm, leon, netdev, linux-rdma, linux-kernel
Hi David:
On 2020/5/8 4:18, David Miller wrote:
> From: Tang Bin <tangbin@cmss.chinamobile.com>
> Date: Thu, 7 May 2020 19:50:10 +0800
>
>> Use IS_ERR() and PTR_ERR() instead of PTR_ZRR_OR_ZERO()
>> to simplify code, avoid redundant judgements.
>>
>> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
>> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> Saeed, please pick this up.
Does this mean the patch has been received and I just have to wait?
Thanks,
Tang Bin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code
2020-05-13 9:48 ` Tang Bin
@ 2020-05-15 22:28 ` Saeed Mahameed
2020-05-15 22:54 ` Tang Bin
0 siblings, 1 reply; 6+ messages in thread
From: Saeed Mahameed @ 2020-05-15 22:28 UTC (permalink / raw)
To: tangbin, davem; +Cc: netdev, linux-rdma, leon, linux-kernel
On Wed, 2020-05-13 at 17:48 +0800, Tang Bin wrote:
> Hi David:
>
> On 2020/5/8 4:18, David Miller wrote:
> > From: Tang Bin <tangbin@cmss.chinamobile.com>
> > Date: Thu, 7 May 2020 19:50:10 +0800
> >
> > > Use IS_ERR() and PTR_ERR() instead of PTR_ZRR_OR_ZERO()
^^^^^^^ typo
> > > to simplify code, avoid redundant judgements.
> > >
> > > Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> > > Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> > Saeed, please pick this up.
>
> Does this mean the patch has been received and I just have to wait?
>
no, mlx5 patches normally go to net-next-mlx5 branch and usually
pulled into net-next once a week when i send my pull requests.
i will reply with "applied" when i apply this patch,
but for now please fix the typo.
Thanks,
Saeed
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code
2020-05-15 22:28 ` Saeed Mahameed
@ 2020-05-15 22:54 ` Tang Bin
0 siblings, 0 replies; 6+ messages in thread
From: Tang Bin @ 2020-05-15 22:54 UTC (permalink / raw)
To: Saeed Mahameed, davem; +Cc: netdev, linux-rdma, leon, linux-kernel
Hi Saeed:
On 2020/5/16 6:28, Saeed Mahameed wrote:
> On Wed, 2020-05-13 at 17:48 +0800, Tang Bin wrote:
>> Hi David:
>>
>> On 2020/5/8 4:18, David Miller wrote:
>>> From: Tang Bin <tangbin@cmss.chinamobile.com>
>>> Date: Thu, 7 May 2020 19:50:10 +0800
>>>
>>>> Use IS_ERR() and PTR_ERR() instead of PTR_ZRR_OR_ZERO()
> ^^^^^^^ typo
Sorry for this mistake, sorry.
>>>> to simplify code, avoid redundant judgements.
>>>>
>>>> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
>>>> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
>>> Saeed, please pick this up.
>> Does this mean the patch has been received and I just have to wait?
>>
> no, mlx5 patches normally go to net-next-mlx5 branch and usually
> pulled into net-next once a week when i send my pull requests.
>
> i will reply with "applied" when i apply this patch,
> but for now please fix the typo.
Got it, I will send v2 for you.
Thanks,
Tang Bin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-15 22:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 11:50 [PATCH] net/mlx5e: Use IS_ERR() to check and simplify code Tang Bin
2020-05-07 13:40 ` Leon Romanovsky
2020-05-07 20:18 ` David Miller
2020-05-13 9:48 ` Tang Bin
2020-05-15 22:28 ` Saeed Mahameed
2020-05-15 22:54 ` Tang Bin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.