Re: [PATCH v2 1/4] gpio: use sizeof() instead of hardcoded values

From: Linus Walleij
Date: Fri Jan 30 2015 - 08:43:36 EST


On Wed, Jan 21, 2015 at 10:33 PM, Olliver Schinagl
<o.schinagl@xxxxxxxxxxxxx> wrote:

> From: Olliver Schinagl <oliver@xxxxxxxxxxx>
>
> gpiolib uses a fixed string for the suffixes and defines it at 32 bytes.
> Later in the code snprintf is used with this fixed value of 32. Using
> sizeof() is safer in case the size for the suffixes is ever changed.
>
> Signed-off-by: Olliver Schinagl <oliver@xxxxxxxxxxx>

OK looks nice.

Patch applied.

Yours,
Linus Walleij
--
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/