Re: [PATCH] printk: Print error pointers as negative integers for %p

From: Andy Shevchenko
Date: Tue Feb 06 2018 - 13:52:10 EST


On Tue, Feb 6, 2018 at 11:21 AM, David Howells <dhowells@xxxxxxxxxx> wrote:
> The new hashing feature of unadorned printk("%p") makes it hard to spot if
> the pointer actually carries an error value. Make %p print any pointer
> that matches IS_ERR() as a negative integer.
>
> Should I set SMALL and the field_width as well, I wonder?

> + spec.type = FORMAT_TYPE_INT;

_LONG ?

For sake of consistency.

--
With Best Regards,
Andy Shevchenko