Re: [PATCH] atmusb: Fix dynamic_debug macros

2013-10-26 Thread Krzysztof Mazur
On Sat, Oct 26, 2013 at 12:28:56PM -0700, Joe Perches wrote:
> On Sat, 2013-10-26 at 11:55 -0700, Joe Perches wrote:
> > Fix use of atm_dbg to all normal pr_debug not dynamic_pr_debug
> > because dynamic_pr_debug may not be compiled in at all.
> 
> Greg, please don't apply this one.
> I'll resubmit one that actually works.
> 
> (the arg...) should be ...
> 
> > +#define atm_dbg(instance, format, arg...)  \
>  ^ oops.
> 
> > +#define atm_rldbg(instance, format, arg...)
> > \
> > +   pr_debug_ratelimited("ATM dev %d: " format, \
> > +(instance)->atm_dev->number, ##__VA_ARGS__)
> 
> here too.
> 

Yeah, I initially fixed that with changing "##__VAR_ARGS" to "## arg",
but without with "arg..." -> "..." it also compiles and runs correctly.

I tested that only in my configuration - without DEBUG and DYNAMIC_DEBUG
- and compile tested that it with DYNAMIC_DEBUG. If you like you can add:

Tested-by: Krzysztof Mazur 

BTW: the driver is named usbatm, not atmusb.

Thanks,
Krzysiek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] atmusb: Fix dynamic_debug macros

2013-10-26 Thread Joe Perches
On Sat, 2013-10-26 at 11:55 -0700, Joe Perches wrote:
> Fix use of atm_dbg to all normal pr_debug not dynamic_pr_debug
> because dynamic_pr_debug may not be compiled in at all.

Greg, please don't apply this one.
I'll resubmit one that actually works.

(the arg...) should be ...

> +#define atm_dbg(instance, format, arg...)\
 ^ oops.

> +#define atm_rldbg(instance, format, arg...)  \
> + pr_debug_ratelimited("ATM dev %d: " format, \
> +  (instance)->atm_dev->number, ##__VA_ARGS__)

here too.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] atmusb: Fix dynamic_debug macros

2013-10-26 Thread Joe Perches
Fix use of atm_dbg to all normal pr_debug not dynamic_pr_debug
because dynamic_pr_debug may not be compiled in at all.

Signed-off-by: Joe Perches 
---
 drivers/usb/atm/usbatm.h | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h
index 5651231..2104b4b 100644
--- a/drivers/usb/atm/usbatm.h
+++ b/drivers/usb/atm/usbatm.h
@@ -59,13 +59,12 @@
atm_printk(KERN_INFO, instance , format , ## arg)
 #define atm_warn(instance, format, arg...) \
atm_printk(KERN_WARNING, instance , format , ## arg)
-#define atm_dbg(instance, format, arg...)  \
-   dynamic_pr_debug("ATM dev %d: " format ,\
-   (instance)->atm_dev->number , ## arg)
-#define atm_rldbg(instance, format, arg...)\
-   if (printk_ratelimit()) \
-   atm_dbg(instance , format , ## arg)
-
+#define atm_dbg(instance, format, arg...)  \
+   pr_debug("ATM dev %d: " format, \
+(instance)->atm_dev->number, ##__VA_ARGS__)
+#define atm_rldbg(instance, format, arg...)\
+   pr_debug_ratelimited("ATM dev %d: " format, \
+(instance)->atm_dev->number, ##__VA_ARGS__)
 
 /* flags, set by mini-driver in bind() */
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] atmusb: Fix dynamic_debug macros

2013-10-26 Thread Joe Perches
Fix use of atm_dbg to all normal pr_debug not dynamic_pr_debug
because dynamic_pr_debug may not be compiled in at all.

Signed-off-by: Joe Perches j...@perches.com
---
 drivers/usb/atm/usbatm.h | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h
index 5651231..2104b4b 100644
--- a/drivers/usb/atm/usbatm.h
+++ b/drivers/usb/atm/usbatm.h
@@ -59,13 +59,12 @@
atm_printk(KERN_INFO, instance , format , ## arg)
 #define atm_warn(instance, format, arg...) \
atm_printk(KERN_WARNING, instance , format , ## arg)
-#define atm_dbg(instance, format, arg...)  \
-   dynamic_pr_debug(ATM dev %d:  format ,\
-   (instance)-atm_dev-number , ## arg)
-#define atm_rldbg(instance, format, arg...)\
-   if (printk_ratelimit()) \
-   atm_dbg(instance , format , ## arg)
-
+#define atm_dbg(instance, format, arg...)  \
+   pr_debug(ATM dev %d:  format, \
+(instance)-atm_dev-number, ##__VA_ARGS__)
+#define atm_rldbg(instance, format, arg...)\
+   pr_debug_ratelimited(ATM dev %d:  format, \
+(instance)-atm_dev-number, ##__VA_ARGS__)
 
 /* flags, set by mini-driver in bind() */
 


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] atmusb: Fix dynamic_debug macros

2013-10-26 Thread Joe Perches
On Sat, 2013-10-26 at 11:55 -0700, Joe Perches wrote:
 Fix use of atm_dbg to all normal pr_debug not dynamic_pr_debug
 because dynamic_pr_debug may not be compiled in at all.

Greg, please don't apply this one.
I'll resubmit one that actually works.

(the arg...) should be ...

 +#define atm_dbg(instance, format, arg...)\
 ^ oops.

 +#define atm_rldbg(instance, format, arg...)  \
 + pr_debug_ratelimited(ATM dev %d:  format, \
 +  (instance)-atm_dev-number, ##__VA_ARGS__)

here too.


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] atmusb: Fix dynamic_debug macros

2013-10-26 Thread Krzysztof Mazur
On Sat, Oct 26, 2013 at 12:28:56PM -0700, Joe Perches wrote:
 On Sat, 2013-10-26 at 11:55 -0700, Joe Perches wrote:
  Fix use of atm_dbg to all normal pr_debug not dynamic_pr_debug
  because dynamic_pr_debug may not be compiled in at all.
 
 Greg, please don't apply this one.
 I'll resubmit one that actually works.
 
 (the arg...) should be ...
 
  +#define atm_dbg(instance, format, arg...)  \
  ^ oops.
 
  +#define atm_rldbg(instance, format, arg...)
  \
  +   pr_debug_ratelimited(ATM dev %d:  format, \
  +(instance)-atm_dev-number, ##__VA_ARGS__)
 
 here too.
 

Yeah, I initially fixed that with changing ##__VAR_ARGS to ## arg,
but without with arg... - ... it also compiles and runs correctly.

I tested that only in my configuration - without DEBUG and DYNAMIC_DEBUG
- and compile tested that it with DYNAMIC_DEBUG. If you like you can add:

Tested-by: Krzysztof Mazur krzys...@podlesie.net

BTW: the driver is named usbatm, not atmusb.

Thanks,
Krzysiek
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/