lkml.org 
[lkml]   [2023]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: ethernet: mtk_eth_soc: use be32 type to store be32 values
On Sat, Apr 01, 2023 at 08:43:44AM +0200, Simon Horman wrote:
> Perhaps there is a nicer way to handle this but the code
> calls for converting an array of host byte order 32bit values
> to big endian 32bit values: an ipv6 address to be pretty printed.
>
> Use a sparse-friendly array of be32 to store these values.
>
> Also make use of the cpu_to_be32_array helper rather
> than open coding the conversion.
>
> Flagged by sparse:
> drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c:59:27: warning: incorrect type in assignment (different base types)
> drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c:59:27: expected unsigned int
> drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c:59:27: got restricted __be32 [usertype]
> drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c:161:46: warning: cast to restricted __be16
>
> No functional changes intended.
> Compile tested only.
>
> Signed-off-by: Simon Horman <horms@kernel.org>

Sorry, I forgot to tag this for net-next.
I can repost if needed, after an appropriate pause.

\
 
 \ /
  Last update: 2023-04-01 09:32    [W:0.039 / U:6.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site