lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2024080718-overlaid-junkie-4ee9@gregkh>
Date: Wed, 7 Aug 2024 13:02:32 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Sunil V L <sunilvl@...tanamicro.com>
Cc: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
	Jiri Slaby <jirislaby@...nel.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] serial: 8250_platform: Fix structure initialization
 warning

On Wed, Aug 07, 2024 at 09:52:10AM +0530, Sunil V L wrote:
> Use memset to initialize the uart structure instead of universal zero
> initializer to fix the below warning.
> 
> drivers/tty/serial/8250/8250_platform.c: In function 'serial8250_platform_probe':
> drivers/tty/serial/8250/8250_platform.c:111:40: warning: excess elements in struct initializer
>   111 |         struct uart_8250_port uart = { 0 };
>       |                                        ^
> drivers/tty/serial/8250/8250_platform.c:111:40: note: (near initialization for 'uart.port.lock.<anonymous>.rlock.raw_lock')
> 
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202407310023.h0JgJG1C-lkp@intel.com/
> Fixes: d9e5a0ce2f16 ("serial: 8250_platform: Enable generic 16550A platform devices")
> Signed-off-by: Sunil V L <sunilvl@...tanamicro.com>
> ---
>  drivers/tty/serial/8250/8250_platform.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8250/8250_platform.c
> index bdfb16bed4f2..d8c3c169a620 100644
> --- a/drivers/tty/serial/8250/8250_platform.c
> +++ b/drivers/tty/serial/8250/8250_platform.c
> @@ -108,11 +108,12 @@ void __init serial8250_isa_init_ports(void)
>  static int serial8250_platform_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
> -	struct uart_8250_port uart = { 0 };
> +	struct uart_8250_port uart;

{ } should be correct instead.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ