On Thu, Nov 17, 2005 at 08:58:42PM +0100, Ingo Oeser wrote: > Hi, > > On Thursday 17 November 2005 17:25, Greg KH wrote: > > On Thu, Nov 17, 2005 at 10:55:33AM -0500, Alan Stern wrote: > > > On Wed, 16 Nov 2005, Greg KH wrote: > > > > +static int usb_create_newid_file(struct usb_driver *usb_drv) > > > > +{ > > > > + int error = 0; > > > > + > > > > + if (usb_drv->probe != NULL) > > > > + error = sysfs_create_file(&usb_drv->driver.kobj, > > > > + &driver_attr_new_id.attr); > > > > + return error; > > > > +} > > > > > > This deserves to be an inline function. > > Come on, this is just a gloryfied if :-) > > static inline int usb_create_newid_file(struct usb_driver *usb_drv) > { > if (usb_drv->probe != NULL) { > return sysfs_create_file(&usb_drv->driver.kobj, > &driver_attr_new_id.attr); > } else { > return 0; > } > }
Yes it is. But it's an #ifdef if, which makes it want to be a separate function. thanks, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel