From: David Woodhouse <dwmw2@infradead.org>
To: Artem Bityutskiy <dedekind@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2] MTD: fix m25p80 64-bit divisions
Date: Thu, 18 Dec 2008 11:50:34 +0000 [thread overview]
Message-ID: <1229601034.4619.987.camel@macbook.infradead.org> (raw)
In-Reply-To: <20081218110927.29710.97896.sendpatchset@localhost.localdomain>
On Thu, 2008-12-18 at 13:09 +0200, Artem Bityutskiy wrote:
>
> - dev_info(&spi->dev, "%s (%d Kbytes)\n", info->name,
> - flash->mtd.size / 1024);
> + dev_info(&spi->dev, "%s (%llu Kbytes)\n", info->name,
> + flash->mtd.size >> 10);
You can't assume that a uint64_t is unsigned long long. Sometimes it's
just a long.
I don't think we have format specifiers for uint64_t; I think the best
way to do it is still to cast the argument to unsigned long long:
- dev_info(&spi->dev, "%s (%d Kbytes)\n", info->name,
- flash->mtd.size / 1024);
+ dev_info(&spi->dev, "%s (%llu Kbytes)\n", info->name,
+ (unsigned long long)flash->mtd.size >> 10);
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
prev parent reply other threads:[~2008-12-18 11:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-18 11:09 [PATCH v2] MTD: fix m25p80 64-bit divisions Artem Bityutskiy
2008-12-18 11:50 ` David Woodhouse [this message]
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=1229601034.4619.987.camel@macbook.infradead.org \
--to=dwmw2@infradead.org \
--cc=dedekind@infradead.org \
--cc=linux-mtd@lists.infradead.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