From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2677318000 for ; Fri, 19 May 2023 22:27:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46EB8C433D2; Fri, 19 May 2023 22:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684535237; bh=3++Hz/H0Ny8iNnJK/HwTOxVy8iKIyU2vlNFkX6To6V8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pMNQ+KnSqIGNuGe3uYk1BjH4DhXTj3M0pEM6ts97Oe75qGoI4/bM7UJ81xFdYa01/ 28QeawEBbtM6Ou0uajuvn0QxJuWgODz3qt/84ZM5TDU5ZMAmrMzNW//56/tPSHI5yR DEgaNOKopY4SR0Zf/rw+81uy8zk+qRItdlE/WesPVVbQRc2OAYOJIqlBsAqNQPMEPo WC2oIi13vw709nUDVb48rqMMBjWwfojI1SgsVv3Xg0ManDOdMtIinOCKdXeHoYuiS9 1ifR2XvFgM3XuVICy2X5RVtCXDlD21fS50Q5udLIhvdsGkyLDtEWTYInCEx3MTkyos YntJnPPLrqioA== Date: Fri, 19 May 2023 15:27:15 -0700 From: Jakub Kicinski To: Min-Hua Chen Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Paolo Abeni , Maxime Coquelin , Simon Horman , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] net: stmmac: compare p->des0 and p->des1 with __le32 type values Message-ID: <20230519152715.7d1c3a49@kernel.org> In-Reply-To: <20230519115030.74493-1-minhuadotchen@gmail.com> References: <20230519115030.74493-1-minhuadotchen@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 19 May 2023 19:50:28 +0800 Min-Hua Chen wrote: > - if ((p->des0 == 0xffffffff) && (p->des1 == 0xffffffff)) > + if (p->des0 == cpu_to_le32(0xffffffff) && > + p->des1 == cpu_to_le32(0xffffffff)) Can you try to fix the sparse tool instead? I believe it already ignores such errors for the constant of 0, maybe it can be taught to ignore all "isomorphic" values? By "isomorphic" I mean that 0xffffffff == cpu_to_le32(0xffffffff) so there's no point complaining. -- pw-bot: reject