[PATCH] USB set-bit takes a long tweaks

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Tue Apr 16 2002 - 04:16:01 EST


This removes gratuitous & operators in front of USB's
dev->bus->devmap.devicemap and state->unitbitmap, for bitops.

This just makes it so it doesn't warn when set_bit et. al take a
long...

No object code changes,
Rusty.

diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.8-pre3/drivers/usb/class/audio.c tmp/drivers/usb/class/audio.c
--- linux-2.5.8-pre3/drivers/usb/class/audio.c Wed Apr 10 21:47:50 2002
+++ tmp/drivers/usb/class/audio.c Wed Apr 10 23:25:34 2002
@@ -3523,7 +3523,7 @@
         unsigned char *p1;
         unsigned int i, j;
 
- if (test_and_set_bit(unitid, &state->unitbitmap)) {
+ if (test_and_set_bit(unitid, state->unitbitmap)) {
                 printk(KERN_INFO "usbaudio: mixer path revisits unit %d\n", unitid);
                 return;
         }
@@ -3613,7 +3613,7 @@
         state.buffer = buffer;
         state.buflen = buflen;
         state.ctrlif = ctrlif;
- set_bit(oterm[3], &state.unitbitmap); /* mark terminal ID as visited */
+ set_bit(oterm[3], state.unitbitmap); /* mark terminal ID as visited */
         printk(KERN_DEBUG "usbaudio: constructing mixer for Terminal %u type 0x%04x\n",
                oterm[3], oterm[4] | (oterm[5] << 8));
         usb_audio_recurseunit(&state, oterm[7]);
diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.8-pre3/drivers/usb/core/hub.c tmp/drivers/usb/core/hub.c
--- linux-2.5.8-pre3/drivers/usb/core/hub.c Wed Apr 10 21:47:50 2002
+++ tmp/drivers/usb/core/hub.c Wed Apr 10 23:24:06 2002
@@ -1122,7 +1122,7 @@
                                         dev->devpath,
                                         sizeof(dev->descriptor), ret);
         
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ clear_bit(dev->devnum, dev->bus->devmap.devicemap);
                         dev->devnum = -1;
                         return -EIO;
                 }
@@ -1131,7 +1131,7 @@
                 if (ret < 0) {
                         err("unable to get configuration (error=%d)", ret);
                         usb_destroy_configuration(dev);
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ clear_bit(dev->devnum, dev->bus->devmap.devicemap);
                         dev->devnum = -1;
                         return 1;
                 }
diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.8-pre3/drivers/usb/core/usb.c tmp/drivers/usb/core/usb.c
--- linux-2.5.8-pre3/drivers/usb/core/usb.c Wed Apr 10 21:47:50 2002
+++ tmp/drivers/usb/core/usb.c Wed Apr 10 23:23:10 2002
@@ -1784,7 +1784,7 @@
 
         /* Free the device number and remove the /proc/bus/usb entry */
         if (dev->devnum > 0) {
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ clear_bit(dev->devnum, dev->bus->devmap.devicemap);
                 usbfs_remove_device(dev);
                 put_device(&dev->dev);
         }
@@ -2484,7 +2484,7 @@
         if (err < 0) {
                 err("USB device not accepting new address=%d (error=%d)",
                         dev->devnum, err);
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ clear_bit(dev->devnum, dev->bus->devmap.devicemap);
                 dev->devnum = -1;
                 return 1;
         }
@@ -2497,7 +2497,7 @@
                         err("USB device not responding, giving up (error=%d)", err);
                 else
                         err("USB device descriptor short read (expected %i, got %i)", 8, err);
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ clear_bit(dev->devnum, dev->bus->devmap.devicemap);
                 dev->devnum = -1;
                 return 1;
         }
@@ -2512,7 +2512,7 @@
                         err("USB device descriptor short read (expected %Zi, got %i)",
                                 sizeof(dev->descriptor), err);
         
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ clear_bit(dev->devnum, dev->bus->devmap.devicemap);
                 dev->devnum = -1;
                 return 1;
         }
@@ -2521,7 +2521,7 @@
         if (err < 0) {
                 err("unable to get device %d configuration (error=%d)",
                         dev->devnum, err);
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ clear_bit(dev->devnum, dev->bus->devmap.devicemap);
                 dev->devnum = -1;
                 return 1;
         }
@@ -2531,7 +2531,7 @@
         if (err) {
                 err("failed to set device %d default configuration (error=%d)",
                         dev->devnum, err);
- clear_bit(dev->devnum, &dev->bus->devmap.devicemap);
+ clear_bit(dev->devnum, dev->bus->devmap.devicemap);
                 dev->devnum = -1;
                 return 1;
         }

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:14 EST