Message ID | 20240822043252.3488749-1-lizetao1@huawei.com (mailing list archive) |
---|---|
Headers | show |
Series | net: Delete some redundant judgments | expand |
Li Zetao <lizetao1@huawei.com> writes: > This patchset aims to remove some unnecessary judgments and make the > code more concise. In some network modules, rtnl_set_sk_err is used to > record error information, but the err is repeatedly judged to be less > than 0 on the error path. Deleted these redundant judgments. What you call "judgments" would be usually called "conditionals" or "conditional statements", "judged less than zero" would be probably "compared to zero". I think the commit messages are reasonably clear despite this, so I'd leave it be unless others push back. But it's worth keeping in mind for future contributions.
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Thu, 22 Aug 2024 12:32:42 +0800 you wrote: > This patchset aims to remove some unnecessary judgments and make the > code more concise. In some network modules, rtnl_set_sk_err is used to > record error information, but the err is repeatedly judged to be less > than 0 on the error path. Deleted these redundant judgments. > > No functional change intended. > > [...] Here is the summary with links: - [net-next,01/10] net: vxlan: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/6ef1ca2d14f2 - [net-next,02/10] fib: rules: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/41aa426392be - [net-next,03/10] neighbour: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/c25bdd2ac8cf - [net-next,04/10] rtnetlink: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/2d522384fb5b - [net-next,05/10] ipv4: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/4c180887775f - [net-next,06/10] ipmr: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/ebe39f95bc81 - [net-next,07/10] net: nexthop: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/649c3c9b8e44 - [net-next,08/10] ip6mr: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/aa32799c017b - [net-next,09/10] net/ipv6: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/cd9ebde125bf - [net-next,10/10] net: mpls: delete redundant judgment statements https://git.kernel.org/netdev/net-next/c/fb8e83cf443a You are awesome, thank you!
Hi, 在 2024/8/23 21:16, Petr Machata 写道: > > Li Zetao <lizetao1@huawei.com> writes: > >> This patchset aims to remove some unnecessary judgments and make the >> code more concise. In some network modules, rtnl_set_sk_err is used to >> record error information, but the err is repeatedly judged to be less >> than 0 on the error path. Deleted these redundant judgments. > > What you call "judgments" would be usually called "conditionals" or > "conditional statements", "judged less than zero" would be probably > "compared to zero". I think the commit messages are reasonably clear > despite this, so I'd leave it be unless others push back. But it's worth > keeping in mind for future contributions. Thanks you, I will take your advice. Thanks, Li Zetao.