2023-12-19 17:20:11

by Hugo Villeneuve

[permalink] [raw]
Subject: [PATCH 08/18] serial: sc16is7xx: add driver name to struct uart_driver

From: Hugo Villeneuve <[email protected]>

Make sure that the driver name is displayed instead of "unknown" when
displaying the driver infos:

Before:
cat /proc/tty/drivers | grep ttySC
unknown /dev/ttySC 243 0-7 serial

After:
cat /proc/tty/drivers | grep ttySC
sc16is7xx /dev/ttySC 243 0-7 serial

Signed-off-by: Hugo Villeneuve <[email protected]>
---
drivers/tty/serial/sc16is7xx.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 97a97a4bd71a..3fb99b6929f3 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -350,6 +350,7 @@ static DECLARE_BITMAP(sc16is7xx_lines, SC16IS7XX_MAX_DEVS);

static struct uart_driver sc16is7xx_uart = {
.owner = THIS_MODULE,
+ .driver_name = SC16IS7XX_NAME,
.dev_name = "ttySC",
.nr = SC16IS7XX_MAX_DEVS,
};
--
2.39.2



2023-12-20 15:48:19

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 08/18] serial: sc16is7xx: add driver name to struct uart_driver

On Tue, Dec 19, 2023 at 12:18:52PM -0500, Hugo Villeneuve wrote:
> From: Hugo Villeneuve <[email protected]>
>
> Make sure that the driver name is displayed instead of "unknown" when
> displaying the driver infos:
>
> Before:
> cat /proc/tty/drivers | grep ttySC
> unknown /dev/ttySC 243 0-7 serial
>
> After:
> cat /proc/tty/drivers | grep ttySC
> sc16is7xx /dev/ttySC 243 0-7 serial

"Useless use of cat" (you can google for this phrase, it's famous).

grep ... /proc/...

will work :-)

Otherwise LGTM!

--
With Best Regards,
Andy Shevchenko



2023-12-20 16:25:44

by Hugo Villeneuve

[permalink] [raw]
Subject: Re: [PATCH 08/18] serial: sc16is7xx: add driver name to struct uart_driver

On Wed, 20 Dec 2023 17:48:03 +0200
Andy Shevchenko <[email protected]> wrote:

> On Tue, Dec 19, 2023 at 12:18:52PM -0500, Hugo Villeneuve wrote:
> > From: Hugo Villeneuve <[email protected]>
> >
> > Make sure that the driver name is displayed instead of "unknown" when
> > displaying the driver infos:
> >
> > Before:
> > cat /proc/tty/drivers | grep ttySC
> > unknown /dev/ttySC 243 0-7 serial
> >
> > After:
> > cat /proc/tty/drivers | grep ttySC
> > sc16is7xx /dev/ttySC 243 0-7 serial
>
> "Useless use of cat" (you can google for this phrase, it's famous).
>
> grep ... /proc/...
>
> will work :-)
>
> Otherwise LGTM!

Old habits die hard :)

Interesting read!

Will modify commit message in V2.

Thank you.

Hugo Villeneuve

2023-12-20 18:59:32

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH 08/18] serial: sc16is7xx: add driver name to struct uart_driver

On Wed, Dec 20, 2023 at 11:11:36AM -0500, Hugo Villeneuve wrote:
> On Wed, 20 Dec 2023 17:48:03 +0200
> Andy Shevchenko <[email protected]> wrote:
> > On Tue, Dec 19, 2023 at 12:18:52PM -0500, Hugo Villeneuve wrote:

...

> > "Useless use of cat" (you can google for this phrase, it's famous).

> Interesting read!

Yep! Then there are categories: (instead of "cat" you may use) "grep", "gzip"
(e.g., better use zless / zgrep) and so on :-)

--
With Best Regards,
Andy Shevchenko