Skip to content

Commit 9bf7225

Browse files
author
Jens Axboe
committed
xsysace: end request handling fix
In ace_fsm_dostate(), the variable 'i' was used only for passing sector size of the request to end_that_request_first(). So I removed it and changed the code to pass the size in bytes directly to __blk_end_request() Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 parent 0ba6c33 commit 9bf7225

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎drivers/block/xsysace.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ static void ace_fsm_dostate(struct ace_device *ace)
483483
u32 status;
484484
u16 val;
485485
int count;
486-
int i;
487486

488487
#if defined(DEBUG)
489488
dev_dbg(ace->dev, "fsm_state=%i, id_req_count=%i\n",
@@ -688,7 +687,6 @@ static void ace_fsm_dostate(struct ace_device *ace)
688687
}
689688

690689
/* Transfer the next buffer */
691-
i = 16;
692690
if (ace->fsm_task == ACE_TASK_WRITE)
693691
ace->reg_ops->dataout(ace);
694692
else
@@ -702,8 +700,8 @@ static void ace_fsm_dostate(struct ace_device *ace)
702700
}
703701

704702
/* bio finished; is there another one? */
705-
i = ace->req->current_nr_sectors;
706-
if (__blk_end_request(ace->req, 0, i)) {
703+
if (__blk_end_request(ace->req, 0,
704+
blk_rq_cur_bytes(ace->req))) {
707705
/* dev_dbg(ace->dev, "next block; h=%li c=%i\n",
708706
* ace->req->hard_nr_sectors,
709707
* ace->req->current_nr_sectors);

0 commit comments

Comments
 (0)