* [PATCH 1/2] serial: 8250_platform: remove ACPI_PTR() annotation
@ 2024-08-07 7:57 Arnd Bergmann
2024-08-07 7:57 ` [PATCH 2/2] serial: 8250_platform: fix uart_8250_port initializer Arnd Bergmann
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2024-08-07 7:57 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Sunil V L
Cc: Arnd Bergmann, Andy Shevchenko, linux-kernel, linux-serial
From: Arnd Bergmann <arnd@arndb.de>
The acpi_platform_serial_table[] array is defined globally without
an #ifdef check for CONFIG_ACPI, so ACPI_PTR() makes no sense
here:
drivers/tty/serial/8250/8250_platform.c:271:36: error: 'acpi_platform_serial_table' defined but not used [-Werror=unused-const-variable=]
271 | static const struct acpi_device_id acpi_platform_serial_table[] = {
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 306b488aa996..c9ef988d58b3 100644
--- a/drivers/tty/serial/8250/8250_platform.c
+++ b/drivers/tty/serial/8250/8250_platform.c
@@ -281,7 +281,7 @@ static struct platform_driver serial8250_isa_driver = {
.resume = serial8250_resume,
.driver = {
.name = "serial8250",
- .acpi_match_table = ACPI_PTR(acpi_platform_serial_table),
+ .acpi_match_table = acpi_platform_serial_table,
},
};
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] serial: 8250_platform: fix uart_8250_port initializer
2024-08-07 7:57 [PATCH 1/2] serial: 8250_platform: remove ACPI_PTR() annotation Arnd Bergmann
@ 2024-08-07 7:57 ` Arnd Bergmann
2024-08-07 9:23 ` Sunil V L
` (2 more replies)
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
2 siblings, 3 replies; 7+ messages in thread
From: Arnd Bergmann @ 2024-08-07 7:57 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Sunil V L
Cc: Arnd Bergmann, Andy Shevchenko, linux-kernel, linux-serial
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;
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] serial: 8250_platform: fix uart_8250_port initializer
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
2 siblings, 0 replies; 7+ messages in thread
From: Sunil V L @ 2024-08-07 9:23 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, Jiri Slaby, Arnd Bergmann, Andy Shevchenko,
linux-kernel, linux-serial
Hi Arnd,
On Wed, Aug 07, 2024 at 09:57:44AM +0200, 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 = { };
Thanks! I was not sure about this. So, I sent a patch to use memset just
couple of hours ago. I sent different fix for other ACPI_PTR issue as
well. But I think your fixes are better.
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Thanks!
Sunil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] serial: 8250_platform: remove ACPI_PTR() annotation
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:24 ` Sunil V L
2024-08-08 14:12 ` Andy Shevchenko
2 siblings, 0 replies; 7+ messages in thread
From: Sunil V L @ 2024-08-07 9:24 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, Jiri Slaby, Arnd Bergmann, Andy Shevchenko,
linux-kernel, linux-serial
On Wed, Aug 07, 2024 at 09:57:43AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The acpi_platform_serial_table[] array is defined globally without
> an #ifdef check for CONFIG_ACPI, so ACPI_PTR() makes no sense
> here:
>
> drivers/tty/serial/8250/8250_platform.c:271:36: error: 'acpi_platform_serial_table' defined but not used [-Werror=unused-const-variable=]
> 271 | static const struct acpi_device_id acpi_platform_serial_table[] = {
>
> 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 306b488aa996..c9ef988d58b3 100644
> --- a/drivers/tty/serial/8250/8250_platform.c
> +++ b/drivers/tty/serial/8250/8250_platform.c
> @@ -281,7 +281,7 @@ static struct platform_driver serial8250_isa_driver = {
> .resume = serial8250_resume,
> .driver = {
> .name = "serial8250",
> - .acpi_match_table = ACPI_PTR(acpi_platform_serial_table),
> + .acpi_match_table = acpi_platform_serial_table,
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Thanks!
Sunil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] serial: 8250_platform: remove ACPI_PTR() annotation
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:24 ` [PATCH 1/2] serial: 8250_platform: remove ACPI_PTR() annotation Sunil V L
@ 2024-08-08 14:12 ` Andy Shevchenko
2 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2024-08-08 14:12 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, Jiri Slaby, Sunil V L, Arnd Bergmann,
linux-kernel, linux-serial
On Wed, Aug 07, 2024 at 09:57:43AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The acpi_platform_serial_table[] array is defined globally without
> an #ifdef check for CONFIG_ACPI, so ACPI_PTR() makes no sense
> here:
>
> drivers/tty/serial/8250/8250_platform.c:271:36: error: 'acpi_platform_serial_table' defined but not used [-Werror=unused-const-variable=]
> 271 | static const struct acpi_device_id acpi_platform_serial_table[] = {
Yeah, that patch went into kernel without my review as I was on a long leave.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] serial: 8250_platform: fix uart_8250_port initializer
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
2 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2024-08-08 14:12 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, Jiri Slaby, Sunil V L, Arnd Bergmann,
linux-kernel, linux-serial
On Wed, Aug 07, 2024 at 09:57:44AM +0200, 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.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] serial: 8250_platform: fix uart_8250_port initializer
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
2 siblings, 0 replies; 7+ messages in thread
From: Ilpo Järvinen @ 2024-08-09 9:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, Jiri Slaby, Sunil V L, Arnd Bergmann,
Andy Shevchenko, LKML, linux-serial
[-- 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-08-09 9:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).