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; } } > It's just not worth it to inline these, it's not speed critical at all. > I prefer to not inline stuff unless it help out somehow. I think this could help GCC, but this should be proved, of course :-) Regards Ingo Oeser
Attachment:
pgpY9CEGGPHtQ.pgp
Description: PGP signature
- Follow-Ups:
- References:
- [PATCH 02/02] USB: add dynamic id functionality to USB core
- From: Greg KH <[email protected]>
- Re: [linux-usb-devel] [PATCH 02/02] USB: add dynamic id functionality to USB core
- From: Alan Stern <[email protected]>
- Re: [linux-usb-devel] [PATCH 02/02] USB: add dynamic id functionality to USB core
- From: Greg KH <[email protected]>
- [PATCH 02/02] USB: add dynamic id functionality to USB core
- Prev by Date: Re: [linux-pm] [RFC] userland swsusp
- Next by Date: [PATCH] Small fixups to driver core
- Previous by thread: Re: [linux-usb-devel] [PATCH 02/02] USB: add dynamic id functionality to USB core
- Next by thread: Re: [linux-usb-devel] [PATCH 02/02] USB: add dynamic id functionality to USB core
- Index(es):