Content-Type: multipart/mixed; boundary="===============8756024721798195481==" MIME-Version: 1.0 From: Serge Semin To: kbuild-all@lists.01.org Subject: Re: drivers/mtd/maps/physmap-bt1-rom.c:78:18: sparse: sparse: cast removes address space '__iomem' of expression Date: Wed, 11 Nov 2020 22:22:59 +0300 Message-ID: <20201111192259.ovdyjcuue7fx2bqa@mobilestation> In-Reply-To: <20201110163556.3e3423f6@xps13> List-Id: --===============8756024721798195481== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Tue, Nov 10, 2020 at 04:35:56PM +0100, Miquel Raynal wrote: > Hi Serge, > = > Serge Semin wrote on Tue, 10 Nov > 2020 14:38:27 +0300: > = > > Hello Miquel, > > = > > A situation noted by the warning below won't cause any problem because > > the casting is done to a non-dereferenced variable. It is utilized > > as a pointer bias later in that function. Shall we just ignore the > > warning or still fix it somehow? > = > Do you think the cast to a !__iomem value is mandatory here? It's not mandatory to have the casting with no __iomem, but wouldn't doing like this: + shift =3D (ssize_t __iomem)src & 0x3; be looking weird? Really, is there a good way to somehow extract the first two bits of a __iomem pointer without getting the sparse warning? -Sergey > = > Perhaps if you find an elegant wait to avoid the warning it would be > nice, otherwise I guess we'll let it aside as a false positive. > = > Cheers, > Miqu=C3=A8l --===============8756024721798195481==--