From: Connor Hansen <cmdkhh@gmail.com>
To: davem@davemloft.net
Cc: bp@alien8.de, linux-ide@vger.kernel.org,
linux-kernel@vger.kernel.org, Connor Hansen <cmdkhh@gmail.com>
Subject: [PATCH] ide-cd: signedness warning fix again
Date: Wed, 1 Jun 2011 22:52:05 -0700 [thread overview]
Message-ID: <1306993925-26044-1-git-send-email-cmdkhh@gmail.com> (raw)
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>
---
drivers/ide/ide-cd.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 5d17ab4..0a61f63 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -778,7 +778,8 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
sector_t block)
{
struct ide_cmd cmd;
- int uptodate = 0, nsectors;
+ int uptodate = 0;
+ unsigned int nsectors;
ide_debug_log(IDE_DBG_RQ, "cmd: 0x%x, block: %llu",
rq->cmd[0], (unsigned long long)block);
--
1.7.4.4
next reply other threads:[~2011-06-02 5:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 5:52 Connor Hansen [this message]
2011-06-11 22:07 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306993925-26044-1-git-send-email-cmdkhh@gmail.com \
--to=cmdkhh@gmail.com \
--cc=bp@alien8.de \
--cc=davem@davemloft.net \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome