linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ubifs: remove unnecessary #ifdef around fscrypt_ioctl_get_policy()
@ 2019-03-15 20:55 Eric Biggers
  2019-03-15 21:08 ` Richard Weinberger
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Biggers @ 2019-03-15 20:55 UTC (permalink / raw)
  To: linux-mtd; +Cc: linux-fscrypt

From: Eric Biggers <ebiggers@google.com>

When !CONFIG_FS_ENCRYPTION, fscrypt_ioctl_get_policy() is already
stubbed out to return -EOPNOTSUPP, so the extra #ifdef is not needed.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/ubifs/ioctl.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c
index 82e4e6a30b04..cd1d4212fc45 100644
--- a/fs/ubifs/ioctl.c
+++ b/fs/ubifs/ioctl.c
@@ -205,13 +205,8 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		return -EOPNOTSUPP;
 #endif
 	}
-	case FS_IOC_GET_ENCRYPTION_POLICY: {
-#ifdef CONFIG_FS_ENCRYPTION
+	case FS_IOC_GET_ENCRYPTION_POLICY:
 		return fscrypt_ioctl_get_policy(file, (void __user *)arg);
-#else
-		return -EOPNOTSUPP;
-#endif
-	}
 
 	default:
 		return -ENOTTY;
-- 
2.21.0.360.g471c308f928-goog


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ubifs: remove unnecessary #ifdef around fscrypt_ioctl_get_policy()
  2019-03-15 20:55 [PATCH] ubifs: remove unnecessary #ifdef around fscrypt_ioctl_get_policy() Eric Biggers
@ 2019-03-15 21:08 ` Richard Weinberger
  2019-04-18 19:29   ` Eric Biggers
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2019-03-15 21:08 UTC (permalink / raw)
  To: Eric Biggers; +Cc: linux-fscrypt, linux-mtd

On Fri, Mar 15, 2019 at 9:55 PM Eric Biggers <ebiggers@kernel.org> wrote:
>
> From: Eric Biggers <ebiggers@google.com>
>
> When !CONFIG_FS_ENCRYPTION, fscrypt_ioctl_get_policy() is already
> stubbed out to return -EOPNOTSUPP, so the extra #ifdef is not needed.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  fs/ubifs/ioctl.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c
> index 82e4e6a30b04..cd1d4212fc45 100644
> --- a/fs/ubifs/ioctl.c
> +++ b/fs/ubifs/ioctl.c
> @@ -205,13 +205,8 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>                 return -EOPNOTSUPP;
>  #endif
>         }
> -       case FS_IOC_GET_ENCRYPTION_POLICY: {
> -#ifdef CONFIG_FS_ENCRYPTION
> +       case FS_IOC_GET_ENCRYPTION_POLICY:
>                 return fscrypt_ioctl_get_policy(file, (void __user *)arg);
> -#else
> -               return -EOPNOTSUPP;
> -#endif
> -       }
>
>         default:
>                 return -ENOTTY;

Thanks for that one too. :-)

-- 
Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ubifs: remove unnecessary #ifdef around fscrypt_ioctl_get_policy()
  2019-03-15 21:08 ` Richard Weinberger
@ 2019-04-18 19:29   ` Eric Biggers
  2019-04-18 19:31     ` Richard Weinberger
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Biggers @ 2019-04-18 19:29 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: linux-fscrypt, linux-mtd

On Fri, Mar 15, 2019 at 10:08:02PM +0100, Richard Weinberger wrote:
> On Fri, Mar 15, 2019 at 9:55 PM Eric Biggers <ebiggers@kernel.org> wrote:
> >
> > From: Eric Biggers <ebiggers@google.com>
> >
> > When !CONFIG_FS_ENCRYPTION, fscrypt_ioctl_get_policy() is already
> > stubbed out to return -EOPNOTSUPP, so the extra #ifdef is not needed.
> >
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
> > ---
> >  fs/ubifs/ioctl.c | 7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c
> > index 82e4e6a30b04..cd1d4212fc45 100644
> > --- a/fs/ubifs/ioctl.c
> > +++ b/fs/ubifs/ioctl.c
> > @@ -205,13 +205,8 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> >                 return -EOPNOTSUPP;
> >  #endif
> >         }
> > -       case FS_IOC_GET_ENCRYPTION_POLICY: {
> > -#ifdef CONFIG_FS_ENCRYPTION
> > +       case FS_IOC_GET_ENCRYPTION_POLICY:
> >                 return fscrypt_ioctl_get_policy(file, (void __user *)arg);
> > -#else
> > -               return -EOPNOTSUPP;
> > -#endif
> > -       }
> >
> >         default:
> >                 return -ENOTTY;
> 
> Thanks for that one too. :-)
> 
> -- 
> Thanks,
> //richard

Richard, can you take this through the ubifs tree for 5.2?

- Eric

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ubifs: remove unnecessary #ifdef around fscrypt_ioctl_get_policy()
  2019-04-18 19:29   ` Eric Biggers
@ 2019-04-18 19:31     ` Richard Weinberger
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2019-04-18 19:31 UTC (permalink / raw)
  To: Eric Biggers, linux-mtd; +Cc: linux-fscrypt

Am Donnerstag, 18. April 2019, 21:29:53 CEST schrieb Eric Biggers:
> On Fri, Mar 15, 2019 at 10:08:02PM +0100, Richard Weinberger wrote:
> > On Fri, Mar 15, 2019 at 9:55 PM Eric Biggers <ebiggers@kernel.org> wrote:
> > >
> > > From: Eric Biggers <ebiggers@google.com>
> > >
> > > When !CONFIG_FS_ENCRYPTION, fscrypt_ioctl_get_policy() is already
> > > stubbed out to return -EOPNOTSUPP, so the extra #ifdef is not needed.
> > >
> > > Signed-off-by: Eric Biggers <ebiggers@google.com>
> > > ---
> > >  fs/ubifs/ioctl.c | 7 +------
> > >  1 file changed, 1 insertion(+), 6 deletions(-)
> > >
> > > diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c
> > > index 82e4e6a30b04..cd1d4212fc45 100644
> > > --- a/fs/ubifs/ioctl.c
> > > +++ b/fs/ubifs/ioctl.c
> > > @@ -205,13 +205,8 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> > >                 return -EOPNOTSUPP;
> > >  #endif
> > >         }
> > > -       case FS_IOC_GET_ENCRYPTION_POLICY: {
> > > -#ifdef CONFIG_FS_ENCRYPTION
> > > +       case FS_IOC_GET_ENCRYPTION_POLICY:
> > >                 return fscrypt_ioctl_get_policy(file, (void __user *)arg);
> > > -#else
> > > -               return -EOPNOTSUPP;
> > > -#endif
> > > -       }
> > >
> > >         default:
> > >                 return -ENOTTY;
> > 
> > Thanks for that one too. :-)
> > 
> 
> Richard, can you take this through the ubifs tree for 5.2?

Sure. Queued for 5.2. :-)

Thanks,
//richard




______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-18 19:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-15 20:55 [PATCH] ubifs: remove unnecessary #ifdef around fscrypt_ioctl_get_policy() Eric Biggers
2019-03-15 21:08 ` Richard Weinberger
2019-04-18 19:29   ` Eric Biggers
2019-04-18 19:31     ` Richard Weinberger

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).