Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964841AbVKQT64 (ORCPT ); Thu, 17 Nov 2005 14:58:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964842AbVKQT64 (ORCPT ); Thu, 17 Nov 2005 14:58:56 -0500 Received: from smtprelay04.ispgateway.de ([80.67.18.16]:14776 "EHLO smtprelay04.ispgateway.de") by vger.kernel.org with ESMTP id S964841AbVKQT6z (ORCPT ); Thu, 17 Nov 2005 14:58:55 -0500 From: Ingo Oeser To: linux-kernel@vger.kernel.org Subject: Re: [linux-usb-devel] [PATCH 02/02] USB: add dynamic id functionality to USB core Date: Thu, 17 Nov 2005 20:58:42 +0100 User-Agent: KMail/1.7.2 Cc: Greg KH , Alan Stern , linux-usb-devel@lists.sourceforge.net References: <20051117003241.GC14896@kroah.com> <20051117162533.GB26824@suse.de> In-Reply-To: <20051117162533.GB26824@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1913874.3OIxKZYTDZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200511172058.48797.ioe-lkml@rameria.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1661 Lines: 63 --nextPart1913874.3OIxKZYTDZ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 =3D 0; > > > + > > > + if (usb_drv->probe !=3D NULL) > > > + error =3D sysfs_create_file(&usb_drv->driver.kobj, > > > + &driver_attr_new_id.attr); > > > + return error; > > > +} > >=20 > > 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 !=3D 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 --nextPart1913874.3OIxKZYTDZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBDfOD4U56oYWuOrkARAoEJAKDF1eUnDWXfonkVeUDWM2scwkyD1ACfcV8k IJHFlm/B88dqtv/1fXDxsLA= =c+w4 -----END PGP SIGNATURE----- --nextPart1913874.3OIxKZYTDZ-- - 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/