From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
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 [thread overview]
Message-ID: <20201214090735.00002bf5@Huawei.com> (raw)
In-Reply-To: <CACRpkdYL1iK5bFTHyZkUNKUfEUaNOap+9+eZfDSbQu12d7oT6g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]
On Sat, 12 Dec 2020 15:21:10 +0100
Linus Walleij <linus.walleij@linaro.org> wrote:
> On Fri, Dec 11, 2020 at 3:27 PM kernel test robot <lkp@intel.com> wrote:
>
> > "sparse warnings: (new ones prefixed by >>)"
> > drivers/iio/magnetometer/ak8974.c:408:16: sparse: sparse: cast to restricted __le16
> > drivers/iio/magnetometer/ak8974.c:485:29: sparse: sparse: cast to restricted __le16
> > >> drivers/iio/magnetometer/ak8974.c:511:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected signed short [usertype] *result @@ got restricted __le16 * @@
> > drivers/iio/magnetometer/ak8974.c:511:40: sparse: expected signed 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/drivers/iio/magnetometer/ak8974.c?h=v5.10&id=7f709dcda46105f617329630d97f5c97cea5b068
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
next prev parent reply other threads:[~2020-12-14 9:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 14:26 [stable:linux-4.9.y 66/1284] drivers/iio/magnetometer/ak8974.c:511:40: sparse: sparse: incorrect type in argument 2 (different base types) kernel test robot
2020-12-12 14:21 ` Linus Walleij
2020-12-14 9:07 ` Jonathan Cameron [this message]
2020-12-14 9:17 ` Greg Kroah-Hartman
2020-12-15 9:39 ` Rong Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201214090735.00002bf5@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.