aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAlexander Viro <viro@www.linux.org.uk>2004-06-03 05:40:27 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-03 05:40:27 -0700
commitaff8ccb8d2b9b77338c0e5ce327072b716a345bb (patch)
tree18325d5ba27ddcf946028bebaea9fa66149717ea /sound
parent239429ed4df62b88b0f418d7e90fd717960684b9 (diff)
downloadhistory-aff8ccb8d2b9b77338c0e5ce327072b716a345bb.tar.gz
[PATCH] sparse: the rest of sound/* annotation
Remaining bits and pieces in sound/oss annotated. At that point sound/* is done - we have no noise warnings left there.
Diffstat (limited to 'sound')
-rw-r--r--sound/oss/awe_wave.c4
-rw-r--r--sound/oss/kahlua.c2
-rw-r--r--sound/oss/opl3.c8
3 files changed, 9 insertions, 5 deletions
diff --git a/sound/oss/awe_wave.c b/sound/oss/awe_wave.c
index e53bd26297985f..f49a2dee426e96 100644
--- a/sound/oss/awe_wave.c
+++ b/sound/oss/awe_wave.c
@@ -3344,10 +3344,10 @@ readbuf_word(int pos)
/* read from user buffer */
if (readbuf_flags & AWE_SAMPLE_8BITS) {
unsigned char cc;
- get_user(cc, (unsigned __user char*)(readbuf_addr + readbuf_offs + pos));
+ get_user(cc, (unsigned char __user *)(readbuf_addr + readbuf_offs + pos));
c = (unsigned short)cc << 8; /* convert 8bit -> 16bit */
} else {
- get_user(c, (unsigned __user short*)(readbuf_addr + readbuf_offs + pos * 2));
+ get_user(c, (unsigned short __user *)(readbuf_addr + readbuf_offs + pos * 2));
}
if (readbuf_flags & AWE_SAMPLE_UNSIGNED)
c ^= 0x8000; /* unsigned -> signed */
diff --git a/sound/oss/kahlua.c b/sound/oss/kahlua.c
index c09ea8827fea60..2c072252547f42 100644
--- a/sound/oss/kahlua.c
+++ b/sound/oss/kahlua.c
@@ -218,7 +218,7 @@ static int __init kahlua_init_module(void)
static void __devexit kahlua_cleanup_module(void)
{
- return pci_unregister_driver(&kahlua_driver);
+ pci_unregister_driver(&kahlua_driver);
}
diff --git a/sound/oss/opl3.c b/sound/oss/opl3.c
index c69c135a949c00..9789c5ab29cd1a 100644
--- a/sound/oss/opl3.c
+++ b/sound/oss/opl3.c
@@ -822,7 +822,7 @@ static void opl3_hw_control(int dev, unsigned char *event)
{
}
-static int opl3_load_patch(int dev, int format, const char *addr,
+static int opl3_load_patch(int dev, int format, const char __user *addr,
int offs, int count, int pmgr_flag)
{
struct sbi_instrument ins;
@@ -833,7 +833,11 @@ static int opl3_load_patch(int dev, int format, const char *addr,
return -EINVAL;
}
- if(copy_from_user(&((char *) &ins)[offs], &(addr)[offs], sizeof(ins) - offs))
+ /*
+ * What the fuck is going on here? We leave junk in the beginning
+ * of ins and then check the field pretty close to that beginning?
+ */
+ if(copy_from_user(&((char *) &ins)[offs], addr + offs, sizeof(ins) - offs))
return -EFAULT;
if (ins.channel < 0 || ins.channel >= SBFM_MAXINSTR)