From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: elan: Fix wrong %p extension
Date: Fri, 6 Feb 2015 08:40:37 -0800 [thread overview]
Message-ID: <20150206164037.GA29225@dtor-ws> (raw)
In-Reply-To: <1423230673-25877-1-git-send-email-linux@rasmusvillemoes.dk>
On Fri, Feb 06, 2015 at 02:51:13PM +0100, Rasmus Villemoes wrote:
> There's no %px extension. From the context I think the intention was
> to dump the five bytes which were not as expected, and for that one
> should use %ph.
>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Applied, thank you.
> ---
> I think the bug is mostly harmless, since the unrecognized extension
> is simply ignored (and skipped over), and the address of the 'values'
> array is simply printed as if by %5p. But since that is an address
> on the kernel stack, someone might think it is worse than I do.
>
> drivers/input/mouse/elan_i2c_smbus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/elan_i2c_smbus.c b/drivers/input/mouse/elan_i2c_smbus.c
> index 359bf8583d54..2a89004f3c6e 100644
> --- a/drivers/input/mouse/elan_i2c_smbus.c
> +++ b/drivers/input/mouse/elan_i2c_smbus.c
> @@ -71,7 +71,7 @@ static int elan_smbus_initialize(struct i2c_client *client)
>
> /* compare hello packet */
> if (memcmp(values, check, ETP_SMBUS_HELLOPACKET_LEN)) {
> - dev_err(&client->dev, "hello packet fail [%*px]\n",
> + dev_err(&client->dev, "hello packet fail [%*ph]\n",
> ETP_SMBUS_HELLOPACKET_LEN, values);
> return -ENXIO;
> }
> --
> 2.1.3
>
--
Dmitry
prev parent reply other threads:[~2015-02-06 16:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 13:51 [PATCH] input: elan: Fix wrong %p extension Rasmus Villemoes
2015-02-06 16:40 ` Dmitry Torokhov [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=20150206164037.GA29225@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
/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;
as well as URLs for NNTP newsgroup(s).