From: Vladimir Zapolskiy <vz@mleia.com>
To: John Garry <john.garry@huawei.com>, wsa@the-dreams.de
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
linuxarm@huawei.com
Subject: Re: [PATCH] i2c: print correct device invalid address
Date: Sat, 7 Jan 2017 23:43:28 +0200 [thread overview]
Message-ID: <e82abf2e-9a47-e66c-a86b-e022096ab424@mleia.com> (raw)
In-Reply-To: <1483700577-60130-1-git-send-email-john.garry@huawei.com>
On 01/06/2017 01:02 PM, John Garry wrote:
> In of_i2c_register_device(), when the check for
> device address validity fails we print the info.addr,
> which has not been assigned properly.
>
> Fix this by printing the actual invalid address.
>
> Signed-off-by: John Garry <john.garry@huawei.com>
>
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> index cf9e396..03cfcdd 100644
> --- a/drivers/i2c/i2c-core.c
> +++ b/drivers/i2c/i2c-core.c
> @@ -1708,7 +1708,7 @@ static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap,
>
> if (i2c_check_addr_validity(addr, info.flags)) {
> dev_err(&adap->dev, "of_i2c: invalid addr=%x on %s\n",
> - info.addr, node->full_name);
> + addr, node->full_name);
> return ERR_PTR(-EINVAL);
> }
>
>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Fixes: b4e2f6ac1281 ("i2c: apply DT flags when probing")
Thank you for the fix.
--
With best wishes,
Vladimir
next prev parent reply other threads:[~2017-01-07 21:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 11:02 [PATCH] i2c: print correct device invalid address John Garry
2017-01-07 21:43 ` Vladimir Zapolskiy [this message]
2017-01-12 19:07 ` Wolfram Sang
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=e82abf2e-9a47-e66c-a86b-e022096ab424@mleia.com \
--to=vz@mleia.com \
--cc=john.garry@huawei.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--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;
as well as URLs for NNTP newsgroup(s).