Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ps3disk: Remove superfluous cast

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>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

authored by

Geert Uytterhoeven and committed by
Jens Axboe
31e103c5 1afb20f3

+1 -2
+1 -2
drivers/block/ps3disk.c
··· 102 102 dev_dbg(&dev->sbd.core, 103 103 "%s:%u: bio %u: %u segs %u sectors from %lu\n", 104 104 __func__, __LINE__, i, bio_segments(iter.bio), 105 - bio_sectors(iter.bio), 106 - (unsigned long)iter.bio->bi_sector); 105 + bio_sectors(iter.bio), iter.bio->bi_sector); 107 106 108 107 size = bvec->bv_len; 109 108 buf = bvec_kmap_irq(bvec, &flags);