mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v2] printk: Fix preferred console selection with multiple matches
Date: Tue, 07 Jan 2020 11:50:42 +1100	[thread overview]
Message-ID: <6add0295e8790aef8df50d14b1bb607f5581687b.camel@kernel.crashing.org> (raw)
In-Reply-To: <20200106102537.nirnfcauqdh4olgv@pathway.suse.cz>

On Mon, 2020-01-06 at 11:25 +0100, Petr Mladek wrote:
> 
> I agree that the enums are more self-descriptive. My problem with it is
> that there are 5 values. I wanted to check how they were handled
> and neither 'con_matched' nor 'con_failed' were later used.
> 
> I though how to improve it. And I ended with feeling that the enum
> did more harm then good. -E??? codes are a bit less descriptive
> but there are only two. The meaning can be explained easily by
> a comment above the function.
> 
> If you want to keep the enum then please handle the return values
> by switch(). Or make it clear that all possible return values
> are handled properly.

Agreed. The enum was originally due to me trying to figure out all the
different cases happening separately from how we react to them. In fact
I'm not even convinced we don't have bugs in the latter (the failure
path of Braille consoles is dubious).

In any case, I'm back now, I'll try to respin this week.

Cheers,
Ben.


  reply	other threads:[~2020-01-07  0:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16  1:08 Benjamin Herrenschmidt
2019-12-17  5:45 ` Sergey Senozhatsky
2019-12-19 13:50 ` Petr Mladek
2019-12-19 21:48   ` Benjamin Herrenschmidt
2019-12-20  9:11     ` Petr Mladek
2020-01-06  5:15       ` Sergey Senozhatsky
2020-01-06 10:25         ` Petr Mladek
2020-01-07  0:50           ` Benjamin Herrenschmidt [this message]
2020-01-07  5:19           ` Sergey Senozhatsky

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=6add0295e8790aef8df50d14b1bb607f5581687b.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome