Messages in this thread | | | Date | Thu, 11 Dec 2008 12:29:12 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH 1/2] DMI: add dmi_match |
| |
On Tue, 9 Dec 2008 21:52:27 +0100 Jiri Slaby <jirislaby@gmail.com> wrote:
> > +/** > + * dmi_match - compare string to the dmi field (if exists) > + * > + * Returns true if requested field equals to str (including NULL). > + */
Forgot to document the arguments. If you think it matters. (I don't).
> +static inline bool dmi_match(enum dmi_field f, const char *str) > +{ > + const char *info = dmi_get_system_info(f); > + > + if (info == NULL || str == NULL) > + return info == str; > + > + return !strcmp(info, str); > +} > +
I suspect we'd have thinner kernel if this wasn't inlined.
| |