Re: [PATCH] mtd: Use kasprintf() instead of fixed buffer formatting

2018-07-07 Thread Boris Brezillon
On Thu, 28 Jun 2018 10:20:11 +0200 Geert Uytterhoeven wrote: > Using "%4.4X" in the calculation of the buffer size is misleading, as > the format string literal has no relation to the actual size needed. > Hence this is fragile w.r.t. future modification. > > As this is not a hot path, fix this

[PATCH] mtd: Use kasprintf() instead of fixed buffer formatting

2018-06-28 Thread Geert Uytterhoeven
Using "%4.4X" in the calculation of the buffer size is misleading, as the format string literal has no relation to the actual size needed. Hence this is fragile w.r.t. future modification. As this is not a hot path, fix this by replacing the formatting in a fixed buffer by kasprintf(). Signed-off