Skip to contentSkip to conversation

mfd: rtsx: Convert forgotten dev_info() statement to pcr_dbg()

PATCH Applied Borislav Petkov 2 participants 4 messages Feb 2, 2017 – Mar 14, 2017 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: rtsx: Convert forgotten dev_info() statement to pcr_dbg()

From: Borislav Petkov <[email protected]>

It is a debugging statement so make it be issued only then.

No functionality change.

---
 drivers/mfd/rtsx_pcr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/rtsx_pcr.c +1 -1
index 98029ee0959e..850590aac008 100644
@@ -927,7 +927,7 @@ static irqreturn_t rtsx_pci_isr(int irq, void *dev_id)
 
 static int rtsx_pci_acquire_irq(struct rtsx_pcr *pcr)
 {
-	dev_info(&(pcr->pci->dev), "%s: pcr->msi_en = %d, pci->irq = %d\n",
+	pcr_dbg(pcr, "%s: pcr->msi_en = %d, pci->irq = %d\n",
 			__func__, pcr->msi_en, pcr->pci->irq);
 
 	if (request_irq(pcr->pci->irq, rtsx_pci_isr,
Signature · 1 line
2.11.0
#1 lore raw
Quoted 17 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

It is a debugging statement so make it be issued only then.

No functionality change.

---
 drivers/mfd/rtsx_pcr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/rtsx_pcr.c +0 -0
index 98029ee0959e..850590aac008 100644

drivers/mfd/rtsx_pcr.c static irqreturn_t rtsx_pci_isr(int irq, void *dev_id) · line 931

Quoted 6 lines
drivers/mfd/rtsx_pcr.c +1 -1
@@ -927,7 +927,7 @@ static irqreturn_t rtsx_pci_isr(int irq, void *dev_id)
 
 static int rtsx_pci_acquire_irq(struct rtsx_pcr *pcr)
 {
-	dev_info(&(pcr->pci->dev), "%s: pcr->msi_en = %d, pci->irq = %d\n",
+	pcr_dbg(pcr, "%s: pcr->msi_en = %d, pci->irq = %d\n",
 			__func__, pcr->msi_en, pcr->pci->irq);

I usually disapprove of these kinds of abstractions.

What is the point of it?

Why can't you just use dev_dbg()?

Quoted 1 line
drivers/mfd/rtsx_pcr.c +0 -0
 	if (request_irq(pcr->pci->irq, rtsx_pci_isr,
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#2 lore raw
Quoted 5 lines · Lee Jones

I usually disapprove of these kinds of abstractions.

What is the point of it?

Why can't you just use dev_dbg()?

I was simply following what the rest of the driver does. It has 20 pcr_dbg() calls and 5 dev_dbg().

If you want to address that, then a patch ontop should convert all pcr_dbg() calls to dev_dbg().

Signature · 4 lines
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
Applied
#3 lore raw
In reply to Borislav Petkov
Quoted 11 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

It is a debugging statement so make it be issued only then.

No functionality change.

---
 drivers/mfd/rtsx_pcr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Quoted 13 lines
drivers/mfd/rtsx_pcr.c +1 -1
index 98029ee0959e..850590aac008 100644
@@ -927,7 +927,7 @@ static irqreturn_t rtsx_pci_isr(int irq, void *dev_id)
 
 static int rtsx_pci_acquire_irq(struct rtsx_pcr *pcr)
 {
-	dev_info(&(pcr->pci->dev), "%s: pcr->msi_en = %d, pci->irq = %d\n",
+	pcr_dbg(pcr, "%s: pcr->msi_en = %d, pci->irq = %d\n",
 			__func__, pcr->msi_en, pcr->pci->irq);
 
 	if (request_irq(pcr->pci->irq, rtsx_pci_isr,
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog