linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB set-bit takes a long tweaks
@ 2002-04-16  9:16 Rusty Russell
  2002-04-16 15:53 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2002-04-16  9:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: alan, sailer, bhards, greg, torvalds

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] USB set-bit takes a long tweaks
  2002-04-16  9:16 [PATCH] USB set-bit takes a long tweaks Rusty Russell
@ 2002-04-16 15:53 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2002-04-16 15:53 UTC (permalink / raw)
  To: Rusty Russell; +Cc: linux-kernel, alan, sailer, bhards, torvalds

On Tue, Apr 16, 2002 at 07:16:01PM +1000, Rusty Russell wrote:
> 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,

Thanks, I've applied this to my trees, and will include it in the next
round of changesets to Linus.


greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-16 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-16  9:16 [PATCH] USB set-bit takes a long tweaks Rusty Russell
2002-04-16 15:53 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).