Re: [PATCH 1/2] DMI: add dmi_match
From: Andrew Morton
Date: Thu Dec 11 2008 - 15:30:45 EST
On Tue, 9 Dec 2008 21:52:27 +0100
Jiri Slaby <jirislaby@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/