All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: linux-mtd@lists.infradead.org,
	Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Subject: Re: [PATCHv2 2/2] mkfs.jffs2: fix casting of __off64_t
Date: Tue, 19 Apr 2011 09:43:49 +0300	[thread overview]
Message-ID: <1303195429.2779.2.camel@localhost> (raw)
In-Reply-To: <BANLkTinXxYy-rHEWz2D_c_s-wS8L3oy7-g@mail.gmail.com>

On Mon, 2011-04-18 at 17:33 -0400, Mike Frysinger wrote:
> On Mon, Apr 18, 2011 at 11:20, Andy Shevchenko wrote:
> > On Mon, 2011-04-18 at 10:57 -0400, ext Mike Frysinger wrote:
> >> so let's go with an explicitly 64bit printf modifier.
> >
> > Regarding to above I couldn't see any objection against %jd. At least
> > one for PRIu64 - it looks awful in code.
> 
> it doesnt make sense to me to pair a non-explicit sized format string
> with an explicit sized type.  off64_t is exactly 64bits, and PRIu64
> prints exactly 64bits.

Yes, I agree.

> that said, %ju is at least an improvement over the current code as
> well as the patch you've posted (doesnt seem to need casts on 32 or 64
> bit systems).  so if Artem is OK with that, i wont fight it.  even
> though it's still not as correct as my proposal :P.

To be frank, I do not care much :-) We are talking about a single place.
If Andy make a fix for all the mtd code, that would matter much much
more :-)

But yes, of course it is difficult to disagree that for explicitly sized
type it is saner to use explicit-size print placeholder.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

  reply	other threads:[~2011-04-19  6:46 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13 13:20 [PATCHv1 1/5] mkfs.jffs2: fix casting of printf argument Andy Shevchenko
2011-04-13 13:20 ` [PATCHv1 2/5] serve_image: adjust type for printf Andy Shevchenko
2011-04-14 12:25   ` Artem Bityutskiy
2011-04-13 13:20 ` [PATCHv1 3/5] tests: fs-tests: read() returns ssize_t value Andy Shevchenko
2011-04-14 12:26   ` Artem Bityutskiy
2011-04-13 13:20 ` [PATCHv1 4/5] tests: checkfs: adjust Makefile Andy Shevchenko
2011-04-14 12:28   ` Artem Bityutskiy
2011-04-13 13:20 ` [PATCHv1 5/5] tests: ubi-tests: clean libubi.a and *.o Andy Shevchenko
2011-04-14 12:30   ` Artem Bityutskiy
2011-04-14 12:24 ` [PATCHv1 1/5] mkfs.jffs2: fix casting of printf argument Artem Bityutskiy
2011-04-14 13:21   ` Andy Shevchenko
2011-04-18  8:31   ` [PATCHv2 1/2] serve_image: adjust classificator and type for printf Andy Shevchenko
2011-04-18  8:31     ` [PATCHv2 2/2] mkfs.jffs2: fix casting of __off64_t Andy Shevchenko
2011-04-18 13:49       ` Mike Frysinger
2011-04-18 13:55         ` Artem Bityutskiy
2011-04-18 14:04           ` Mike Frysinger
2011-04-18 14:07             ` Artem Bityutskiy
2011-04-18 14:21               ` Mike Frysinger
2011-04-18 14:29                 ` Artem Bityutskiy
2011-04-18 14:26               ` Andy Shevchenko
2011-04-18 14:29                 ` Mike Frysinger
2011-04-18 14:50                   ` Andy Shevchenko
2011-04-18 14:57                     ` Mike Frysinger
2011-04-18 15:20                       ` Andy Shevchenko
2011-04-18 21:33                         ` Mike Frysinger
2011-04-19  6:43                           ` Artem Bityutskiy [this message]
2011-04-19  8:34                             ` [PATCHv3 1/3] " Andy Shevchenko
2011-04-19  8:34                               ` [PATCHv3 2/3] libmtd: use PRIu64 classifier for uint64_t printf arguments Andy Shevchenko
2011-04-19  8:34                               ` [PATCHv3 3/3] serve_image: adjust classifier and type for printf Andy Shevchenko
2011-04-19 14:26                                 ` Mike Frysinger
2011-04-19 14:32                                   ` Andy Shevchenko
2011-04-19 21:54                                     ` Mike Frysinger
2011-04-20  9:35                                       ` [PATCHv4 1/3] mkfs.jffs2: fix casting of __off64_t Andy Shevchenko
2011-04-20  9:35                                         ` [PATCHv4 2/3] libmtd: use PRIu64 classifier for uint64_t printf arguments Andy Shevchenko
2011-04-20  9:35                                         ` [PATCHv4 3/3] serve_image: adjust classifier and type for printf Andy Shevchenko
2011-04-20 19:04                                         ` [PATCHv4 1/3] mkfs.jffs2: fix casting of __off64_t Mike Frysinger
2011-04-21 12:53                                         ` Artem Bityutskiy
2011-04-21 17:09                                 ` [PATCH] serve_image: missing comma Brian Norris
2011-04-22  7:38                                   ` Artem Bityutskiy
2011-04-19 14:26                               ` [PATCHv3 1/3] mkfs.jffs2: fix casting of __off64_t Mike Frysinger
2011-04-19 14:29                                 ` Andy Shevchenko
2011-04-19 14:38                                   ` Mike Frysinger
2011-04-19 14:42                                     ` Andy Shevchenko
2011-04-18 13:50     ` [PATCHv2 1/2] serve_image: adjust classificator and type for printf 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=1303195429.2779.2.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=ext-andriy.shevchenko@nokia.com \
    --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.