Skip to content

Commit 3307d0d

Browse files
Connor Hansendavem330
authored andcommitted
ide-cd: signedness warning fix again
One of the legit warnings 'make W=3 drivers/ide/ide-cd.c' generates is: drivers/ide/ide-cd.c: In function ide_cd_do_request drivers/ide/ide-cd.c:828:2: warning: conversion to int from \ unsigned int may change the sign of the result drivers/ide/ide-cd.c:833:2: warning: conversion to int from \ unsigned int may change the sign of the result nsectors is declared int, should be unsigned int. blk_rq_sectors() returns unsigned int, and ide_complete_rq expects unsigned int as well. Fixes both warnings. Signed-off-by: Connor Hansen <cmdkhh@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 56a2105 commit 3307d0d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/ide/ide-cd.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,8 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
778778
sector_t block)
779779
{
780780
struct ide_cmd cmd;
781-
int uptodate = 0, nsectors;
781+
int uptodate = 0;
782+
unsigned int nsectors;
782783

783784
ide_debug_log(IDE_DBG_RQ, "cmd: 0x%x, block: %llu",
784785
rq->cmd[0], (unsigned long long)block);

0 commit comments

Comments
 (0)