* [PATCH 2/2] 8250_core.c : Global variable shouldn't be initialized to NULL
@ 2024-10-14 18:04 Omer Faruk BULUT
2024-10-15 11:34 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Omer Faruk BULUT @ 2024-10-14 18:04 UTC (permalink / raw)
To: gregkh
Cc: jirislaby, pmladek, andriy.shevchenko, paulmck, john.ogness, tony,
arnd, u.kleine-koenig, linux-kernel, linux-serial,
Omer Faruk BULUT
I check it with checkpatch. Then remove the NULL part.
Signed-by-off: Omer Faruk BULUT <m.omerfarukbulut@gmail.com>
---
drivers/tty/serial/8250/8250_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 5f9f06911795..435396233863 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -304,7 +304,7 @@ static void univ8250_release_irq(struct uart_8250_port *up)
serial_unlink_irq_chain(up);
}
-const struct uart_ops *univ8250_port_base_ops = NULL;
+const struct uart_ops *univ8250_port_base_ops;
struct uart_ops univ8250_port_ops;
static const struct uart_8250_ops univ8250_driver_ops = {
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 2/2] 8250_core.c : Global variable shouldn't be initialized to NULL
2024-10-14 18:04 [PATCH 2/2] 8250_core.c : Global variable shouldn't be initialized to NULL Omer Faruk BULUT
@ 2024-10-15 11:34 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2024-10-15 11:34 UTC (permalink / raw)
To: Omer Faruk BULUT
Cc: gregkh, jirislaby, pmladek, paulmck, john.ogness, tony, arnd,
u.kleine-koenig, linux-kernel, linux-serial
On Mon, Oct 14, 2024 at 09:04:15PM +0300, Omer Faruk BULUT wrote:
> I check it with checkpatch. Then remove the NULL part.
checkpatch may be false positive. Please, add a better analysis
that it's fine to do a such cleanup. Note, this variable is _not_
static.
...
> -const struct uart_ops *univ8250_port_base_ops = NULL;
> +const struct uart_ops *univ8250_port_base_ops;
Is it guaranteed to be NULL for non-static variables? If so,
we want to know the details.
> struct uart_ops univ8250_port_ops;
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-15 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14 18:04 [PATCH 2/2] 8250_core.c : Global variable shouldn't be initialized to NULL Omer Faruk BULUT
2024-10-15 11:34 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox