All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH v1 0/6] console: unify return codes from ->setup() hook
Date: Fri, 19 Jun 2020 11:28:22 +0900	[thread overview]
Message-ID: <20200619022822.GA310968@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <20200618164751.56828-1-andriy.shevchenko@linux.intel.com>

On (20/06/18 19:47), Andy Shevchenko wrote:
> Some of the console providers treat error code, returned by ->setup() hook,
> differently. Here is the unification of the behaviour.
> 
> The drivers checked by one of the below criteria:
> 1/ the driver has explicit struct console .setup assignment
> 2/ the driver has assigned callback to the setup member
> 
> All such drivers were read in order to see if there is any problematic return
> codes, and fixed accordingly which is this series in the result.
> 
> Andy Shevchenko (6):
>   mips: Return proper error code from console ->setup() hook
>   serial: sunsab: Return proper error code from console ->setup() hook
>   serial: sunzilog: Return proper error code from console ->setup() hook
>   tty: hvc: Return proper error code from console ->setup() hook
>   console: Propagate error code from console ->setup()
>   console: Fix trivia typo 'change' -> 'chance'
> 
>  arch/mips/fw/arc/arc_con.c    | 4 +++-
>  drivers/tty/hvc/hvsi.c        | 2 +-
>  drivers/tty/serial/sunsab.c   | 2 +-
>  drivers/tty/serial/sunzilog.c | 2 +-
>  kernel/printk/printk.c        | 8 ++++----
>  5 files changed, 10 insertions(+), 8 deletions(-)

Looks good to me. I'd also, probably, unify the naming. I can grep
71 foo_console_setup() and only 1 foo_setup_console().

---
 drivers/tty/hvc/hvc_xen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index 5ef08905fe05..2a0e51a20e34 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -603,7 +603,7 @@ static void xen_hvm_early_write(uint32_t vtermno, const char *str, int len) { }
 #endif
 
 #ifdef CONFIG_EARLY_PRINTK
-static int __init xenboot_setup_console(struct console *console, char *string)
+static int __init xenboot_console_setup(struct console *console, char *string)
 {
 	static struct xencons_info xenboot;
 
@@ -647,7 +647,7 @@ static void xenboot_write_console(struct console *console, const char *string,
 struct console xenboot_console = {
 	.name		= "xenboot",
 	.write		= xenboot_write_console,
-	.setup		= xenboot_setup_console,
+	.setup		= xenboot_console_setup,
 	.flags		= CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
 	.index		= -1,
 };
-- 
2.27.0

  parent reply	other threads:[~2020-06-19  2:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 16:47 [PATCH v1 0/6] console: unify return codes from ->setup() hook Andy Shevchenko
2020-06-18 16:47 ` [PATCH v1 1/6] mips: Return proper error code from console " Andy Shevchenko
2020-06-19  8:37   ` Thomas Bogendoerfer
2020-06-22  4:50   ` Jiri Slaby
2020-06-22 14:36     ` Andy Shevchenko
2020-06-18 16:47 ` [PATCH v1 2/6] serial: sunsab: " Andy Shevchenko
2020-06-19  2:50   ` David Miller
2020-06-18 16:47 ` [PATCH v1 3/6] serial: sunzilog: " Andy Shevchenko
2020-06-19  2:50   ` David Miller
2020-06-18 16:47 ` [PATCH v1 4/6] tty: hvc: " Andy Shevchenko
2020-06-18 16:47 ` [PATCH v1 5/6] console: Propagate error code from console ->setup() Andy Shevchenko
2020-06-19  3:17   ` Benjamin Herrenschmidt
2020-06-18 16:47 ` [PATCH v1 6/6] console: Fix trivia typo 'change' -> 'chance' Andy Shevchenko
2020-06-19  3:17   ` Benjamin Herrenschmidt
2020-06-19  2:28 ` Sergey Senozhatsky [this message]
2020-06-19  9:39 ` [PATCH v1 0/6] console: unify return codes from ->setup() hook Petr Mladek
2020-06-19  9:47   ` Andy Shevchenko
2020-06-19 10:21     ` Sergey Senozhatsky
2020-06-19 11:26       ` Petr Mladek
2020-06-19 17:25         ` Sergey Senozhatsky
2020-06-25 13:41 ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200619022822.GA310968@jagdpanzerIV.localdomain \
    --to=sergey.senozhatsky@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.