From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F25C91386C6; Mon, 4 Nov 2024 14:35:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.17.235.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730730936; cv=none; b=jOAsSyOe8MBYxQ1Rf/QL3BuCzqmc8SS8+frjTqlFnbv7gflX+EEi+DTmJM5Tb7O+FHv84iT3fwjueK9JGknPayN3GHdJi74fpfTMawuuvbYPgawQt5ENrt0YDiY/1TUUInsK15KIyHKZAawVsVYuHOdJuaVwTtD4aCKyvp9V4cg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730730936; c=relaxed/simple; bh=WoDhCo7LfRrMehc/XI79RcLh05pbeBaGT3r2HLxO6jo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JXsZa4tgsPXpcnKyt/82DTjX9I8Zxuajpe1wJObFehuHTwY3/5NuGmpnKK8pGFxKkpppwiO/9T6u2+3J6Dyv4eh2N5mETHf5kOvp7I90xLIECOLu1r3ccsFhmDGWC2ULWcUVe12GFKJPecM04+e2GKcJeDRGQBJaIiXhKk/LYYc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu; spf=pass smtp.mailfrom=csgroup.eu; arc=none smtp.client-ip=93.17.235.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=csgroup.eu Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4XhvC82mfbz9sSX; Mon, 4 Nov 2024 15:35:32 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ttptrm8rp-3y; Mon, 4 Nov 2024 15:35:32 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4XhvC81z3Wz9sSV; Mon, 4 Nov 2024 15:35:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 312F18B773; Mon, 4 Nov 2024 15:35:32 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id TRbO97QGNqR3; Mon, 4 Nov 2024 15:35:32 +0100 (CET) Received: from [172.25.230.108] (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E86488B763; Mon, 4 Nov 2024 15:35:31 +0100 (CET) Message-ID: <71956f4c-4b08-4ade-a19e-7cda8677c326@csgroup.eu> Date: Mon, 4 Nov 2024 15:35:31 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 3/3] net: dpaa_eth: extract hash using __be32 pointer in rx_default_dqrr() To: Vladimir Oltean , netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Breno Leitao , Madalin Bucur , Ioana Ciornei , Radu Bulie , Sean Anderson , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org References: <20241029164317.50182-1-vladimir.oltean@nxp.com> <20241029164317.50182-4-vladimir.oltean@nxp.com> Content-Language: fr-FR From: Christophe Leroy In-Reply-To: <20241029164317.50182-4-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 29/10/2024 à 17:43, Vladimir Oltean a écrit : > 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 Acked-by: Christophe Leroy > --- > drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c > index e280013afa63..bf5baef5c3e0 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; > } >