[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190520171755.GV2085@tuxbook-pro>
Date: Mon, 20 May 2019 10:17:55 -0700
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Alex Elder <elder@...aro.org>
Cc: arnd@...db.de, subashab@...eaurora.org, david.brown@...aro.org,
agross@...nel.org, davem@...emloft.net,
ilias.apalodimas@...aro.org, cpratapa@...eaurora.org,
syadagir@...eaurora.org, evgreen@...omium.org, benchan@...gle.com,
ejcaruso@...gle.com, netdev@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/8] net: qualcomm: rmnet: mark endianness of struct
rmnet_map_dl_csum_trailer fields
On Mon 20 May 06:53 PDT 2019, Alex Elder wrote:
> Two 16-bit fields (csum_start_offset and csum_length) in the
> rmnet_map_dl_csum_trailer structure are currently defined to have
> type u16. But they are in fact big endian values, so should be
> properly represented as __be16 values.
>
> No existing code actually references these fields (they're ignored by
> rmnet_map_ipv4_dl_csum_trailer() and rmnet_map_ipv6_dl_csum_trailer()).
> Changing their type therefore causes no harm, so just fix them.
>
> Signed-off-by: Alex Elder <elder@...aro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> ---
> drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h
> index fb1cdb4ec41f..775b98d34e94 100644
> --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h
> +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h
> @@ -52,8 +52,8 @@ struct rmnet_map_header {
> struct rmnet_map_dl_csum_trailer {
> u8 reserved1;
> u8 flags; /* RMNET_MAP_DL_* */
> - u16 csum_start_offset;
> - u16 csum_length;
> + __be16 csum_start_offset;
> + __be16 csum_length;
> __be16 csum_value;
> } __aligned(1);
>
> --
> 2.20.1
>
Powered by blists - more mailing lists