lkml.org 
[lkml]   [2019]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 20/24] compat_ioctl: move HDIO ioctl handling into drivers/ide
> +static int put_user_long(long val, unsigned long arg)
> +{
> +#ifdef CONFIG_COMPAT
> + if (in_compat_syscall())
> + return put_user(val, (compat_long_t __user *)compat_ptr(arg));
> +#endif
> + return put_user(val, (long __user *)arg);
> +}

We had this

#ifdef CONFIG_COMPAT
if (in_compat_syscall())
...
...
#endif

patter quite frequently. Can we define a in_compat_syscall stub
and make sure compat_ptr and the compat_* types are available available
to clean this up a bit?

> - if (NULL == (void *) arg) {
> + if (NULL == argp) {

if (!argp) {

?

\
 
 \ /
  Last update: 2019-12-12 17:30    [W:0.195 / U:2.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site