[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <130b7af7-41fb-74dc-e6a2-7e223f062676@tessares.net>
Date: Wed, 8 Dec 2021 11:17:38 +0100
From: Matthieu Baerts <matthieu.baerts@...sares.net>
To: Jεan Sacren <sakiwit@...il.com>,
mathew.j.martineau@...ux.intel.com
Cc: davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
mptcp@...ts.linux.dev
Subject: Re: [PATCH net-next] net: mptcp: clean up harmless false expressions
Hi Jean,
On 08/12/2021 08:20, Jεan Sacren wrote:
> From: Jean Sacren <sakiwit@...il.com>
>
> entry->addr.id is u8 with a range from 0 to 255 and MAX_ADDR_ID is 255.
> We should drop both false expressions of (entry->addr.id > MAX_ADDR_ID).
Good catch!
I wonder if we should not define MAX_ADDR_ID to UINT8_MAX then, ideally
with an extra comment saying it is linked to mptcp_addr_info's id field.
It would make it less like: by "coincidence", addr.id has a max value of
255 which is the same as MAX_ADDR_ID. WDYT?
If you are OK with the suggestion, please send this v2 to MPTCP's ML
only so we can validate and apply it in our tree. Then we will take care
of sending it to Netdev ML.
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
Powered by blists - more mailing lists