Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp316019rwd; Fri, 19 May 2023 21:15:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6w+V9q2sMOWyNnC7UcoLAgL/E0coZStfB3sa5RaqTV1+lkuadE0vdCxAdb4hp1kT0L8+Lx X-Received: by 2002:a05:6a00:22c8:b0:63b:5496:7afa with SMTP id f8-20020a056a0022c800b0063b54967afamr5929095pfj.11.1684556153922; Fri, 19 May 2023 21:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684556153; cv=none; d=google.com; s=arc-20160816; b=BwcDOmE0MD6o9WiZ2ta9vA9fELxJmop4hzThwvs1hBQeUSwq+1rEwa5Qi0hNqr5YrL lajbaZnkXe0sCj9Y8T77vxKOfH8Xgj8Jh9J72oq8gcxBZBU1vTXodw2Ng/uEgDnqgNnU jIdRX/vFd6vI4ThlivvCi/knTgIdJOWRWi9H45/H2wxRiBvljXAN3jIl2Nrtpmc4/DMQ FliOJCgi7cRdB5Pw3xcVMEOIaoLjrqgk9iWAGumNE42gyntNx/8f43hSH2x0DbJpuMU0 lLThqm2MO3C3mlddOF8tSupqu6QV8YNBuAgIK2jw87L4CrefqQuZn3lGsnMx2qAeAqc7 zo4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fnCGmrlOBLhvjGa9MX2iGqRuD5qwQrNA9llxmcNiWZc=; b=tEymosHI5IOtjhZaOsOqO+4QItfmFDFgJ8bvwPI9S5WBByzoBgzRymNib8PJG25j3E ctLST9mr9ZYNlwwWZtnYsSucGyfehQkV6bzje9vSSvgqVC5W3p7AZyNPFkArK2jlJ1ew UUkNchRk2/8TwvW4bt2GT6mYPKx57wlEWXLSgvg7ZCEk994CfZ0j1ucgWicvURwf4ErA qy6J7uytT497OCizY/Vp0otu5YVy2ixc5YsfUDlB0HCQ71OQM3b4GsR2j0F4eM1Iyw0W 2i53OiqJcCBMtJxDhI3tnqFTLlKAeuYHV3er9MSlJRkNX/ypq1cCXjHDDKYP2sY+0Mw+ ZW/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BhrPR3Kr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u203-20020a6279d4000000b0063b5f25dd95si737888pfc.391.2023.05.19.21.15.41; Fri, 19 May 2023 21:15:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BhrPR3Kr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229827AbjETEEo (ORCPT + 99 others); Sat, 20 May 2023 00:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjETEEn (ORCPT ); Sat, 20 May 2023 00:04:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E60110F for ; Fri, 19 May 2023 21:04:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 032406177C for ; Sat, 20 May 2023 04:04:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAB6DC433D2; Sat, 20 May 2023 04:04:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684555481; bh=fnCGmrlOBLhvjGa9MX2iGqRuD5qwQrNA9llxmcNiWZc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BhrPR3KrvQdQnMKffMFNgQhQ27pfjXggtfsY+d9Ade5exLY+0dUgwY+pE39sRisyS qgKsQeShHclHx2qV+K5hAwLUpMd03ZsZTu/WANBWrLCS6WzaJRb/QFzbsNRs6NpiNF FbBy8sgzlC3AMCE6cGYesoVAP+QGgUOrBIfAMJEcfex0ROUoxIFDCtnLvkh5A/TQIK 5zsY8gQpOv/9F+sMQ2Gszv7sshkP3BhJi3mDK0VevxHB0GTIn9Vxy2FHKZMGEPyE1X 46VG2Swu+SNm53LYbipi7/zBHDbClK+SVCBHwXSGnEXIsQ97oztBIx/Ps0wIkDkF/7 2zDbZkTzrD1bg== Date: Fri, 19 May 2023 21:04:39 -0700 From: Jakub Kicinski To: Min-Hua Chen Cc: alexandre.torgue@foss.st.com, davem@davemloft.net, edumazet@google.com, joabreu@synopsys.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, pabeni@redhat.com, peppe.cavallaro@st.com, simon.horman@corigine.com Subject: Re: [PATCH v3] net: stmmac: compare p->des0 and p->des1 with __le32 type values Message-ID: <20230519210439.4a3bb326@kernel.org> In-Reply-To: <20230520015527.215952-1-minhuadotchen@gmail.com> References: <20230519152715.7d1c3a49@kernel.org> <20230520015527.215952-1-minhuadotchen@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 20 May 2023 09:55:27 +0800 Min-Hua Chen wrote: > >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=20 > >to ignore all "isomorphic" values? > > =20 >=20 > I downloaded the source code of sparse and I'm afraid that I cannot make > 0xFFFFFFFF ignored easily. I've tried ~0 instead of 0xFFFFFF, > but it did not work with current sparse. >=20 > 0 is a special case mentioned in [1]. >=20 > """ > One small note: the constant integer =E2=80=9C0=E2=80=9D is special.=20 > You can use a constant zero as a bitwise integer type without > sparse ever complaining. This is because =E2=80=9Cbitwise=E2=80=9D (as th= e name > implies) was designed for making sure that bitwise types don=E2=80=99t > get mixed up (little-endian vs big-endian vs cpu-endian vs whatever), > and there the constant =E2=80=9C0=E2=80=9D really _is_ special. > """ >=20 > For 0xFFFFFFFF, it may look like a false alarm, but we can silence the > sparse warning by taking a fix like mine and people can keep working on > other sparse warnings easier. We can make working with sparse easier by making sure it doesn't generate false positive warnings :\ > (There are around 7000 sparse warning in ARCH=3Darm64 defconfig build and > sometimes it is hard to remember all the false alarm cases) >=20 > Could you consider taking this patch, please? No. We don't take patches to address false positive static=20 checker warnings.