Patchwork [U-Boot,3/3] i2c: tegra: dump alen in debug statements

login
register
mail settings
Submitter Stephen Warren
Date June 25, 2014, 4:57 p.m.
Message ID <1403715449-2177-3-git-send-email-swarren@wwwdotorg.org>
Download mbox | patch
Permalink /patch/364080/
State Accepted
Delegated to: Heiko Schocher
Headers show

Comments

Stephen Warren - June 25, 2014, 4:57 p.m.
From: Stephen Warren <swarren@nvidia.com>

Since tegra_i2c_{read,write}'s debug() call dumps the chip address, dump
the address length (alen) too, so the address value can be correctly
interpreted.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 drivers/i2c/tegra_i2c.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Yen Lin - June 25, 2014, 11:40 p.m.
Hi Stephen,

> Subject: [U-Boot] [PATCH 3/3] i2c: tegra: dump alen in debug statements
> 
> From: Stephen Warren <swarren@nvidia.com>
> 
> Since tegra_i2c_{read,write}'s debug() call dumps the chip address, dump
> the address length (alen) too, so the address value can be correctly
> interpreted.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>

LGTM.

Reviewed-by: Yen Lin <yelin@nvidia.com>

Regards,
Yen Lin

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

Patch

diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index a62f30e66ce1..257b72f0f7cd 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -548,8 +548,8 @@  static int tegra_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
 	uint offset;
 	int i;
 
-	debug("i2c_read: chip=0x%x, addr=0x%x, len=0x%x\n",
-				chip, addr, len);
+	debug("i2c_read: chip=0x%x, addr=0x%x, alen=0x%x len=0x%x\n",
+	      chip, addr, alen, len);
 	bus = tegra_i2c_get_bus(adap);
 	if (!bus)
 		return 1;
@@ -587,8 +587,8 @@  static int tegra_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
 	uint offset;
 	int i;
 
-	debug("i2c_write: chip=0x%x, addr=0x%x, len=0x%x\n",
-				chip, addr, len);
+	debug("i2c_write: chip=0x%x, addr=0x%x, alen=0x%x len=0x%x\n",
+	      chip, addr, alen, len);
 	bus = tegra_i2c_get_bus(adap);
 	if (!bus)
 		return 1;