Skip to contentSkip to conversation

i2c: designware: Remove space between variable and its value in debug print

PATCH In review Jarkko Nikula 2 participants 5 messages Aug 7, 2015 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 i2c: designware: Remove space between variable and its value in debug print

Remove extra space from "enabled= 0x" to make debug print a bit more dense and to be in sync with "stat=0x". While at it, use "%#x" for printing "0x" prefixed hexadecimal values.

---
 drivers/i2c/busses/i2c-designware-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-designware-core.c +1 -1
index 6f19a33773fe..7310051d4a50 100644
@@ -777,7 +777,7 @@ irqreturn_t i2c_dw_isr(int this_irq, void *dev_id)
 
 	enabled = dw_readl(dev, DW_IC_ENABLE);
 	stat = dw_readl(dev, DW_IC_RAW_INTR_STAT);
-	dev_dbg(dev->dev, "%s:  %s enabled= 0x%x stat=0x%x\n", __func__,
+	dev_dbg(dev->dev, "%s:  %s enabled=%#x stat=%#x\n", __func__,
 		dev->adapter.name, enabled, stat);
 	if (!enabled || !(stat & ~DW_IC_INTR_ACTIVITY))
 		return IRQ_NONE;
Signature · 1 line
2.4.6
#2 lore raw

PATCH 2/2 i2c: designware: Remove adapter name from debug print in i2c_dw_isr()

In reply to a message not in the archive

Printing adapter name is irrelevant from this debug print and makes output needlessly long. Having already device and functions names printed here is enough for debugging.

---
 drivers/i2c/busses/i2c-designware-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-designware-core.c +2 -2
index 7310051d4a50..cc98b2a75591 100644
@@ -777,8 +777,8 @@ irqreturn_t i2c_dw_isr(int this_irq, void *dev_id)
 
 	enabled = dw_readl(dev, DW_IC_ENABLE);
 	stat = dw_readl(dev, DW_IC_RAW_INTR_STAT);
-	dev_dbg(dev->dev, "%s:  %s enabled=%#x stat=%#x\n", __func__,
-		dev->adapter.name, enabled, stat);
+	dev_dbg(dev->dev, "%s: enabled=%#x stat=%#x\n", __func__,
+		enabled, stat);
 	if (!enabled || !(stat & ~DW_IC_INTR_ACTIVITY))
 		return IRQ_NONE;
 
Signature · 1 line
2.4.6
#6 lore raw
In reply to a message not in the archive

drivers/i2c/busses/i2c-designware-core.c irqreturn_t i2c_dw_isr(int this_irq, void *dev_id) · line 780

Quoted 1 line
drivers/i2c/busses/i2c-designware-core.c +1 -0
+	dev_dbg(dev->dev, "%s:  %s enabled=%#x stat=%#x\n", __func__,

What about the double space between the %s?

#4 lore raw

Re: [PATCH 2/2] i2c: designware: Remove adapter name from debug print in i2c_dw_isr()

In reply to a message not in the archive
Quoted 5 lines · Jarkko Nikula

Printing adapter name is irrelevant from this debug print and makes output needlessly long. Having already device and functions names printed here is enough for debugging.

So much about the double space :) I think I'll squash those two.

#5 lore raw

Re: [PATCH 2/2] i2c: designware: Remove adapter name from debug print in i2c_dw_isr()

Quoted 9 lines · Wolfram Sang
Quoted 5 lines · Jarkko Nikula

Printing adapter name is irrelevant from this debug print and makes output needlessly long. Having already device and functions names printed here is enough for debugging.

So much about the double space :) I think I'll squash those two.

Fine to me. Actually long "Synopsys DesignWare I2C adapter" printed bothered me most.

Signature · 1 line
Jarkko