* [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl()
@ 2020-10-26 15:58 Harshal Chaudhari
2020-10-30 10:17 ` Dragan Cvetic
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Harshal Chaudhari @ 2020-10-26 15:58 UTC (permalink / raw)
To: gregkh
Cc: derek.kiernan, dragan.cvetic, arnd, michal.simek,
linux-arm-kernel, linux-kernel
Driver has a trivial helper function to convert
the pointer argument and then call the native ioctl handler.
But now we have a generic implementation for that, so we can use it.
Signed-off-by: Harshal Chaudhari <harshalchau04@gmail.com>
---
drivers/misc/xilinx_sdfec.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
index 92291292756a..6f252793dceb 100644
--- a/drivers/misc/xilinx_sdfec.c
+++ b/drivers/misc/xilinx_sdfec.c
@@ -1016,14 +1016,6 @@ static long xsdfec_dev_ioctl(struct file *fptr, unsigned int cmd,
return rval;
}
-#ifdef CONFIG_COMPAT
-static long xsdfec_dev_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long data)
-{
- return xsdfec_dev_ioctl(file, cmd, (unsigned long)compat_ptr(data));
-}
-#endif
-
static __poll_t xsdfec_poll(struct file *file, poll_table *wait)
{
__poll_t mask = 0;
@@ -1054,9 +1046,7 @@ static const struct file_operations xsdfec_fops = {
.release = xsdfec_dev_release,
.unlocked_ioctl = xsdfec_dev_ioctl,
.poll = xsdfec_poll,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = xsdfec_dev_compat_ioctl,
-#endif
+ .compat_ioctl = compat_ptr_ioctl,
};
static int xsdfec_parse_of(struct xsdfec_dev *xsdfec)
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl()
2020-10-26 15:58 [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl() Harshal Chaudhari
@ 2020-10-30 10:17 ` Dragan Cvetic
2020-11-01 17:25 ` harshal chaudhari
2020-10-30 10:22 ` Arnd Bergmann
2020-11-09 17:10 ` Dragan Cvetic
2 siblings, 1 reply; 5+ messages in thread
From: Dragan Cvetic @ 2020-10-30 10:17 UTC (permalink / raw)
To: Harshal Chaudhari, gregkh
Cc: Derek Kiernan, arnd, Michal Simek, linux-arm-kernel, linux-kernel
Hi Harshal,
The code change is fine, no comment,
but testing will be done at the beginning of the next week.
Sorry for the late reply,
Regards
Dragan
> -----Original Message-----
> From: Harshal Chaudhari <harshalchau04@gmail.com>
> Sent: Monday 26 October 2020 15:58
> To: gregkh@linuxfoundation.org
> Cc: Derek Kiernan <dkiernan@xilinx.com>; Dragan Cvetic <draganc@xilinx.com>; arnd@arndb.de; Michal Simek
> <michals@xilinx.com>; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl()
>
> Driver has a trivial helper function to convert
> the pointer argument and then call the native ioctl handler.
> But now we have a generic implementation for that, so we can use it.
>
> Signed-off-by: Harshal Chaudhari <harshalchau04@gmail.com>
> ---
> drivers/misc/xilinx_sdfec.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
> index 92291292756a..6f252793dceb 100644
> --- a/drivers/misc/xilinx_sdfec.c
> +++ b/drivers/misc/xilinx_sdfec.c
> @@ -1016,14 +1016,6 @@ static long xsdfec_dev_ioctl(struct file *fptr, unsigned int cmd,
> return rval;
> }
>
> -#ifdef CONFIG_COMPAT
> -static long xsdfec_dev_compat_ioctl(struct file *file, unsigned int cmd,
> - unsigned long data)
> -{
> - return xsdfec_dev_ioctl(file, cmd, (unsigned long)compat_ptr(data));
> -}
> -#endif
> -
> static __poll_t xsdfec_poll(struct file *file, poll_table *wait)
> {
> __poll_t mask = 0;
> @@ -1054,9 +1046,7 @@ static const struct file_operations xsdfec_fops = {
> .release = xsdfec_dev_release,
> .unlocked_ioctl = xsdfec_dev_ioctl,
> .poll = xsdfec_poll,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = xsdfec_dev_compat_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static int xsdfec_parse_of(struct xsdfec_dev *xsdfec)
> --
> 2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl()
2020-10-26 15:58 [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl() Harshal Chaudhari
2020-10-30 10:17 ` Dragan Cvetic
@ 2020-10-30 10:22 ` Arnd Bergmann
2020-11-09 17:10 ` Dragan Cvetic
2 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2020-10-30 10:22 UTC (permalink / raw)
To: Harshal Chaudhari
Cc: gregkh, Derek Kiernan, Dragan Cvetic, Arnd Bergmann,
Michal Simek, Linux ARM, linux-kernel
On Mon, Oct 26, 2020 at 4:58 PM Harshal Chaudhari
<harshalchau04@gmail.com> wrote:
>
> Driver has a trivial helper function to convert
> the pointer argument and then call the native ioctl handler.
> But now we have a generic implementation for that, so we can use it.
>
> Signed-off-by: Harshal Chaudhari <harshalchau04@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl()
2020-10-30 10:17 ` Dragan Cvetic
@ 2020-11-01 17:25 ` harshal chaudhari
0 siblings, 0 replies; 5+ messages in thread
From: harshal chaudhari @ 2020-11-01 17:25 UTC (permalink / raw)
To: Dragan Cvetic
Cc: gregkh, Derek Kiernan, arnd, Michal Simek, linux-arm-kernel,
linux-kernel
On Fri, Oct 30, 2020 at 3:47 PM Dragan Cvetic <draganc@xilinx.com> wrote:
>
> Hi Harshal,
>
> The code change is fine, no comment,
> but testing will be done at the beginning of the next week.
> Sorry for the late reply,
Thanks for your attention Dragan. i have send the another patch for
to remove argument and command checks, so i request you to please
look into this patch and kindly confirm if anything needs to change
or any possibility.
Thanks once again.
> Regards
> Dragan
>
>
> > -----Original Message-----
> > From: Harshal Chaudhari <harshalchau04@gmail.com>
> > Sent: Monday 26 October 2020 15:58
> > To: gregkh@linuxfoundation.org
> > Cc: Derek Kiernan <dkiernan@xilinx.com>; Dragan Cvetic <draganc@xilinx.com>; arnd@arndb.de; Michal Simek
> > <michals@xilinx.com>; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> > Subject: [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl()
> >
> > Driver has a trivial helper function to convert
> > the pointer argument and then call the native ioctl handler.
> > But now we have a generic implementation for that, so we can use it.
> >
> > Signed-off-by: Harshal Chaudhari <harshalchau04@gmail.com>
> > ---
> > drivers/misc/xilinx_sdfec.c | 12 +-----------
> > 1 file changed, 1 insertion(+), 11 deletions(-)
> >
> > diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
> > index 92291292756a..6f252793dceb 100644
> > --- a/drivers/misc/xilinx_sdfec.c
> > +++ b/drivers/misc/xilinx_sdfec.c
> > @@ -1016,14 +1016,6 @@ static long xsdfec_dev_ioctl(struct file *fptr, unsigned int cmd,
> > return rval;
> > }
> >
> > -#ifdef CONFIG_COMPAT
> > -static long xsdfec_dev_compat_ioctl(struct file *file, unsigned int cmd,
> > - unsigned long data)
> > -{
> > - return xsdfec_dev_ioctl(file, cmd, (unsigned long)compat_ptr(data));
> > -}
> > -#endif
> > -
> > static __poll_t xsdfec_poll(struct file *file, poll_table *wait)
> > {
> > __poll_t mask = 0;
> > @@ -1054,9 +1046,7 @@ static const struct file_operations xsdfec_fops = {
> > .release = xsdfec_dev_release,
> > .unlocked_ioctl = xsdfec_dev_ioctl,
> > .poll = xsdfec_poll,
> > -#ifdef CONFIG_COMPAT
> > - .compat_ioctl = xsdfec_dev_compat_ioctl,
> > -#endif
> > + .compat_ioctl = compat_ptr_ioctl,
> > };
> >
> > static int xsdfec_parse_of(struct xsdfec_dev *xsdfec)
> > --
> > 2.17.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl()
2020-10-26 15:58 [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl() Harshal Chaudhari
2020-10-30 10:17 ` Dragan Cvetic
2020-10-30 10:22 ` Arnd Bergmann
@ 2020-11-09 17:10 ` Dragan Cvetic
2 siblings, 0 replies; 5+ messages in thread
From: Dragan Cvetic @ 2020-11-09 17:10 UTC (permalink / raw)
To: Harshal Chaudhari, gregkh
Cc: Derek Kiernan, arnd, Michal Simek, linux-arm-kernel, linux-kernel
> -----Original Message-----
> From: Harshal Chaudhari <harshalchau04@gmail.com>
> Sent: Monday 26 October 2020 15:58
> To: gregkh@linuxfoundation.org
> Cc: Derek Kiernan <dkiernan@xilinx.com>; Dragan Cvetic <draganc@xilinx.com>; arnd@arndb.de; Michal Simek
> <michals@xilinx.com>; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl()
>
> Driver has a trivial helper function to convert
> the pointer argument and then call the native ioctl handler.
> But now we have a generic implementation for that, so we can use it.
>
> Signed-off-by: Harshal Chaudhari <harshalchau04@gmail.com>
> ---
> drivers/misc/xilinx_sdfec.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
> index 92291292756a..6f252793dceb 100644
> --- a/drivers/misc/xilinx_sdfec.c
> +++ b/drivers/misc/xilinx_sdfec.c
> @@ -1016,14 +1016,6 @@ static long xsdfec_dev_ioctl(struct file *fptr, unsigned int cmd,
> return rval;
> }
>
> -#ifdef CONFIG_COMPAT
> -static long xsdfec_dev_compat_ioctl(struct file *file, unsigned int cmd,
> - unsigned long data)
> -{
> - return xsdfec_dev_ioctl(file, cmd, (unsigned long)compat_ptr(data));
> -}
> -#endif
> -
> static __poll_t xsdfec_poll(struct file *file, poll_table *wait)
> {
> __poll_t mask = 0;
> @@ -1054,9 +1046,7 @@ static const struct file_operations xsdfec_fops = {
> .release = xsdfec_dev_release,
> .unlocked_ioctl = xsdfec_dev_ioctl,
> .poll = xsdfec_poll,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = xsdfec_dev_compat_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
> };
>
> static int xsdfec_parse_of(struct xsdfec_dev *xsdfec)
> --
> 2.17.1
Acked-by: Dragan Cvetic <dragan.cvetic@xilinx.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-09 17:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 15:58 [PATCH] misc: xilinx_sdfec: add compat_ptr_ioctl() Harshal Chaudhari
2020-10-30 10:17 ` Dragan Cvetic
2020-11-01 17:25 ` harshal chaudhari
2020-10-30 10:22 ` Arnd Bergmann
2020-11-09 17:10 ` Dragan Cvetic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).