From: Vladimir Oltean Date: Tue, 29 Oct 2024 16:43:17 +0000 (+0200) Subject: net: dpaa_eth: extract hash using __be32 pointer in rx_default_dqrr() X-Git-Tag: v6.13-rc1~135^2~139^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a746cf8bb6df43566c345f334ca1b931f926449;p=thirdparty%2Fkernel%2Flinux.git net: dpaa_eth: extract hash using __be32 pointer in rx_default_dqrr() Sparse provides the following output: warning: cast to restricted __be32 This is a harmless warning due to the fact that we dereference the hash stored in the FD using an incorrect type annotation. Suppress the warning by using the correct __be32 type instead of u32. No functional change. Signed-off-by: Vladimir Oltean Reviewed-by: Breno Leitao Acked-by: Christophe Leroy Acked-by: Madalin Bucur Link: https://patch.msgid.link/20241029164317.50182-4-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index e280013afa632..bf5baef5c3e06 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -2772,7 +2772,7 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal, if (net_dev->features & NETIF_F_RXHASH && priv->keygen_in_use && !fman_port_get_hash_result_offset(priv->mac_dev->port[RX], &hash_offset)) { - hash = be32_to_cpu(*(u32 *)(vaddr + hash_offset)); + hash = be32_to_cpu(*(__be32 *)(vaddr + hash_offset)); hash_valid = true; }