mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hannes Eder <hannes@hanneseder.net>
To: Takashi Iwai <tiwai@suse.de>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 6/7] sound/oss: fix sparse warnings: different signedness
Date: Wed, 25 Feb 2009 22:29:29 +0100	[thread overview]
Message-ID: <20090225212924.9226.68460.stgit@vmbox.hanneseder.net> (raw)
In-Reply-To: <20090225212551.9226.64699.stgit@vmbox.hanneseder.net>

Impact: Change signature of 'set_volume_stereo' and 'set_volume_mono'.

Fix this sparse warnings:
  sound/oss/pss.c:545:42: warning: incorrect type in argument 2 (different signedness)
  sound/oss/pss.c:546:42: warning: incorrect type in argument 3 (different signedness)
  sound/oss/pss.c:554:59: warning: incorrect type in argument 2 (different signedness)
  sound/oss/pss.c:560:59: warning: incorrect type in argument 2 (different signedness)
  sound/oss/pss.c:566:59: warning: incorrect type in argument 2 (different signedness)

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---
 sound/oss/pss.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/oss/pss.c b/sound/oss/pss.c
index 902b39e..83f5ee2 100644
--- a/sound/oss/pss.c
+++ b/sound/oss/pss.c
@@ -457,10 +457,9 @@ static void pss_mixer_reset(pss_confdata *devc)
 	}
 }
 
-static int set_volume_mono(unsigned __user *p, int *aleft)
+static int set_volume_mono(unsigned __user *p, unsigned int *aleft)
 {
-	int left;
-	unsigned volume;
+	unsigned int left, volume;
 	if (get_user(volume, p))
 		return -EFAULT;
 	
@@ -471,10 +470,11 @@ static int set_volume_mono(unsigned __user *p, int *aleft)
 	return 0;
 }
 
-static int set_volume_stereo(unsigned __user *p, int *aleft, int *aright)
+static int set_volume_stereo(unsigned __user *p,
+			     unsigned int *aleft,
+			     unsigned int *aright)
 {
-	int left, right;
-	unsigned volume;
+	unsigned int left, right, volume;
 	if (get_user(volume, p))
 		return -EFAULT;
 


  parent reply	other threads:[~2009-02-25 21:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25 21:26 [PATCH 0/7] sound: fix sparse warnings Hannes Eder
2009-02-25 21:26 ` [PATCH 1/7] sound/usb/usx2y: fix sparse warning: Should it be static? Hannes Eder
2009-02-25 21:28 ` [PATCH 2/7] sound/usb/usx2y: fix sparse warning: do-while statement is not a compound Hannes Eder
2009-02-25 21:28 ` [PATCH 3/7] sound/pci/hda: fix sparse warning: different signedness Hannes Eder
2009-02-25 21:28 ` [PATCH 4/7] sound/pci/emu10k1: " Hannes Eder
2009-02-25 21:29 ` [PATCH 5/7] sound/drivers/vx: " Hannes Eder
2009-02-25 21:29 ` Hannes Eder [this message]
2009-02-25 21:29 ` [PATCH 7/7] sound/oss: fix sparse warning: symbol shadows an earlier one Hannes Eder
2009-02-26  9:01 ` [PATCH 0/7] sound: fix sparse warnings Takashi Iwai

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=20090225212924.9226.68460.stgit@vmbox.hanneseder.net \
    --to=hannes@hanneseder.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®