* [PATCH] serial: sh-sci: Add missing header guard
@ 2025-09-23 9:28 Prabhakar
2025-09-23 9:51 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Prabhakar @ 2025-09-23 9:28 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Geert Uytterhoeven, Wolfram Sang
Cc: linux-kernel, linux-serial, linux-renesas-soc, Prabhakar,
Biju Das, Fabrizio Castro, Lad Prabhakar
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Add header guard to sh-sci.h to prevent multiple inclusions of the
header file.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
drivers/tty/serial/sh-sci.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/tty/serial/sh-sci.h b/drivers/tty/serial/sh-sci.h
index 951681aba586..22f877e2a17e 100644
--- a/drivers/tty/serial/sh-sci.h
+++ b/drivers/tty/serial/sh-sci.h
@@ -1,4 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __SH_SCI_H__
+#define __SH_SCI_H__
+
#include <linux/bitops.h>
#include <linux/serial_core.h>
#include <linux/io.h>
@@ -176,3 +179,5 @@ enum {
(((port)->type == PORT_SCI) ? SCI_TDxE_CLEAR : SCIF_TDxE_CLEAR)
#define SCxSR_BREAK_CLEAR(port) \
(((port)->type == PORT_SCI) ? SCI_BREAK_CLEAR : SCIF_BREAK_CLEAR)
+
+#endif /* __SH_SCI_H__ */
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] serial: sh-sci: Add missing header guard
2025-09-23 9:28 [PATCH] serial: sh-sci: Add missing header guard Prabhakar
@ 2025-09-23 9:51 ` Greg Kroah-Hartman
2025-09-23 9:59 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2025-09-23 9:51 UTC (permalink / raw)
To: Prabhakar
Cc: Jiri Slaby, Geert Uytterhoeven, Wolfram Sang, linux-kernel,
linux-serial, linux-renesas-soc, Biju Das, Fabrizio Castro,
Lad Prabhakar
On Tue, Sep 23, 2025 at 10:28:46AM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Add header guard to sh-sci.h to prevent multiple inclusions of the
> header file.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> drivers/tty/serial/sh-sci.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/tty/serial/sh-sci.h b/drivers/tty/serial/sh-sci.h
> index 951681aba586..22f877e2a17e 100644
> --- a/drivers/tty/serial/sh-sci.h
Why is this a .h file at all? It's so small, why not just put it all in
the .c file and then there's no need for it anymore.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] serial: sh-sci: Add missing header guard
2025-09-23 9:51 ` Greg Kroah-Hartman
@ 2025-09-23 9:59 ` Geert Uytterhoeven
2025-09-23 10:05 ` Lad, Prabhakar
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-09-23 9:59 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Prabhakar, Jiri Slaby, Geert Uytterhoeven, Wolfram Sang,
linux-kernel, linux-serial, linux-renesas-soc, Biju Das,
Fabrizio Castro, Lad Prabhakar
Hi Greg,
On Tue, 23 Sept 2025 at 11:51, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Tue, Sep 23, 2025 at 10:28:46AM +0100, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Add header guard to sh-sci.h to prevent multiple inclusions of the
> > header file.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> > drivers/tty/serial/sh-sci.h | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/tty/serial/sh-sci.h b/drivers/tty/serial/sh-sci.h
> > index 951681aba586..22f877e2a17e 100644
> > --- a/drivers/tty/serial/sh-sci.h
>
> Why is this a .h file at all? It's so small, why not just put it all in
> the .c file and then there's no need for it anymore.
Until commit e76fe57447e88916 ("sh: Remove old early serial console code
V2") in v2.6.33, it was also included by arch/sh/kernel/early_printk.c.
Those days are long gone, so the time has come for assimilation...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] serial: sh-sci: Add missing header guard
2025-09-23 9:59 ` Geert Uytterhoeven
@ 2025-09-23 10:05 ` Lad, Prabhakar
0 siblings, 0 replies; 4+ messages in thread
From: Lad, Prabhakar @ 2025-09-23 10:05 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Greg Kroah-Hartman, Jiri Slaby, Geert Uytterhoeven, Wolfram Sang,
linux-kernel, linux-serial, linux-renesas-soc, Biju Das,
Fabrizio Castro, Lad Prabhakar
Hi Geert,
On Tue, Sep 23, 2025 at 10:59 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Hi Greg,
>
> On Tue, 23 Sept 2025 at 11:51, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Tue, Sep 23, 2025 at 10:28:46AM +0100, Prabhakar wrote:
> > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > >
> > > Add header guard to sh-sci.h to prevent multiple inclusions of the
> > > header file.
> > >
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > ---
> > > drivers/tty/serial/sh-sci.h | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/drivers/tty/serial/sh-sci.h b/drivers/tty/serial/sh-sci.h
> > > index 951681aba586..22f877e2a17e 100644
> > > --- a/drivers/tty/serial/sh-sci.h
> >
> > Why is this a .h file at all? It's so small, why not just put it all in
> > the .c file and then there's no need for it anymore.
>
> Until commit e76fe57447e88916 ("sh: Remove old early serial console code
> V2") in v2.6.33, it was also included by arch/sh/kernel/early_printk.c.
> Those days are long gone, so the time has come for assimilation...
>
You beat me. I was about to ask if you are OK moving this to `sh-sci.c`.
I'll drop this patch and merge the sh-sci.h header into sh-sci.c.
Cheers,
Prabhakar
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-23 10:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 9:28 [PATCH] serial: sh-sci: Add missing header guard Prabhakar
2025-09-23 9:51 ` Greg Kroah-Hartman
2025-09-23 9:59 ` Geert Uytterhoeven
2025-09-23 10:05 ` Lad, Prabhakar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox