> -----Original Message----- > From: David Laight [mailto:David.Laight@xxxxxxxxxx]> > From: Of Stanislaw Wadas > > Add inline to gadget_write_string(). > ... > > -static void usbg_write_string(char *path, char *name, char > *file, char *buf) > > +static inline void usbg_write_string(char *path, char *name, > char *file, char *buf) > > { > > usbg_write_buf(path, name, file, buf); > > } > > Why? > The compiler is very unlikely not to inline it anyway. > > If it doesn't inline it, then specifying 'inline' probably > won't make any difference either. > I agree that new version of gcc can do this without explicit inline, but please think about some legacy systems and compilers. Older versions of gcc or other compilers may not inline this function if there is no keyword. We should write portable code and don't depend on any version of compiler. So to do it good we should pass as much information to compiler as possible. -- BR's Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html