lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1195113860.27113.34.camel@localhost>
Date:	Thu, 15 Nov 2007 00:04:20 -0800
From:	Joe Perches <joe@...ches.com>
To:	Oliver Hartkopp <oliver@...tkopp.net>
Cc:	Stephen Hemminger <shemminger@...ux-foundation.org>,
	Urs Thuermann <urs.thuermann@....de>, netdev@...r.kernel.org,
	David Miller <davem@...emloft.net>,
	Patrick McHardy <kaber@...sh.net>,
	Urs Thuermann <urs.thuermann@...kswagen.de>,
	Oliver Hartkopp <oliver.hartkopp@...kswagen.de>
Subject: Re: [PATCH 2/7] CAN: Add PF_CAN core module

On Thu, 2007-11-15 at 08:40 +0100, Oliver Hartkopp wrote:
> Stephen Hemminger wrote:
> >> +#ifdef CONFIG_CAN_DEBUG_CORE
> >> +extern void can_debug_skb(struct sk_buff *skb);
> >> +extern void can_debug_cframe(const char *msg, struct can_frame *cframe);
> >> +#define DBG(fmt, args...)  (DBG_VAR & 1 ? printk( \
> >> +					KERN_DEBUG DBG_PREFIX ": %s: " fmt, \
> >> +					__func__, ##args) : 0)
> >> +#define DBG_FRAME(fmt, cf) (DBG_VAR & 2 ? can_debug_cframe(fmt, cf) : 0)
> >> +#define DBG_SKB(skb)       (DBG_VAR & 4 ? can_debug_skb(skb) : 0)
> >> +#else
> >> +#define DBG(fmt, args...)
> >> +#define DBG_FRAME(fmt, cf)
> >> +#define DBG_SKB(skb)
> >> +#endif

I would prefer the more frequently used macro style:

#define DBG(fmt, args...) \
	do { if (DBG_VAR & 1) printk(KERN_DEBUG DBG_PREFIX ": %s: " fmt, \
				     __func__, ##args); } while (0)

#define DBG_FRAME(fmt, cf) \
	do { if (DBG_VAR & 2) can_debug_cframe(fmt, cf); } while (0)

#define DBG_SKB(skb) \
	do { if (DBG_VAR & 4) can_debug_skb(skb); } while (0)
		

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ