From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Sunil V L <sunilvl@ventanamicro.com>,
Arnd Bergmann <arnd@arndb.de>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-serial <linux-serial@vger.kernel.org>
Subject: Re: [PATCH 2/2] serial: 8250_platform: fix uart_8250_port initializer
Date: Fri, 9 Aug 2024 12:19:21 +0300 (EEST) [thread overview]
Message-ID: <fc9934a5-e770-ac07-e68a-b6528ad19aec@linux.intel.com> (raw)
In-Reply-To: <20240807075751.2206508-2-arnd@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1458 bytes --]
On Wed, 7 Aug 2024, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The first element in uart_8250_port is a structure, so initializing
> it to 0 causes a warning on newer compilers:
>
> drivers/tty/serial/8250/8250_platform.c: In function 'serial8250_platform_probe':
> drivers/tty/serial/8250/8250_platform.c:111:40: error: excess elements in struct initializer [-Werror]
> 111 | struct uart_8250_port uart = { 0 };
>
> Use the modern empty {} initializer instead that works on all
> supported compilers.
>
> Fixes: d9e5a0ce2f16 ("serial: 8250_platform: Enable generic 16550A platform devices")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/tty/serial/8250/8250_platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8250/8250_platform.c
> index c9ef988d58b3..2a3765334843 100644
> --- a/drivers/tty/serial/8250/8250_platform.c
> +++ b/drivers/tty/serial/8250/8250_platform.c
> @@ -108,7 +108,7 @@ 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 = { };
> struct resource *regs;
> unsigned char iotype;
> int ret, line;
>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
next prev parent reply other threads:[~2024-08-09 9:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-07 7:57 [PATCH 1/2] serial: 8250_platform: remove ACPI_PTR() annotation Arnd Bergmann
2024-08-07 7:57 ` [PATCH 2/2] serial: 8250_platform: fix uart_8250_port initializer Arnd Bergmann
2024-08-07 9:23 ` Sunil V L
2024-08-08 14:12 ` Andy Shevchenko
2024-08-09 9:19 ` Ilpo Järvinen [this message]
2024-08-07 9:24 ` [PATCH 1/2] serial: 8250_platform: remove ACPI_PTR() annotation Sunil V L
2024-08-08 14:12 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc9934a5-e770-ac07-e68a-b6528ad19aec@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sunilvl@ventanamicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox