[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49F829C5.4080501@kernel.org>
Date: Wed, 29 Apr 2009 19:19:49 +0900
From: Tejun Heo <tj@...nel.org>
To: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
CC: axboe@...nel.dk, linux-kernel@...r.kernel.org, jeff@...zik.org,
linux-ide@...r.kernel.org, James.Bottomley@...senPartnership.com,
linux-scsi@...r.kernel.org, bzolnier@...il.com,
petkovbb@...glemail.com, sshtylyov@...mvista.com,
mike.miller@...com, chirag.kantharia@...com, Eric.Moore@....com,
stern@...land.harvard.edu, fujita.tomonori@....ntt.co.jp,
zaitcev@...hat.com, sfr@...b.auug.org.au,
grant.likely@...retlab.ca, paul.clements@...eleye.com,
jesper.juhl@...il.com, tim@...erelk.net, jeremy@...source.com,
adrian@...en.demon.co.uk, oakad@...oo.com, dwmw2@...radead.org,
schwidefsky@...ibm.com, ballabio_dario@....com,
davem@...emloft.net, rusty@...tcorp.com.au,
Markus.Lidel@...dowconnect.com, bharrosh@...asas.com,
Jeff Garzik <jgarzik@...ox.com>
Subject: Re: [PATCH 05/10] block: convert to pos and nr_sectors accessors
Hello,
Geert Uytterhoeven wrote:
>> diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
>> index b66ad58..d4e6b71 100644
>> --- a/drivers/block/z2ram.c
>> +++ b/drivers/block/z2ram.c
>> @@ -71,12 +71,12 @@ static void do_z2_request(struct request_queue *q)
>> {
>> struct request *req;
>> while ((req = elv_next_request(q)) != NULL) {
>> - unsigned long start = req->sector << 9;
>> - unsigned long len = req->current_nr_sectors << 9;
>> + unsigned long start = blk_rq_pos(req) << 9;
>> + unsigned long len = blk_rq_cur_sectors(req) << 9;
> ^^^^^^^^^^^^^
> I guess this one can become `unsigned int' now, as:
>
> static inline unsigned int blk_rq_cur_sectors(struct request *rq)
> {
> return blk_rq_cur_bytes(rq) >> 9;
> }
>
> and blk_rq_cur_bytes(rq) returns `int', so it must fit in an `int' anyway?
Yeap, it should fit. Given the way len is used there and the previous
usage had the same type promotion there, I think it's better to leave
the unsigned long alone there.
Acked-by added. Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists