From: Oleksij Rempel <o.rempel@pengutronix.de>
To: "Wolfram Sang" <wsa@the-dreams.de>,
"Uwe Kleine-König" <uwe@kleine-koenig.org>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Jonathan Corbet <corbet@lwn.net>, Shawn Guo <shawnguo@kernel.org>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Oleksij Rempel <linux@rempel-privat.de>,
Enrico Weigelt <lkml@metux.net>,
linux-i2c@vger.kernel.org, kernel@pengutronix.de,
Andrew Morton <akpm@linux-foundation.org>,
Fabio Estevam <festevam@gmail.com>,
linux-arm-kernel@lists.infradead.org,
NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH] [RFC] i2c: imx: make use of format specifier %dE
Date: Mon, 2 Sep 2019 07:58:36 +0200 [thread overview]
Message-ID: <aefbf1c5-d0b7-bb6e-0f97-d65575d549ff@pengutronix.de> (raw)
In-Reply-To: <20190829203912.GU3740@ninjato>
On 29.08.19 22:39, Wolfram Sang wrote:
> On Thu, Aug 29, 2019 at 06:29:05AM +0200, Uwe Kleine-König wrote:
>> I created a patch that teaches printk et al to emit a symbolic error
>> name for an error valued integer[1]. With that applied
>>
>> dev_err(&pdev->dev, "can't enable I2C clock, ret=%dE\n", ret);
>>
>> emits
>>
>> ... can't enable I2C clock, ret=EIO
>>
>> if ret is -EIO. Petr Mladek (i.e. one of the printk maintainers) had
>> concerns if this would be well received and worth the effort. He asked
>> to present it to a few subsystems. So for now, this patch converting the
>> i2c-imx driver shouldn't be applied yet but it would be great to get
>> some feedback about if you think that being able to easily printk (for
>> example) "EIO" instead of "-5" is a good idea. Would it help you? Do you
>> think it helps your users?
>
> Yes, it would help me. And users, too, I am quite sure. For me, if I mix
> up two numbers while debugging, I am hunting ghosts for a while until I
> realize my mistake. So:
>
> Acked-by: Wolfram Sang <wsa@the-dreams.de>
>
> I think the main drawback is that ERRORCODES in vsprintf.c now need
> maintenance, but I think it is worth the effort. I'd be interested in
> the overhead in size this causes, but I also think it is worth the
> effort. (It could even be compiled out if we have some generic Kconfig
> symbol for smaller kernels).
I like it, at least it will safe me some time.
I tested this patch together with the vprintf patch, so result looks like:
[ 0.281843] imx-i2c 21a0000.i2c: can't enable I2C clock, ret=EIO
[ 0.281891] imx-i2c: probe of 21a0000.i2c failed with error -5
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Kind regards,
Oleksij Rempel
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-09-02 5:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 4:29 [PATCH] [RFC] i2c: imx: make use of format specifier %dE Uwe Kleine-König
2019-08-29 20:39 ` Wolfram Sang
2019-09-02 5:58 ` Oleksij Rempel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aefbf1c5-d0b7-bb6e-0f97-d65575d549ff@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=festevam@gmail.com \
--cc=jani.nikula@linux.intel.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=lkml@metux.net \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=shawnguo@kernel.org \
--cc=uwe@kleine-koenig.org \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox