Message ID | 20191122072102.248636-1-zenczykowski@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
Series | [1/3] net: inet_is_local_reserved_port() should return bool not int | expand |
Maciej, please repost this series with a proper introduction "[PATCH 0/3]" posting so that I know what this series does at a high level, how it is doing it, and why it is doing it that way. That also gives me a single email to reply to when I apply your series instead of having to respond to each and every one, which is more work, and error prone for me. Thanks.
> Maciej, please repost this series with a proper introduction "[PATCH 0/3]" posting > so that I know what this series does at a high level, how it is doing it, and why > it is doing it that way. That's because the first two patches were standalone refactors, and only the third - one line - patch had a dependency on the 2nd. > That also gives me a single email to reply to when I apply your series instead of > having to respond to each and every one, which is more work, and error prone for > me.
> > Maciej, please repost this series with a proper introduction "[PATCH 0/3]" posting > > so that I know what this series does at a high level, how it is doing it, and why > > it is doing it that way. > > That's because the first two patches were standalone refactors, > and only the third - one line - patch had a dependency on the 2nd. So I've been thinking about this, and I've come to the conclusion you'd probably not be willing to accept the final one line patch (and either way it should also be updating the sysctl docs) because it is after all a change of behaviour for userspace (even if I imagine very rarely utilized). I'm still not sure what exactly to do about it. Perhaps the easiest thing is to carry it around as an Android common kernel only patch. I'm not sure. I'm kind of loathe to add another sysctl... but perhaps? So for now I'll go with resubmitting just the refactor, which I *hope* won't be controversial??
diff --git a/include/net/ip.h b/include/net/ip.h index a2c61c36dc4a..cebf3e10def1 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -339,10 +339,10 @@ static inline u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_o void inet_get_local_port_range(struct net *net, int *low, int *high); #ifdef CONFIG_SYSCTL -static inline int inet_is_local_reserved_port(struct net *net, int port) +static inline bool inet_is_local_reserved_port(struct net *net, int port) { if (!net->ipv4.sysctl_local_reserved_ports) - return 0; + return false; return test_bit(port, net->ipv4.sysctl_local_reserved_ports); } @@ -357,9 +357,9 @@ static inline int inet_prot_sock(struct net *net) } #else -static inline int inet_is_local_reserved_port(struct net *net, int port) +static inline bool inet_is_local_reserved_port(struct net *net, int port) { - return 0; + return false; } static inline int inet_prot_sock(struct net *net)