Re: [PATCH] lib/vsprintf.c: remove %Z support

From: Andrew Morton
Date: Thu Jan 05 2017 - 19:31:51 EST


On Wed, 4 Jan 2017 02:01:27 +0300 Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:

> Now that %z is standartised in C99 there is no reason to support %Z.
> Unlike %L it doesn't even make format strings smaller.
>
> Use BUILD_BUG_ON in a couple ATM drivers.
>
> In case anyone didn't notice lib/vsprintf.o is about half of SLUB
> which is in my opinion is quite an achievement. Hopefully this patch
> inspires someone else to trim vsprintf.c more.

There's a risk that more %Z uses will sneak into the tree during the
4.10 development cycle, and possibly even later. So I added a
note-to-self to re-grep the tree before sending this upstream, but that
won't prevent people adding new instances later on: code which was
tested under earlier kernels which has %Z support.

The best suggestion I have is to add a checkpatch rule to try to catch
new %Z's being added.