mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] binderfs: Fix binderfs.c selftest compilation warning
@ 2020-04-11 14:51 Tang Bin
  2020-04-11 15:03 ` Christian Brauner
  2020-04-12  7:46 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Tang Bin @ 2020-04-11 14:51 UTC (permalink / raw)
  To: gregkh, arve, maco, tkjos, joel, christian; +Cc: devel, linux-kernel, Tang Bin

Fix missing braces compilation warning in the ARM
compiler environment:
    drivers/android/binderfs.c: In function 'binderfs_fill_super':
    drivers/android/binderfs.c:650:9: warning: missing braces around initializer [-Wmissing-braces]
      struct binderfs_device device_info = { 0 };
    drivers/android/binderfs.c:650:9: warning: (near initialization for ‘device_info.name’) [-Wmissing-braces]

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/android/binderfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index 9ecad7418..78528e1 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -650,7 +650,7 @@ static int binderfs_fill_super(struct super_block *sb, struct fs_context *fc)
 	struct binderfs_info *info;
 	struct binderfs_mount_opts *ctx = fc->fs_private;
 	struct inode *inode = NULL;
-	struct binderfs_device device_info = { 0 };
+	struct binderfs_device device_info = {};
 	const char *name;
 	size_t len;
 
-- 
2.7.4




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

* Re: [PATCH] binderfs: Fix binderfs.c selftest compilation warning
  2020-04-11 14:51 [PATCH] binderfs: Fix binderfs.c selftest compilation warning Tang Bin
@ 2020-04-11 15:03 ` Christian Brauner
  2020-04-12  7:46 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2020-04-11 15:03 UTC (permalink / raw)
  To: Tang Bin; +Cc: gregkh, arve, maco, tkjos, joel, christian, devel, linux-kernel

On Sat, Apr 11, 2020 at 10:51:51PM +0800, Tang Bin wrote:
> Fix missing braces compilation warning in the ARM
> compiler environment:
>     drivers/android/binderfs.c: In function 'binderfs_fill_super':
>     drivers/android/binderfs.c:650:9: warning: missing braces around initializer [-Wmissing-braces]
>       struct binderfs_device device_info = { 0 };
>     drivers/android/binderfs.c:650:9: warning: (near initialization for ‘device_info.name’) [-Wmissing-braces]
> 
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---

Thanks!
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

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

* Re: [PATCH] binderfs: Fix binderfs.c selftest compilation warning
  2020-04-11 14:51 [PATCH] binderfs: Fix binderfs.c selftest compilation warning Tang Bin
  2020-04-11 15:03 ` Christian Brauner
@ 2020-04-12  7:46 ` Greg KH
  2020-04-13  7:44   ` Tang Bin
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2020-04-12  7:46 UTC (permalink / raw)
  To: Tang Bin; +Cc: arve, maco, tkjos, joel, christian, devel, linux-kernel

On Sat, Apr 11, 2020 at 10:51:51PM +0800, Tang Bin wrote:
> Fix missing braces compilation warning in the ARM
> compiler environment:
>     drivers/android/binderfs.c: In function 'binderfs_fill_super':
>     drivers/android/binderfs.c:650:9: warning: missing braces around initializer [-Wmissing-braces]
>       struct binderfs_device device_info = { 0 };
>     drivers/android/binderfs.c:650:9: warning: (near initialization for ‘device_info.name’) [-Wmissing-braces]

What compiler and version is giving this warning?  It's odd we have not
seen this yet...

thanks,

greg k-h

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

* Re: [PATCH] binderfs: Fix binderfs.c selftest compilation warning
  2020-04-12  7:46 ` Greg KH
@ 2020-04-13  7:44   ` Tang Bin
  0 siblings, 0 replies; 4+ messages in thread
From: Tang Bin @ 2020-04-13  7:44 UTC (permalink / raw)
  To: Greg KH; +Cc: arve, maco, tkjos, joel, christian, devel, linux-kernel

Hi greg:

On 2020/4/12 15:46, Greg KH wrote:
> On Sat, Apr 11, 2020 at 10:51:51PM +0800, Tang Bin wrote:
>> Fix missing braces compilation warning in the ARM
>> compiler environment:
>>      drivers/android/binderfs.c: In function 'binderfs_fill_super':
>>      drivers/android/binderfs.c:650:9: warning: missing braces around initializer [-Wmissing-braces]
>>        struct binderfs_device device_info = { 0 };
>>      drivers/android/binderfs.c:650:9: warning: (near initialization for ‘device_info.name’) [-Wmissing-braces]
> What compiler and version is giving this warning?  It's odd we have not
> seen this yet...
My environment:

   PC : Ubuntu 16.04

   Hardware : I.MX6ULL

   Tool Chain : arm-linux-gnueabihf-gcc (Linaro GCC 4.9-2017.01) 4.9.4



Thank you for your patience.

Tang Bin





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

end of thread, other threads:[~2020-04-13  7:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-11 14:51 [PATCH] binderfs: Fix binderfs.c selftest compilation warning Tang Bin
2020-04-11 15:03 ` Christian Brauner
2020-04-12  7:46 ` Greg KH
2020-04-13  7:44   ` Tang Bin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®