mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Jason Wessel <jason.wessel@windriver.com>,
	kgdb-bugreport@lists.sourceforge.net,
	LKML <linux-kernel@vger.kernel.org>,
	Patch Tracking <patches@linaro.org>
Subject: Re: [PATCH v2 3/5] kdb: Remove special case logic from kdb_read()
Date: Thu, 10 Oct 2019 10:50:09 +0100	[thread overview]
Message-ID: <20191010095009.25a5zvoykpmvtktq@holly.lan> (raw)
In-Reply-To: <CAD=FV=UuLYPpkJBWbkWoJzv97A6jxRFa4QmmD-0chSrsuT_bPg@mail.gmail.com>

On Wed, Oct 09, 2019 at 10:28:36AM -0700, Doug Anderson wrote:
> On Wed, Oct 9, 2019 at 2:30 AM Daniel Thompson
> <daniel.thompson@linaro.org> wrote:
> > > > @@ -741,7 +732,7 @@ int vkdb_printf(enum kdb_msgsrc src, const char *fmt, va_list ap)
> > > >
> > > >         /* check for having reached the LINES number of printed lines */
> > > >         if (kdb_nextline >= linecount) {
> > > > -               char buf1[16] = "";
> > > > +               char ch;
> > >
> > > The type of "ch" should be the same as returned by kdb_getchar()?
> > > Either "int" if you're keeping it "int" or "unsigned char"?
> >
> > Probably... although the assumption that kdb strings are char * is burnt
> > in a lot of places so there will still be further tidy up needed.
> 
> True.  It doesn't matter a whole lot so if you think it's easier to
> keep it as char that's OK too.

After looking at it from a number of angles I think we can have this
match the return type of kdb_getchar()... but the best way to achieve
this is to make kdb_getchar() return a unqualified char.

That ends up consistent across the sub-system and shouldn't do any
narrowing that wouldn't already have been happening inside kdb_read().


Daniel.

  reply	other threads:[~2019-10-10  9:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 13:20 [PATCH v2 0/5] kdb: Cleanup code to read user input and handle escape sequences Daniel Thompson
2019-10-08 13:20 ` [PATCH v2 1/5] kdb: Tidy up code to " Daniel Thompson
2019-10-08 22:20   ` Doug Anderson
2019-10-08 13:20 ` [PATCH v2 2/5] kdb: Simplify code to fetch characters from console Daniel Thompson
2019-10-08 22:20   ` Doug Anderson
2019-10-08 13:20 ` [PATCH v2 3/5] kdb: Remove special case logic from kdb_read() Daniel Thompson
2019-10-08 22:21   ` Doug Anderson
2019-10-09  9:30     ` Daniel Thompson
2019-10-09 17:28       ` Doug Anderson
2019-10-10  9:50         ` Daniel Thompson [this message]
2019-10-08 13:20 ` [PATCH v2 4/5] kdb: Improve handling of characters from different input sources Daniel Thompson
2019-10-08 22:21   ` Doug Anderson
2019-10-08 13:20 ` [PATCH v2 5/5] kdb: Tweak escape handling for vi users Daniel Thompson
2019-10-08 22:21   ` Doug Anderson

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=20191010095009.25a5zvoykpmvtktq@holly.lan \
    --to=daniel.thompson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@linaro.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

all inboxes | Powered by JetHome®