s390/con3215: Use macros for hardcoded values
PATCH v2 1/1 s390/con3215: Use macros for hardcoded values
Similar as in sclp_vt220
v2: fix RAW3215_CONSOLE_NAME
---
Trivial, but uncompiled!!
Now easier to read/find:
$ git grep -E "define.*(DEVICE|CONSOLE)_NAME"
con3215.c:#define RAW3215_DEVICE_NAME "ttyS"
con3215.c:#define RAW3215_CONSOLE_NAME "ttyS"
con3270.c:#define TTY3270_DEVICE_NAME "3270/tty"
con3270.c:#define TTY3270_CONSOLE_NAME "tty3270"
sclp_tty.c:#define SCLP_TTY_DEVICE_NAME "sclp_line"
sclp_con.c:#define SCLP_TTY_CONSOLE_NAME "ttyS"
sclp_vt220.c:#define SCLP_VT220_DEVICE_NAME "ttysclp"
sclp_vt220.c:#define SCLP_VT220_CONSOLE_NAME "ttysclp"
--- drivers/s390/char/con3215.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/s390/char/con3215.c +11 -5
@@ -35,6 +35,12 @@#include "ctrlchar.h" +#define RAW3215_MAJOR TTY_MAJOR +#define RAW3215_MINOR 64 +#define RAW3215_DRIVER_NAME "tty3215" +#define RAW3215_DEVICE_NAME "ttyS" +#define RAW3215_CONSOLE_NAME "ttyS" +#define NR_3215 1#define NR_3215_REQ (4*NR_3215)#define RAW3215_BUFFER_SIZE 65536/* output buffer size */
@@ -887,7 +893,7 @@ static struct notifier_block on_reboot_nb = {* The console structure for the 3215 console */ static struct console con3215 = { - .name ="ttyS" , + .name =RAW3215_CONSOLE_NAME , .write = con3215_write, .device = con3215_device, .flags =CON_PRINTBUFFER ,
@@ -1168,10 +1174,10 @@ static int __init tty3215_init(void)* proc_entry, set_termios, flush_buffer, set_ldisc, write_proc */ - driver->driver_name ="tty3215" ; - driver->name ="ttyS" ; - driver->major =TTY_MAJOR ; - driver->minor_start =64 ; + driver->driver_name =RAW3215_DRIVER_NAME ; + driver->name =RAW3215_DEVICE_NAME ; + driver->major =RAW3215_MAJOR ; + driver->minor_start =RAW3215_MINOR ; driver->type =TTY_DRIVER_TYPE_SYSTEM ; driver->subtype =SYSTEM_TYPE_TTY ; driver->init_termios = tty_std_termios;
Signature · 1 line
2.50.0
Heiko Carstens
maintainerQuoted 11 lines · Xose Vazquez Perez
Similar as in
sclp_vt220v2: fix
RAW3215_CONSOLE_NAMECc Heiko Carstens <[email protected]> (maintainer:S390 ARCHITECTURE,commit_signer:1/2=50%)Cc Vasily Gorbik <[email protected]> (maintainer:S390 ARCHITECTURE)Cc Alexander Gordeev <[email protected]> (maintainer:S390 ARCHITECTURE)Cc Christian Borntraeger <[email protected]> (reviewer:S390 ARCHITECTURE)Cc Sven Schnelle <[email protected]> (reviewer:S390 ARCHITECTURE,commit_signer:1/2=50%)Cc S390 ML <[email protected]> (open list:S390 ARCHITECTURESigned-off-by Xose Vazquez Perez <[email protected]>
Quoted 3 lines
--- drivers/s390/char/con3215.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
This, and the other patches you sent, are just pointless code churn, may introduce subtle bugs (trivial and v2...) and eat up maintainer's time.
If this would come together in the context of meaningful code changes this would be a different story.
Therefore NAK for all of the patches.