All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH v2 1/2] mtd-utils: nanddump/nandwrite: style, signed-ness, printing fixups
Date: Thu, 21 Oct 2010 08:54:06 -0700	[thread overview]
Message-ID: <4CC0621E.9040102@gmail.com> (raw)
In-Reply-To: <AANLkTikthtaMh0qjFVLu29ZbageANnd_JsbB7wLqiMSM@mail.gmail.com>

Hi,

I just want to be clear in communication this time, so I have a few
clarification questions.

On 10/21/2010 12:37 AM, Mike Frysinger wrote:
> On Thu, Oct 21, 2010 at 03:19, Brian Norris wrote:
>> There were some signed/unsigned integer comparisons. Their types were
>> changed for safety. Also, "strtol" was improperly used for unsigned
>> data types.
> 
> dont really like these being merged, but that's obviously Artem's call, not mine

What exactly do you not like? The use of unsigned types, the use of
strtoul, a lack of consistency, or something else? I'm open to changing
my type usages if you have ideas that make more sense.

>> -       while (lx < (linebuflen - 1) && lx < (ascii_column - 1))
>> +       do {
>>                linebuf[lx++] = ' ';
>> +       } while (lx < (linebuflen - 1) && lx < (ascii_column - 1));
> 
> hmm, unrelated to your changes, but i'm pretty sure this can be
> rewritten into a sprintf ...
>   sprintf(linebuf + lx, "%*s", (linebuflen - 1) - lx, "")
> and integrating the ascii_column stuff too.  or maybe that's too complicated.


I can look try that in the future. You're probably right though. When I
wrote this, I really just copied/pasted/fixed the library hexdump code
from the linux kernel, so I didn't spend time making it the simplest
possible.

Thanks,
Brian

  reply	other threads:[~2010-10-21 15:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20  6:45 [PATCH 1/2] mtd-utils: more style fixups Brian Norris
2010-10-20  6:45 ` [PATCH 2/2] mtd-utils: nanddump: add 64-bit support, utilize libmtd Brian Norris
2010-10-20  7:01   ` Mike Frysinger
2010-10-20 14:03     ` Brian Norris
2010-10-20 18:26       ` Mike Frysinger
2010-10-21  7:19     ` [PATCH v2 0/2] mtd-utils fixups Brian Norris
2010-10-21  7:19       ` [PATCH v2 1/2] mtd-utils: nanddump/nandwrite: style, signed-ness, printing fixups Brian Norris
2010-10-21  7:37         ` Mike Frysinger
2010-10-21 15:54           ` Brian Norris [this message]
2010-10-21 19:45             ` Mike Frysinger
2010-10-25 19:15         ` Artem Bityutskiy
2010-10-28  1:08           ` Brian Norris
2010-10-21  7:19       ` [PATCH v2 2/2] mtd-utils: nanddump: add 64-bit support, utilize libmtd Brian Norris
2010-10-25 19:20         ` Artem Bityutskiy
2010-10-25 19:54           ` Mike Frysinger
2010-10-26  9:45             ` Artem Bityutskiy
2010-10-21  7:37       ` [PATCH v2 0/2] mtd-utils fixups Mike Frysinger
2010-10-20  6:58 ` [PATCH 1/2] mtd-utils: more style fixups Mike Frysinger

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=4CC0621E.9040102@gmail.com \
    --to=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vapier.adi@gmail.com \
    /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.