Re: [PATCH v2 8/9] lib/vsprintf: Remove useless NULL checks
From: Andy Shevchenko
Date: Wed Feb 28 2018 - 05:44:36 EST
On Wed, 2018-02-28 at 11:04 +0100, Petr Mladek wrote:
> On Tue 2018-02-27 19:35:50, Andy Shevchenko wrote:
> > On Tue, 2018-02-27 at 16:50 +0100, Petr Mladek wrote:
> > > On Fri 2018-02-16 23:07:10, Andy Shevchenko wrote:
> > > >
> > >
> > > This macro matches also values <= 16.
> >
> > Yes, I know.
> >
> > This had been discussed with Rasmus and we agreed that printing a
> > result
> > of kmalloc(0) is rather weird.
>
> I see
> https://lkml.kernel.org/r/1500546142.29303.133.camel@xxxxxxxxxxxxxxx
> There you suggested to move this check into pointer(). But I do not
> see any agreement on this.
>
Btw, I'm pretty sure that the checks like this or another one with
PAGE_SIZE is cargo cult programming rather than imaging possible so
weird use cases.
--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy