From: Michael Neuling <mikey@neuling.org>
To: Daniel Axtens <dja@axtens.net>
Cc: linuxppc-dev@ozlabs.org, mpe@ellerman.id.au,
benh@kernel.crashing.org, imunsie@au.ibm.com
Subject: Re: [PATCH 4/4] cxl: sparse: Silence iomem warning in debugfs file creation
Date: Fri, 07 Aug 2015 14:13:12 +1000 [thread overview]
Message-ID: <1438920792.16275.3.camel@neuling.org> (raw)
In-Reply-To: <1438917500-12100-4-git-send-email-dja@axtens.net>
On Fri, 2015-08-07 at 13:18 +1000, Daniel Axtens wrote:
> An IO address, tagged with __iomem, is passed to debugfs_create_file
> as private data. This requires that it be cast to void *. The cast
> creates a sparse warning:
> /scratch/dja/linux-capi/drivers/misc/cxl/debugfs.c:51:57: warning: cast r=
emoves address space of expression
>=20
> The address space marker is added back in the file operations
> (fops_io_u64).
>=20
> Silence the warning with __force.
>=20
> Signed-off-by: Daniel Axtens <dja@axtens.net>
Acked-by: Michael Neuling <mikey@neuling.org>
> ---
> drivers/misc/cxl/debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> diff --git a/drivers/misc/cxl/debugfs.c b/drivers/misc/cxl/debugfs.c
> index 825c412580bc..18df6f44af2a 100644
> --- a/drivers/misc/cxl/debugfs.c
> +++ b/drivers/misc/cxl/debugfs.c
> @@ -48,7 +48,7 @@ DEFINE_SIMPLE_ATTRIBUTE(fops_io_x64, debugfs_io_u64_get=
, debugfs_io_u64_set, "0x
> static struct dentry *debugfs_create_io_x64(const char *name, umode_t mo=
de,
> struct dentry *parent, u64 __iomem *value)
> {
> - return debugfs_create_file(name, mode, parent, (void *)value, &fops_io_=
x64);
> + return debugfs_create_file(name, mode, parent, (void __force *)value, &=
fops_io_x64);
> }
> =20
> int cxl_debugfs_adapter_add(struct cxl *adapter)
next prev parent reply other threads:[~2015-08-07 4:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 3:18 [PATCH 1/4] cxl: Compile with -Werror Daniel Axtens
2015-08-07 3:18 ` [PATCH 2/4] cxl: sparse: Make declarations static Daniel Axtens
2015-08-07 5:48 ` Michael Neuling
2015-08-13 1:44 ` [2/4] " Michael Ellerman
2015-08-07 3:18 ` [PATCH 3/4] cxl: sparse: Flag iomem pointers properly Daniel Axtens
2015-08-07 4:13 ` Michael Neuling
2015-08-12 3:19 ` [3/4] " Michael Ellerman
2015-08-07 3:18 ` [PATCH 4/4] cxl: sparse: Silence iomem warning in debugfs file creation Daniel Axtens
2015-08-07 4:13 ` Michael Neuling [this message]
2015-08-13 1:44 ` [4/4] " Michael Ellerman
2015-08-07 3:25 ` [PATCH 1/4] cxl: Compile with -Werror Michael Neuling
2015-08-07 3:26 ` Daniel Axtens
2015-08-07 4:13 ` Michael Neuling
2015-08-13 1:44 ` [1/4] " Michael Ellerman
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=1438920792.16275.3.camel@neuling.org \
--to=mikey@neuling.org \
--cc=benh@kernel.crashing.org \
--cc=dja@axtens.net \
--cc=imunsie@au.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/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.