From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Adrian Remonda <adrianremonda@gmail.com>
Cc: "open list:STAGING SUBSYSTEM" <devel@driverdev.osuosl.org>,
"moderated list:STAGING - LUSTRE..." <HPDD-discuss@ml01.01.org>,
Andreas Dilger <andreas.dilger@intel.com>,
open list <linux-kernel@vger.kernel.org>,
Oleg Drokin <oleg.drokin@intel.com>,
Anton Saraev <antonysaraev@gmail.com>
Subject: Re: Question regarding sparse warning in staging/lustre
Date: Mon, 9 Feb 2015 07:40:23 +0800 [thread overview]
Message-ID: <20150208234023.GA8572@kroah.com> (raw)
In-Reply-To: <1423430844-28740-1-git-send-email-adrianremonda@gmail.com>
On Sun, Feb 08, 2015 at 10:27:23PM +0100, Adrian Remonda wrote:
> Hello,
>
> I'm cleaning the drivers/staging/lustre driver.
> I have got the next warning from sparse:
>
> drivers/staging/lustre/lnet/selftest//conctl.c:918:30: warning: incorrect type in argument 1 (different address spaces)
> drivers/staging/lustre/lnet/selftest//conctl.c:918:30: expected void [noderef] <asn:1>*to
> drivers/staging/lustre/lnet/selftest//conctl.c:918:30: got char *ioc_pbuf2
>
> If I add the __user macro as next:
>
> --- a/drivers/staging/lustre/lnet/selftest/conctl.c
> +++ b/drivers/staging/lustre/lnet/selftest/conctl.c
> @@ -46,7 +46,7 @@
> #include "console.h"
>
> static int
> -lst_session_new_ioctl(lstio_session_new_args_t *args)
> +lst_session_new_ioctl(lstio_session_new_args_t __user *args)
> {
> char *name;
> int rc;
>
> The warning turns to:
>
> drivers/staging/lustre/lnet/selftest//conctl.c:825:13: warning: dereference of noderef expression
>
> Now the question:
> Is this right or it is just a false warning from sparse?
> Should the __user macro should be also inside the structure fields?
The user/kernel fields in lustre are a total mess, I wouldn't work on
them if you don't have to as they need an overhaul in some areas.
So I'd recommend just staying away :)
good luck!
greg k-h
next prev parent reply other threads:[~2015-02-08 23:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-08 21:27 Question regarding sparse warning in staging/lustre Adrian Remonda
2015-02-08 23:40 ` Greg Kroah-Hartman [this message]
2015-02-09 23:07 ` AdrianRemonda
2015-02-09 23:36 ` Greg Kroah-Hartman
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=20150208234023.GA8572@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=HPDD-discuss@ml01.01.org \
--cc=adrianremonda@gmail.com \
--cc=andreas.dilger@intel.com \
--cc=antonysaraev@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.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