* [PATCH] block/ps3vram: Use %llu to format sector_t after LBDAF removal
@ 2019-06-13 7:30 Geert Uytterhoeven
2019-06-13 9:18 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2019-06-13 7:30 UTC (permalink / raw)
To: Jim Paris, Geoff Levand, Jens Axboe, Christoph Hellwig
Cc: Geert Uytterhoeven, linux-block, Paul Mackerras, linuxppc-dev
The removal of CONFIG_LBDAF changed the type of sector_t from "unsigned
long" to "u64" aka "unsigned long long" on 64-bit platforms, leading to
a compiler warning regression:
drivers/block/ps3vram.c: In function ‘ps3vram_probe’:
drivers/block/ps3vram.c:770:23: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘sector_t {aka long long unsigned int}’ [-Wformat=]
Fix this by using "%llu" instead.
Fixes: 72deb455b5ec619f ("block: remove CONFIG_LBDAF")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/block/ps3vram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index 4c7f51b1eda94727..4628e1a27a2b7133 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -767,7 +767,7 @@ static int ps3vram_probe(struct ps3_system_bus_device *dev)
strlcpy(gendisk->disk_name, DEVICE_NAME, sizeof(gendisk->disk_name));
set_capacity(gendisk, priv->size >> 9);
- dev_info(&dev->core, "%s: Using %lu MiB of GPU memory\n",
+ dev_info(&dev->core, "%s: Using %llu MiB of GPU memory\n",
gendisk->disk_name, get_capacity(gendisk) >> 11);
device_add_disk(&dev->core, gendisk, NULL);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block/ps3vram: Use %llu to format sector_t after LBDAF removal
2019-06-13 7:30 [PATCH] block/ps3vram: Use %llu to format sector_t after LBDAF removal Geert Uytterhoeven
@ 2019-06-13 9:18 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-06-13 9:18 UTC (permalink / raw)
To: Geert Uytterhoeven, Jim Paris, Geoff Levand, Christoph Hellwig
Cc: linux-block, Paul Mackerras, linuxppc-dev
On 6/13/19 1:30 AM, Geert Uytterhoeven wrote:
> The removal of CONFIG_LBDAF changed the type of sector_t from "unsigned
> long" to "u64" aka "unsigned long long" on 64-bit platforms, leading to
> a compiler warning regression:
>
> drivers/block/ps3vram.c: In function ‘ps3vram_probe’:
> drivers/block/ps3vram.c:770:23: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘sector_t {aka long long unsigned int}’ [-Wformat=]
>
> Fix this by using "%llu" instead.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-13 9:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 7:30 [PATCH] block/ps3vram: Use %llu to format sector_t after LBDAF removal Geert Uytterhoeven
2019-06-13 9:18 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).