All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/crypto/hooks.c: fix build with pre-4.6 gcc versions
@ 2018-01-19 21:45 Eric Biggers
  2018-01-19 21:53 ` Andrew Morton
  2018-02-01 15:52 ` Theodore Ts'o
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Biggers @ 2018-01-19 21:45 UTC (permalink / raw)
  To: linux-fscrypt, Theodore Y . Ts'o; +Cc: Andrew Morton, Eric Biggers

From: Eric Biggers <ebiggers@google.com>

gcc versions prior to 4.6 require an extra level of braces when using a
designated initializer for a member in an anonymous struct or union.
This caused a compile error with the 'struct qstr' initialization in
__fscrypt_encrypt_symlink().

Fix it by using QSTR_INIT().

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Fixes: 76e81d6d5048 ("fscrypt: new helper functions for ->symlink()")
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 fs/crypto/hooks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/crypto/hooks.c b/fs/crypto/hooks.c
index 28f9f059571d..bec06490fb13 100644
--- a/fs/crypto/hooks.c
+++ b/fs/crypto/hooks.c
@@ -158,7 +158,7 @@ int __fscrypt_encrypt_symlink(struct inode *inode, const char *target,
 			      unsigned int len, struct fscrypt_str *disk_link)
 {
 	int err;
-	struct qstr iname = { .name = target, .len = len };
+	struct qstr iname = QSTR_INIT(target, len);
 	struct fscrypt_symlink_data *sd;
 	unsigned int ciphertext_len;
 
-- 
2.16.0.rc1.238.g530d649a79-goog

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

* Re: [PATCH] fs/crypto/hooks.c: fix build with pre-4.6 gcc versions
  2018-01-19 21:45 [PATCH] fs/crypto/hooks.c: fix build with pre-4.6 gcc versions Eric Biggers
@ 2018-01-19 21:53 ` Andrew Morton
  2018-01-25 18:42   ` Eric Biggers
  2018-02-01 15:52 ` Theodore Ts'o
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2018-01-19 21:53 UTC (permalink / raw)
  To: Eric Biggers; +Cc: linux-fscrypt, Theodore Y . Ts'o, Eric Biggers

On Fri, 19 Jan 2018 13:45:24 -0800 Eric Biggers <ebiggers3@gmail.com> wrote:

> From: Eric Biggers <ebiggers@google.com>
> 
> gcc versions prior to 4.6 require an extra level of braces when using a
> designated initializer for a member in an anonymous struct or union.
> This caused a compile error with the 'struct qstr' initialization in
> __fscrypt_encrypt_symlink().
> 
> Fix it by using QSTR_INIT().
> 
> Reported-by: Andrew Morton <akpm@linux-foundation.org>
> Fixes: 76e81d6d5048 ("fscrypt: new helper functions for ->symlink()")
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Tested-by: Andrew Morton <akpm@linux-foundation.org>

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

* Re: [PATCH] fs/crypto/hooks.c: fix build with pre-4.6 gcc versions
  2018-01-19 21:53 ` Andrew Morton
@ 2018-01-25 18:42   ` Eric Biggers
  2018-01-29 18:10     ` Eric Biggers
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Biggers @ 2018-01-25 18:42 UTC (permalink / raw)
  To: Theodore Y . Ts'o; +Cc: linux-fscrypt, Andrew Morton, Eric Biggers

On Fri, Jan 19, 2018 at 01:53:48PM -0800, Andrew Morton wrote:
> On Fri, 19 Jan 2018 13:45:24 -0800 Eric Biggers <ebiggers3@gmail.com> wrote:
> 
> > From: Eric Biggers <ebiggers@google.com>
> > 
> > gcc versions prior to 4.6 require an extra level of braces when using a
> > designated initializer for a member in an anonymous struct or union.
> > This caused a compile error with the 'struct qstr' initialization in
> > __fscrypt_encrypt_symlink().
> > 
> > Fix it by using QSTR_INIT().
> > 
> > Reported-by: Andrew Morton <akpm@linux-foundation.org>
> > Fixes: 76e81d6d5048 ("fscrypt: new helper functions for ->symlink()")
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
> 
> Tested-by: Andrew Morton <akpm@linux-foundation.org>

Ted, can you apply this to the fscrypt tree?

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

* Re: [PATCH] fs/crypto/hooks.c: fix build with pre-4.6 gcc versions
  2018-01-25 18:42   ` Eric Biggers
@ 2018-01-29 18:10     ` Eric Biggers
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Biggers @ 2018-01-29 18:10 UTC (permalink / raw)
  To: Theodore Y . Ts'o; +Cc: linux-fscrypt, Andrew Morton, Eric Biggers

On Thu, Jan 25, 2018 at 10:42:29AM -0800, Eric Biggers wrote:
> On Fri, Jan 19, 2018 at 01:53:48PM -0800, Andrew Morton wrote:
> > On Fri, 19 Jan 2018 13:45:24 -0800 Eric Biggers <ebiggers3@gmail.com> wrote:
> > 
> > > From: Eric Biggers <ebiggers@google.com>
> > > 
> > > gcc versions prior to 4.6 require an extra level of braces when using a
> > > designated initializer for a member in an anonymous struct or union.
> > > This caused a compile error with the 'struct qstr' initialization in
> > > __fscrypt_encrypt_symlink().
> > > 
> > > Fix it by using QSTR_INIT().
> > > 
> > > Reported-by: Andrew Morton <akpm@linux-foundation.org>
> > > Fixes: 76e81d6d5048 ("fscrypt: new helper functions for ->symlink()")
> > > Signed-off-by: Eric Biggers <ebiggers@google.com>
> > 
> > Tested-by: Andrew Morton <akpm@linux-foundation.org>
> 
> Ted, can you apply this to the fscrypt tree?

Ping.

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

* Re: [PATCH] fs/crypto/hooks.c: fix build with pre-4.6 gcc versions
  2018-01-19 21:45 [PATCH] fs/crypto/hooks.c: fix build with pre-4.6 gcc versions Eric Biggers
  2018-01-19 21:53 ` Andrew Morton
@ 2018-02-01 15:52 ` Theodore Ts'o
  1 sibling, 0 replies; 5+ messages in thread
From: Theodore Ts'o @ 2018-02-01 15:52 UTC (permalink / raw)
  To: Eric Biggers; +Cc: linux-fscrypt, Andrew Morton, Eric Biggers

On Fri, Jan 19, 2018 at 01:45:24PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> gcc versions prior to 4.6 require an extra level of braces when using a
> designated initializer for a member in an anonymous struct or union.
> This caused a compile error with the 'struct qstr' initialization in
> __fscrypt_encrypt_symlink().
> 
> Fix it by using QSTR_INIT().
> 
> Reported-by: Andrew Morton <akpm@linux-foundation.org>
> Fixes: 76e81d6d5048 ("fscrypt: new helper functions for ->symlink()")
> Signed-off-by: Eric Biggers <ebiggers@google.com>

Thanks, applied.

					- Ted

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

end of thread, other threads:[~2018-02-01 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-19 21:45 [PATCH] fs/crypto/hooks.c: fix build with pre-4.6 gcc versions Eric Biggers
2018-01-19 21:53 ` Andrew Morton
2018-01-25 18:42   ` Eric Biggers
2018-01-29 18:10     ` Eric Biggers
2018-02-01 15:52 ` Theodore Ts'o

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.