public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Connor Hansen <cmdkhh@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Borislav Petkov <bp@alien8.de>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	Connor Hansen <cmdkhh@gmail.com>
Subject: [PATCH 2/2] ide-cd: Fix another signedness warning
Date: Mon, 30 May 2011 00:26:58 -0700	[thread overview]
Message-ID: <1306740418-565-1-git-send-email-cmdkhh@gmail.com> (raw)

One of the legit warnings 'make W=3 drivers/ide/ide-cd.o generates is

drivers/ide/ide-cd.c: In function ide_cd_queue_pc:
drivers/ide/ide-cd.c:451:3: warning: conversion to unsigned int from
      int may change the sign of the result

timeout is passed as an int, but is declared as an unsigned int in
struct request in include/linux/blkdev.h

Signed-off-by: Connor Hansen <cmdkhh@gmail.com>
---
 drivers/ide/ide-cd.c |    2 +-
 drivers/ide/ide-cd.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index c1de54a..f509db5 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -422,7 +422,7 @@ static void ide_cd_request_sense_fixup(ide_drive_t *drive, struct ide_cmd *cmd)
 
 int ide_cd_queue_pc(ide_drive_t *drive, const unsigned char *cmd,
 		    int write, void *buffer, unsigned *bufflen,
-		    struct request_sense *sense, int timeout,
+		    struct request_sense *sense, unsigned int timeout,
 		    unsigned int cmd_flags)
 {
 	struct cdrom_info *info = drive->driver_data;
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h
index 1efc936..24292ee 100644
--- a/drivers/ide/ide-cd.h
+++ b/drivers/ide/ide-cd.h
@@ -101,7 +101,7 @@ void ide_cd_log_error(const char *, struct request *, struct request_sense *);
 
 /* ide-cd.c functions used by ide-cd_ioctl.c */
 int ide_cd_queue_pc(ide_drive_t *, const unsigned char *, int, void *,
-		    unsigned *, struct request_sense *, int, unsigned int);
+		    unsigned *, struct request_sense *, unsigned int, unsigned int);
 int ide_cd_read_toc(ide_drive_t *, struct request_sense *);
 int ide_cdrom_get_capabilities(ide_drive_t *, u8 *);
 void ide_cdrom_update_speed(ide_drive_t *, u8 *);
-- 
1.7.4.4


             reply	other threads:[~2011-05-30  7:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30  7:26 Connor Hansen [this message]
2011-05-31 22:24 ` [PATCH 2/2] ide-cd: Fix another signedness warning 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=1306740418-565-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