[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080906105757.00badd4f@mjolnir.drzeus.cx>
Date: Sat, 6 Sep 2008 10:57:57 +0200
From: Pierre Ossman <drzeus-list@...eus.cx>
To: James Bottomley <James.Bottomley@...senPartnership.com>
Cc: Matthew Wilcox <matthew@....cx>, Simon Arlott <simon@...e.lp0.eu>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-scsi <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH] mmc_block: use generic helper to print capacities
On Fri, 05 Sep 2008 16:03:54 -0500
James Bottomley <James.Bottomley@...senPartnership.com> wrote:
>
> Oh ... your inline attached patch is actually whitespace broken (it has
> spaces for tabs), which is why it doesn't apply. Sorry, that's the
> first thing I usually check, I just skipped it in your case. Could you
> resend it as an attachment?
>
What the... It seems someone broke git-diff (or less). This one is
properly undamaged:
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 62a4c91..dad8edb 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -29,6 +29,7 @@
#include <linux/blkdev.h>
#include <linux/mutex.h>
#include <linux/scatterlist.h>
+#include <linux/string_helpers.h>
#include <linux/mmc/card.h>
#include <linux/mmc/host.h>
@@ -496,6 +497,8 @@ static int mmc_blk_probe(struct mmc_card *card)
struct mmc_blk_data *md;
int err;
+ char cap_str[10];
+
/*
* Check that the card supports the command class(es) we need.
*/
@@ -510,10 +513,11 @@ static int mmc_blk_probe(struct mmc_card *card)
if (err)
goto out;
- printk(KERN_INFO "%s: %s %s %lluKiB %s\n",
+ string_get_size(get_capacity(md->disk) << 9, STRING_UNITS_2,
+ cap_str, sizeof(cap_str));
+ printk(KERN_INFO "%s: %s %s %s %s\n",
md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
- (unsigned long long)(get_capacity(md->disk) >> 1),
- md->read_only ? "(ro)" : "");
+ cap_str, md->read_only ? "(ro)" : "");
mmc_set_drvdata(card, md);
add_disk(md->disk);
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)
Powered by blists - more mailing lists