[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180730070047.7ornpqv66i5mi42g@mwanda>
Date: Mon, 30 Jul 2018 10:00:47 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Todd Poynor <toddpoynor@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, Zhongze Hu <frankhu@...omium.org>,
John Joseph <jnjoseph@...gle.com>,
lkml <linux-kernel@...r.kernel.org>,
Simon Que <sque@...omium.org>,
Rob Springer <rspringer@...gle.com>,
Guenter Roeck <groeck@...omium.org>,
Todd Poynor <toddpoynor@...gle.com>,
Dmitry Torokhov <dtor@...omium.org>
Subject: Re: [PATCH 17/32] staging: gasket: annotate ioctl arg with __user
On Thu, Jul 19, 2018 at 07:44:53PM -0700, Todd Poynor wrote:
> >> @@ -549,7 +549,7 @@ struct gasket_driver_desc {
> >> * return -EINVAL. Should return an error status (either -EINVAL or
> >> * the error result of the ioctl being handled).
> >> */
> >> - long (*ioctl_handler_cb)(struct file *filp, uint cmd, ulong arg);
> >> + long (*ioctl_handler_cb)(struct file *filp, uint cmd, void __user *arg);
> >
> > Why are you not using the typedef above?
>
> There's a typedef for the permissions check callback, but not for the
> handler callback. It's a bit confusing, so I tried adding a typedef
> for the handler, but now checkpatch is spanking me for adding new
> typedefs -- maybe I should drop the existing typedef?
>
Someone should update checkpatch to not complain about function typedefs
because those are obviously OK. It wouldn't have even occured to me
that people were avoiding them because of checkpatch...
regards,
dan carpenter
Powered by blists - more mailing lists