Skip to contentSkip to conversation

brcmsmac: Use current logging styles

PATCH In review Joe Perches 3 participants 4 messages Nov 13, 2011 – Nov 14, 2011

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

PATCH 1/1 brcmsmac: Use current logging styles

Add and use pr_fmt and pr_<level>
Remove useless double parentheses from macros.
Remove function names from format strings, add to pr_debug use. Coalesce formats.
Remove uncompileable undeclared variable in a DMA_NONE use.

---
 drivers/net/wireless/brcm80211/brcmsmac/aiutils.c |   14 +-
 drivers/net/wireless/brcm80211/brcmsmac/dma.c     |  145 ++++++++++-----------
 2 files changed, 80 insertions(+), 79 deletions(-)
drivers/net/wireless/brcm80211/brcmsmac/aiutils.c +8 -6
index 025fa0e..39e3054 100644
@@ -16,6 +16,8 @@
  * File contents: support functions for PCI/PCIe
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/delay.h>
 #include <linux/pci.h>
 
@@ -349,9 +351,9 @@
 #define PCI_FORCEHT(si)	(PCIE(si) && (si->pub.chip == BCM4716_CHIP_ID))
 
 #ifdef BCMDBG
-#define	SI_MSG(args)	printk args
+#define	SI_MSG(fmt, ...)	pr_debug(fmt, ##__VA_ARGS__)
 #else
-#define	SI_MSG(args)
+#define	SI_MSG(fmt, ...)	no_printk(fmt, ##__VA_ARGS__)
 #endif				/* BCMDBG */
 
 #define	GOODCOREADDR(x, b) \
@@ -1073,7 +1075,7 @@ static struct si_info *ai_doattach(struct si_info *sii,
 
 	/* scan for cores */
 	if (socitype == SOCI_AI) {
-		SI_MSG(("Found chip type AI (0x%08x)\n", w));
+		SI_MSG("Found chip type AI (0x%08x)\n", w);
 		/* pass chipc address instead of original core base */
 		ai_scan(&sii->pub, cc);
 	} else {
@@ -1129,7 +1131,7 @@ static struct si_info *ai_doattach(struct si_info *sii,
 		 * set chipControl register bit 15
 		 */
 		if (sih->chiprev == 0) {
-			SI_MSG(("Applying 43224A0 WARs\n"));
+			SI_MSG("Applying 43224A0 WARs\n");
 			ai_corereg(sih, SI_CC_IDX,
 				   offsetof(struct chipcregs, chipcontrol),
 				   CCTRL43224_GPIO_TOGGLE,
@@ -1138,7 +1140,7 @@ static struct si_info *ai_doattach(struct si_info *sii,
 					   CCTRL_43224A0_12MA_LED_DRIVE);
 		}
 		if (sih->chiprev >= 1) {
-			SI_MSG(("Applying 43224B0+ WARs\n"));
+			SI_MSG("Applying 43224B0+ WARs\n");
 			si_pmu_chipcontrol(sih, 0, CCTRL_43224B0_12MA_LED_DRIVE,
 					   CCTRL_43224B0_12MA_LED_DRIVE);
 		}
@@ -1149,7 +1151,7 @@ static struct si_info *ai_doattach(struct si_info *sii,
 		 * enable 12 mA drive strenth for 4313 and
 		 * set chipControl register bit 1
 		 */
-		SI_MSG(("Applying 4313 WARs\n"));
+		SI_MSG("Applying 4313 WARs\n");
 		si_pmu_chipcontrol(sih, 0, CCTRL_4313_12MA_LED_DRIVE,
 				   CCTRL_4313_12MA_LED_DRIVE);
 	}
drivers/net/wireless/brcm80211/brcmsmac/dma.c +72 -73

319 lines not on this page · raw message

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 5 lines · On Sun, 13 Nov 2011 11:41:04 -0800 Joe Perches…

Add and use pr_fmt and pr_<level>
Remove useless double parentheses from macros.
Remove function names from format strings, add to pr_debug use. Coalesce formats.
Remove uncompileable undeclared variable in a DMA_NONE use.

If you are going to change it why not got all the way to netdev_XXX and dev_XXX macros instead.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 11 lines · Stephen Hemminger
Quoted 5 lines · On Sun, 13 Nov 2011 11:41:04 -0800 Joe Perches <[email protected]> wrote:

Add and use pr_fmt and pr_<level>
Remove useless double parentheses from macros.
Remove function names from format strings, add to pr_debug use. Coalesce formats.
Remove uncompileable undeclared variable in a DMA_NONE use.

If you are going to change it why not got all the way to netdev_XXX and dev_XXX macros instead.

No dev always available, simpler change,
mirrors the changes in brcmfmac.

Acked-by on v1 1/1
#3 lore raw
In reply to Joe Perches
Quoted 11 lines · Joe Perches

Add and use pr_fmt and pr_<level>
Remove useless double parentheses from macros.
Remove function names from format strings, add to pr_debug use. Coalesce formats.
Remove uncompileable undeclared variable in a DMA_NONE use.

---
 drivers/net/wireless/brcm80211/brcmsmac/aiutils.c |   14 +-
 drivers/net/wireless/brcm80211/brcmsmac/dma.c     |  145 ++++++++++-----------
 2 files changed, 80 insertions(+), 79 deletions(-)

Thanks for the service.

Gr. AvS