patch-1.3.36 linux/drivers/sound/sequencer.c

Next file: linux/drivers/sound/sound_calls.h
Previous file: linux/drivers/sound/sb_dsp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.35/linux/drivers/sound/sequencer.c linux/drivers/sound/sequencer.c
@@ -156,7 +156,7 @@
   while (iqlen && c >= ev_len)
     {
 
-      memcpy_tofs (&((buf)[p]), (&iqueue[iqhead * IEV_SZ]), (ev_len));
+      memcpy_tofs (&((buf)[p]), &iqueue[iqhead * IEV_SZ], ev_len);
       p += ev_len;
       c -= ev_len;
 
@@ -286,7 +286,7 @@
 
   while (c >= 4)
     {
-      memcpy_fromfs ((event), &((buf)[p]), (4));
+      memcpy_fromfs (event, &((buf)[p]), 4);
       ev_code = event[0];
 
       if (ev_code == SEQ_FULLSIZE)
@@ -324,7 +324,7 @@
 	      return count - c;
 	    }
 
-	  memcpy_fromfs ((&event[4]), &((buf)[p + 4]), (4));
+	  memcpy_fromfs (&event[4], &((buf)[p + 4]), 4);
 
 	}
       else
@@ -1763,7 +1763,7 @@
 	struct synth_info inf;
 	int             dev;
 
-	memcpy_fromfs (((char *) &inf), &(((char *) arg)[0]), (sizeof (inf)));
+	memcpy_fromfs ((char *) &inf, &(((char *) arg)[0]), sizeof (inf));
 	dev = inf.device;
 
 	if (dev < 0 || dev >= max_synthdev)
@@ -1781,7 +1781,7 @@
 	struct seq_event_rec event;
 	unsigned long   flags;
 
-	memcpy_fromfs (((char *) &event), &(((char *) arg)[0]), (sizeof (event)));
+	memcpy_fromfs ((char *) &event, &(((char *) arg)[0]), sizeof (event));
 
 	save_flags (flags);
 	cli ();
@@ -1797,13 +1797,13 @@
 	struct midi_info inf;
 	int             dev;
 
-	memcpy_fromfs (((char *) &inf), &(((char *) arg)[0]), (sizeof (inf)));
+	memcpy_fromfs ((char *) &inf, &(((char *) arg)[0]), sizeof (inf));
 	dev = inf.device;
 
 	if (dev < 0 || dev >= max_mididev)
 	  return -ENXIO;
 
-	memcpy_tofs (&(((char *) arg)[0]), ((char *) &(midi_devs[dev]->info)), (sizeof (inf)));
+	memcpy_tofs ((&((char *) arg)[0]), (char *) &(midi_devs[dev]->info), sizeof (inf));
 	return 0;
       }
       break;
@@ -1813,17 +1813,13 @@
 	struct patmgr_info *inf;
 	int             dev, err;
 
-	if ((inf = (struct patmgr_info *) (
-					    {
-		      caddr_t x; x = kmalloc (sizeof (*inf), GFP_KERNEL); x;
-					    }
-	     )) == NULL)
+	if ((inf = (struct patmgr_info *) kmalloc (sizeof (*inf), GFP_KERNEL)) == NULL)
 	  {
 	    printk ("patmgr: Can't allocate memory for a message\n");
 	    return -EIO;
 	  }
 
-	memcpy_fromfs (((char *) inf), &(((char *) arg)[0]), (sizeof (*inf)));
+	memcpy_fromfs ((char *) inf, &(((char *) arg)[0]), sizeof (*inf));
 	dev = inf->device;
 
 	if (dev < 0 || dev >= num_synths)
@@ -1844,7 +1840,7 @@
 	    return err;
 	  }
 
-	memcpy_tofs (&(((char *) arg)[0]), ((char *) inf), (sizeof (*inf)));
+	memcpy_tofs ((&((char *) arg)[0]), (char *) inf, sizeof (*inf));
 	kfree (inf);
 	return 0;
       }
@@ -1855,17 +1851,13 @@
 	struct patmgr_info *inf;
 	int             dev, err;
 
-	if ((inf = (struct patmgr_info *) (
-					    {
-		      caddr_t x; x = kmalloc (sizeof (*inf), GFP_KERNEL); x;
-					    }
-	     )) == NULL)
+	if ((inf = (struct patmgr_info *) kmalloc (sizeof (*inf), GFP_KERNEL)) == NULL)
 	  {
 	    printk ("patmgr: Can't allocate memory for a message\n");
 	    return -EIO;
 	  }
 
-	memcpy_fromfs (((char *) inf), &(((char *) arg)[0]), (sizeof (*inf)));
+	memcpy_fromfs ((char *) inf, &(((char *) arg)[0]), sizeof (*inf));
 	dev = inf->device;
 
 	if (dev < 0 || dev >= num_synths)
@@ -1886,7 +1878,7 @@
 	    return err;
 	  }
 
-	memcpy_tofs (&(((char *) arg)[0]), ((char *) inf), (sizeof (*inf)));
+	memcpy_tofs ((&((char *) arg)[0]), (char *) inf, sizeof (*inf));
 	kfree (inf);
 	return 0;
       }
@@ -1991,7 +1983,7 @@
 
 
 void
-sequencer_timer (void)
+sequencer_timer (unsigned long dummy)
 {
   seq_startplay ();
 }
@@ -2087,23 +2079,13 @@
 
   sequencer_ok = 1;
 
-  {
-    caddr_t         ptr;
-
-    ptr = sound_mem_blocks[sound_num_blocks] = kmalloc (SEQ_MAX_QUEUE * EV_SZ, GFP_KERNEL);
-    if (sound_num_blocks < 1024)
-      sound_num_blocks++;
-    queue = (unsigned char *) ptr;
-  };
-
-  {
-    caddr_t         ptr;
-
-    ptr = sound_mem_blocks[sound_num_blocks] = kmalloc (SEQ_MAX_QUEUE * IEV_SZ, GFP_KERNEL);
-    if (sound_num_blocks < 1024)
-      sound_num_blocks++;
-    iqueue = (unsigned char *) ptr;
-  };
+  queue = (unsigned char *) (sound_mem_blocks[sound_num_blocks] = kmalloc (SEQ_MAX_QUEUE * EV_SZ, GFP_KERNEL));
+  if (sound_num_blocks < 1024)
+    sound_num_blocks++;;
+
+  iqueue = (unsigned char *) (sound_mem_blocks[sound_num_blocks] = kmalloc (SEQ_MAX_QUEUE * IEV_SZ, GFP_KERNEL));
+  if (sound_num_blocks < 1024)
+    sound_num_blocks++;;
 
   return mem_start;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this