lkml.org 
[lkml]   [2005]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-usb-devel] [PATCH 02/02] USB: add dynamic id functionality to USB core
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
-
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/

\
 
 \ /
  Last update: 2005-11-18 17:48    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site