I recently ran a the scripts/checkpatch.pl script within the linux source tree and got this Warning:
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
printk(KERN_DEBUG "Hello World! \n");
I understand that the dynamic debugging interface offered by pr_debug and dev_dbg has obvious advantages to printk and therefore they are preferred to printk.
Even amongst dev_dbg and pr_debug, we prefer dev_dbg if we have a struct device to standardize device information output along with our debug message. It offers escape from the "edit/rebuild/reboot cycle" and also allows to maintain a neat log through dynamic_debug/control interface.
My question is: Why is netdev_dbg preferred to dev_dbg?