From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3316172272208703886==" MIME-Version: 1.0 From: Jonathan Cameron To: kbuild-all@lists.01.org Subject: Re: [stable:linux-4.9.y 66/1284] drivers/iio/magnetometer/ak8974.c:511:40: sparse: sparse: incorrect type in argument 2 (different base types) Date: Mon, 14 Dec 2020 09:07:35 +0000 Message-ID: <20201214090735.00002bf5@Huawei.com> In-Reply-To: List-Id: --===============3316172272208703886== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Sat, 12 Dec 2020 15:21:10 +0100 Linus Walleij wrote: > On Fri, Dec 11, 2020 at 3:27 PM kernel test robot wrote: > = > > "sparse warnings: (new ones prefixed by >>)" > > drivers/iio/magnetometer/ak8974.c:408:16: sparse: sparse: cast to re= stricted __le16 > > drivers/iio/magnetometer/ak8974.c:485:29: sparse: sparse: cast to re= stricted __le16 = > > >> drivers/iio/magnetometer/ak8974.c:511:40: sparse: sparse: incorrect = type in argument 2 (different base types) @@ expected signed short [use= rtype] *result @@ got restricted __le16 * @@ = > > drivers/iio/magnetometer/ak8974.c:511:40: sparse: expected signe= d short [usertype] *result > > drivers/iio/magnetometer/ak8974.c:511:40: sparse: got restricted= __le16 * = > = > I don't understand this, is sparse warning about implicit casting __le16 > to signed short or the other way around? > = > It seems to me to reasonable to allow anyway, I don't even see how > we could avoid that except using explicit casts. Looks to me like we didn't bother backporting a tidy up of the endian types in here to 4.9. That changed the argument types to reflect that they were arrays of __le16. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/d= rivers/iio/magnetometer/ak8974.c?h=3Dv5.10&id=3D7f709dcda46105f617329630d97= f5c97cea5b068 Personally I'm not that bothered about leaving this in place. I don't think its an actual bug after all. Jonathan > = > Yours, > Linus Walleij --===============3316172272208703886==--