From: Al Viro <viro@zeniv.linux.org.uk>
To: Ionela Voinescu <ionela.voinescu@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
kernel test robot <lkp@intel.com>,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Sudeep Holla <sudeep.holla@arm.com>
Subject: Re: arch/arm64/kernel/topology.c:367:22: sparse: sparse: dereference of noderef expression
Date: Wed, 6 Jan 2021 20:46:59 +0000 [thread overview]
Message-ID: <20210106204659.GE3579531@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20210106201226.GA25625@arm.com>
On Wed, Jan 06, 2021 at 08:12:27PM +0000, Ionela Voinescu wrote:
> Initially I though it always only makes sense to have a __iomem pointer.
> That is, it only makes sense to have a pointer with a cookie attached
> specifying that it addresses a device memory space that should only be
> accessed using special functions.
>
> But then you've got something like this in drivers/input/serio/apbps2.c:
> struct apbps2_regs {
> u32 __iomem data; /* 0x00 */
> u32 __iomem status; /* 0x04 */
> u32 __iomem ctrl; /* 0x08 */
> u32 __iomem reload; /* 0x0c */
> };
> struct apbps2_priv {
> struct serio *io;
> struct apbps2_regs *regs;
> };
> [..] (followed by)
> ioread32be(&priv->regs->status)
>
> which I think is correct despite contradicting my assumption, but it's
> the only example I've found in the kernel.
Frankly, I would rather turn that into
struct apbps2_regs __iomem *regs;
and striped the individual field qualifiers...
next prev parent reply other threads:[~2021-01-06 20:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 21:00 arch/arm64/kernel/topology.c:367:22: sparse: sparse: dereference of noderef expression kernel test robot
2020-12-18 10:44 ` Catalin Marinas
2021-01-06 15:07 ` Ionela Voinescu
2021-01-06 15:21 ` Catalin Marinas
2021-01-06 15:52 ` Ionela Voinescu
2021-01-06 16:13 ` Al Viro
2021-01-06 16:47 ` Ionela Voinescu
2021-01-06 17:47 ` Al Viro
2021-01-06 20:12 ` Ionela Voinescu
2021-01-06 20:46 ` Al Viro [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-01-06 5:50 kernel test robot
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=20210106204659.GE3579531@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=catalin.marinas@arm.com \
--cc=ionela.voinescu@arm.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=sudeep.holla@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox