Messages in this thread | | | From | Duncan Sands <> | Subject | Re: [linux-usb-devel] [PATCH 7/9] USB usbfs: destroy submitted urbs only on the disconnected interface | Date | Wed, 14 Apr 2004 17:39:56 +0200 |
| |
On Wednesday 14 April 2004 17:33, Oliver Neukum wrote: > > > Well, I don't. If you care about it, add a WARN_ON(). > > > Checking without consequences is bad. > > > > Hi Oliver, how about this instead? > > [..] > > > - clear_bit(intf->cur_altsetting->desc.bInterfaceNumber, &ps->ifclaimed); > > + if (ifnum < 8*sizeof(ps->ifclaimed)) > > + clear_bit(ifnum, &ps->ifclaimed); > > + else > > + warn("interface number %u out of range", ifnum); > > + > > I would prefer a real WARN_ON() so that the imbedded people compiling > for size are not affected.
What do you mean? How is a real WARN_ON() better?
Duncan. - 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/
| |