Re: [PATCH V2 2/2] ASoC: staging: ft1000: Logging message neatening

2014-11-03 Thread Greg Kroah-Hartman
On Mon, Nov 03, 2014 at 04:25:44PM -0800, Joe Perches wrote:
 Use a more common logging style.
 
 o Convert DEBUG macros to pr_debug
 o Add pr_fmt
 o Remove embedded function names from pr_debug
 o Convert printks to pr_level
 o Coalesce formats and align arguments
 o Add missing terminating newlines
 
 Signed-off-by: Joe Perches j...@perches.com

ASoC???

I'll go edit that by hand...

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 2/2] ASoC: staging: ft1000: Logging message neatening

2014-11-03 Thread Joe Perches
Use a more common logging style.

o Convert DEBUG macros to pr_debug
o Add pr_fmt
o Remove embedded function names from pr_debug
o Convert printks to pr_level
o Coalesce formats and align arguments
o Add missing terminating newlines

Signed-off-by: Joe Perches j...@perches.com
---
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c |   6 +-
 drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c   | 340 -
 drivers/staging/ft1000/ft1000-usb/ft1000_debug.c   | 136 -
 .../staging/ft1000/ft1000-usb/ft1000_download.c| 138 -
 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c  | 194 +---
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.c |  85 +++---
 drivers/staging/ft1000/ft1000-usb/ft1000_usb.h |   2 -
 7 files changed, 383 insertions(+), 518 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c 
b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c
index deb1256..1150050 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c
@@ -20,6 +20,8 @@
 
   ---*/
 
+#define pr_fmt(fmt) KBUILD_MODNAME :  fmt
+
 #define __KERNEL_SYSCALLS__
 
 #include linux/module.h
@@ -316,7 +318,7 @@ int card_download(struct net_device *dev, const u8 
*pFileStart,
 
file_version = *(long *)pFileStart;
if (file_version != 6) {
-   printk(KERN_ERR ft1000: unsupported firmware version %ld\n, 
file_version);
+   pr_err(unsupported firmware version %ld\n, file_version);
Status = FAILURE;
}
 
@@ -688,7 +690,7 @@ int card_download(struct net_device *dev, const u8 
*pFileStart,
uiState = STATE_SECTION_PROV;
} else {
netdev_dbg(dev,
-  FT1000:download:Download error: Bad 
Port IDs in Pseudo Record\n);
+  Download error: Bad Port IDs in 
Pseudo Record\n);
netdev_dbg(dev, \t Port Source = 0x%2.2x\n,
   pHdr-portsrc);
netdev_dbg(dev, \t Port Destination = 
0x%2.2x\n,
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c 
b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index c6bee28..11dbe36 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -17,6 +17,8 @@
   Suite 330, Boston, MA 02111-1307, USA.
   -*/
 
+#define pr_fmt(fmt) KBUILD_MODNAME :  fmt
+
 #include linux/kernel.h
 #include linux/module.h
 #include linux/sched.h
@@ -44,12 +46,6 @@
 #include pcmcia/cisreg.h
 #include pcmcia/ds.h
 
-#ifdef FT_DEBUG
-#define DEBUG(n, args...) printk(KERN_DEBUG args);
-#else
-#define DEBUG(n, args...)
-#endif
-
 #include linux/delay.h
 #include ft1000.h
 
@@ -282,12 +278,9 @@ static void ft1000_enable_interrupts(struct net_device 
*dev)
 {
u16 tempword;
 
-   DEBUG(1, ft1000_hw:ft1000_enable_interrupts()\n);
ft1000_write_reg(dev, FT1000_REG_SUP_IMASK, ISR_DEFAULT_MASK);
tempword = ft1000_read_reg(dev, FT1000_REG_SUP_IMASK);
-   DEBUG(1,
- ft1000_hw:ft1000_enable_interrupts:current interrupt enable mask 
= 0x%x\n,
- tempword);
+   pr_debug(current interrupt enable mask = 0x%x\n, tempword);
 }
 
 /*---
@@ -304,12 +297,9 @@ static void ft1000_disable_interrupts(struct net_device 
*dev)
 {
u16 tempword;
 
-   DEBUG(1, ft1000_hw: ft1000_disable_interrupts()\n);
ft1000_write_reg(dev, FT1000_REG_SUP_IMASK, ISR_MASK_ALL);
tempword = ft1000_read_reg(dev, FT1000_REG_SUP_IMASK);
-   DEBUG(1,
- ft1000_hw:ft1000_disable_interrupts:current interrupt enable 
mask = 0x%x\n,
- tempword);
+   pr_debug(current interrupt enable mask = 0x%x\n, tempword);
 }
 
 /*---
@@ -329,8 +319,6 @@ static void ft1000_reset_asic(struct net_device *dev)
struct ft1000_pcmcia *pcmcia = info-priv;
u16 tempword;
 
-   DEBUG(1, ft1000_hw:ft1000_reset_asic called\n);
-
(*info-ft1000_reset) (pcmcia-link);
 
/*
@@ -351,10 +339,10 @@ static void ft1000_reset_asic(struct net_device *dev)
}
/* clear interrupts */
tempword = ft1000_read_reg(dev, FT1000_REG_SUP_ISR);
-   DEBUG(1, ft1000_hw: interrupt status register = 0x%x\n, tempword);
+   pr_debug(interrupt status register = 0x%x\n, tempword);
ft1000_write_reg(dev, FT1000_REG_SUP_ISR, tempword);
tempword = ft1000_read_reg(dev, FT1000_REG_SUP_ISR);
-   DEBUG(1, ft1000_hw: interrupt status register = 0x%x\n, tempword);
+   

Re: [PATCH V2 2/2] ASoC: staging: ft1000: Logging message neatening

2014-11-03 Thread Joe Perches
On Mon, 2014-11-03 at 16:36 -0800, Greg Kroah-Hartman wrote:
 On Mon, Nov 03, 2014 at 04:25:44PM -0800, Joe Perches wrote:
  Use a more common logging style.
  
  o Convert DEBUG macros to pr_debug
  o Add pr_fmt
  o Remove embedded function names from pr_debug
  o Convert printks to pr_level
  o Coalesce formats and align arguments
  o Add missing terminating newlines
  
  Signed-off-by: Joe Perches j...@perches.com
 
 ASoC???
 
 I'll go edit that by hand...

How odd.  It must be some git weirdness I don't understand.

That's just from doing: (after a git pull of your staging-next tree)

$ patch -p1  
../next/patches/ft1000/0001-staging-ft1000-Whitespace-neatening.patch
$ emacs drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c.rej 
$ git commit -s drivers/staging/ft1000
$ git am 
../next/patches/ft1000/0002-staging-ft1000-Logging-message-neatening.patch
$ git format-patch -2 --subject-prefix=PATCH V2 -o patches/ft1000 
--cover-letter

I didn't touch either output patch but did edit the cover letter.

and ../next/patches/ft1000/0002-etc... doesn't have ASoC in it.

$ grep -i asoc 
../next/patches/ft1000/0002-staging-ft1000-Logging-message-neatening.patch 
$ 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel