Search Linux Wireless

Re: [RFC][PATCH v2 2/7] NFC: add nfc subsystem core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gustavo,

> > The NFC subsystem core is responsible for providing the device driver
> > interface. It is also responsible for providing an interface to the control
> > operations and data exchange.

<snip>

> > +config NFC_DEBUG
> > +	bool "NFC verbose debug messages"
> > +        depends on NFC
> > +        help
> > +	  Say Y here if you want the NFC core and drivers to produce a bunch
> > +	  of debug messages to the system log. Select this if you are having a
> > +	  problem with NFC support and want to see more of what is going on.
> 
> I think that use only dynamic debug is a lot nicer. I don't see a point to
> have a NFC debug option in Kconfig. We've been using dynamic debug in the
> Bluetooth subsystem for a while and it works fine. If we have dynamic debug
> there is no need to recompile a module to add debug support to it.
> 
> Also it's a good idea use macros for pr_debug, instead of calling it every
> time with the same paramenters (__func__, for example). In the Bluetooth
> subsystem we do like this:
> 
> #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
> #define BT_ERR(fmt, arg...)  printk(KERN_ERR "%s: " fmt "\n" , __func__ , ##
> arg)
> #define BT_DBG(fmt, arg...)  pr_debug("%s: " fmt "\n" , __func__ , ## arg)

I would clearly second this. Switching the Bluetooth subsystem to
dynamic debug made so many things so much easier. And using a macro like
NFC_DBG makes it pretty nice and clean.

Regards

Marcel


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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux