* [PATCH] ps3disk: Remove superfluous cast
@ 2008-04-23 12:00 Geert Uytterhoeven
2008-04-27 10:35 ` Jens Axboe
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2008-04-23 12:00 UTC (permalink / raw)
To: Jens Axboe
Cc: Andrew Morton, Christoph Hellwig, Linux Kernel Development,
Cell Broadband Engine OSS Development
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1592 bytes --]
As ps3disk is a ppc64-only driver, sector_t equals to unsigned long, and the
cast is not needed.
Reuse in another (possibly 32-bit) driver is protected by the safety net called
`compiler warning' (with the cast, it may silently truncate to 32-bit).
If sector_t ever changes, we will get a compiler warning as well (with the
cast, we won't).
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Christoph Hellwig <hch@lst.de>
---
Please apply, thx!
drivers/block/ps3disk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -102,8 +102,7 @@ static void ps3disk_scatter_gather(struc
dev_dbg(&dev->sbd.core,
"%s:%u: bio %u: %u segs %u sectors from %lu\n",
__func__, __LINE__, i, bio_segments(iter.bio),
- bio_sectors(iter.bio),
- (unsigned long)iter.bio->bi_sector);
+ bio_sectors(iter.bio), iter.bio->bi_sector);
size = bvec->bv_len;
buf = bvec_kmap_irq(bvec, &flags);
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · BIC GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ps3disk: Remove superfluous cast
2008-04-23 12:00 [PATCH] ps3disk: Remove superfluous cast Geert Uytterhoeven
@ 2008-04-27 10:35 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2008-04-27 10:35 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Andrew Morton, Christoph Hellwig, Linux Kernel Development,
Cell Broadband Engine OSS Development
On Wed, Apr 23 2008, Geert Uytterhoeven wrote:
> As ps3disk is a ppc64-only driver, sector_t equals to unsigned long, and the
> cast is not needed.
>
> Reuse in another (possibly 32-bit) driver is protected by the safety net called
> `compiler warning' (with the cast, it may silently truncate to 32-bit).
> If sector_t ever changes, we will get a compiler warning as well (with the
> cast, we won't).
>
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Acked-by: Christoph Hellwig <hch@lst.de>
> ---
> Please apply, thx!
Applied
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ps3disk: Remove superfluous cast
@ 2007-10-12 14:14 Geert Uytterhoeven
0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2007-10-12 14:14 UTC (permalink / raw)
To: Jens Axboe; +Cc: Linux Kernel Development, Linux/PPC Development
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1373 bytes --]
ps3disk: Remove a superfluous cast
As ps3disk is a ppc64-only driver, sector_t equals to unsigned long.
Future {re,ab}use is protected by the safety net called `compiler warning'.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
drivers/block/ps3disk.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -102,8 +102,7 @@ static void ps3disk_scatter_gather(struc
dev_dbg(&dev->sbd.core,
"%s:%u: bio %u: %u segs %u sectors from %lu\n",
__func__, __LINE__, i, bio_segments(iter.bio),
- bio_sectors(iter.bio),
- (unsigned long)iter.bio->bi_sector);
+ bio_sectors(iter.bio), iter.bio->bi_sector);
size = bvec->bv_len;
buf = bvec_kmap_irq(bvec, &flags);
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-27 10:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 12:00 [PATCH] ps3disk: Remove superfluous cast Geert Uytterhoeven
2008-04-27 10:35 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2007-10-12 14:14 Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox