kgdboc: Use for_each_console() helper
Subsystems (2)
PATCH 1/1 kgdboc: Use for_each_console() helper
Replace open coded single-linked list iteration loop with for_each_console() helper in use.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/tty/serial/kgdboc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/kgdboc.c +1 -3
@@ -169,15 +169,13 @@ static int configure_kgdboc(void)if (!p) goto noconfig; - cons = console_drivers; -while (cons) { +for_each_console (cons) {int idx;if (cons->device && cons->device (cons, &idx) == p && idx == tty_line) { kgdboc_io_ops.is_console =1 ;break ; } - cons = cons->next; } kgdb_tty_driver = p;
Signature · 1 line
2.24.1
Quoted 4 lines · Andy Shevchenko
Replace open coded single-linked list iteration loop with
for_each_console()helper in use.Signed-off-by Andy Shevchenko <[email protected]>
Acked-by Daniel Thompson <[email protected]>
Quoted 28 lines
--- drivers/tty/serial/kgdboc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/tty/serial/kgdboc.c +1
-3@@ -169,15 +169,13 @@ static int configure_kgdboc(void)if (!p) goto noconfig; - cons = console_drivers; -while (cons) { +for_each_console (cons) {int idx;if (cons->device && cons->device (cons, &idx) == p && idx == tty_line) { kgdboc_io_ops.is_console =1 ;break ; } - cons = cons->next; } kgdb_tty_driver = p;Signature · 1 line
2.24.1