From: Arnd Bergmann <arnd@arndb.de>
To: outreachy-kernel@googlegroups.com
Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com>,
Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [Outreachy kernel] [PATCH] staging: lustre: llite: dir: Add __user annotations to remove sparse warnings
Date: Fri, 30 Oct 2015 23:33:22 +0100 [thread overview]
Message-ID: <6574219.Db31ORpkC9@wuerfel> (raw)
In-Reply-To: <CA+5yK5EEA2s1gEdOkc6x-S4H9skc6p6euaFbuz00yrupcC+UjA@mail.gmail.com>
On Saturday 31 October 2015 03:56:27 Amitoj Kaur Chawla wrote:
> >> @@ -1244,6 +1244,9 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> >> struct ll_sb_info *sbi = ll_i2sbi(inode);
> >> struct obd_ioctl_data *data;
> >> int rc = 0;
> >> + int __user *argi = (int __user *)arg;
> >> + void __user *argv = (void __user *)arg;
> >> + char __user *argc = (char __user *)arg;
> >
> > I don't think you need three different variables. A void * should be good
> > everywhere? argv is also sort of a strange name. Maybe buf?
> >
> > julia
> >
> >>
> >>
>
> I thought so too that void is enough and I did that initially, but it
> gives errors when I change this:
>
> return put_user(inode->i_generation, (int *)arg);
>
>
Right, put_user() is a macro that needs an argument of the
correct type. Maybe call it 'intarg'?
I think the argc is not needed though, the other functions can
take a void pointer as far as I can tell.
Arnd
next prev parent reply other threads:[~2015-10-30 22:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 22:03 [PATCH] staging: lustre: llite: dir: Add __user annotations to remove sparse warnings Amitoj Kaur Chawla
2015-10-30 22:13 ` [Outreachy kernel] " Julia Lawall
2015-10-30 22:26 ` Amitoj Kaur Chawla
2015-10-30 22:33 ` Arnd Bergmann [this message]
2015-10-30 22:50 ` Greg KH
2015-10-30 22:56 ` Amitoj Kaur Chawla
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=6574219.Db31ORpkC9@wuerfel \
--to=arnd@arndb.de \
--cc=amitoj1606@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=outreachy-kernel@googlegroups.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 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.