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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 17 Jul 2014 12:21:39 -0700
From:	Joe Perches <joe@...ches.com>
To:	Veaceslav Falico <vfalico@...il.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	Jason Baron <jbaron@...mai.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Vlad Yasevich <vyasevic@...hat.com>,
	stephen hemminger <stephen@...workplumber.org>,
	Jerry Chu <hkchu@...gle.com>,
	Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [PATCH v3 net-next 2/2] net: print net_device reg_state in
 netdev_* unless it's registered

On Thu, 2014-07-17 at 19:46 +0200, Veaceslav Falico wrote:
[]
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
[]
> @@ -3444,7 +3459,8 @@ do {								\
>   * file/line information and a backtrace.
>   */
>  #define netdev_WARN(dev, format, args...)			\
> -	WARN(1, "netdevice: %s\n" format, netdev_name(dev), ##args)
> +	WARN(1, "netdevice: %s%s\n" format, netdev_name(dev),	\
> +	     netdev_reg_state(dev), ##args)

trivia:

My preference for style here is to have the format
and args on one line when it fits and separate
the format and args lines when they don't.

	WARN(1, "netdevice: %s%s\n" format,
	     netdev_name(dev), netdev_reg_state(dev), ##args)

Unrelated:  maybe it'd be better to change the '\n' to ": "

> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
[]
> -		res = printk(KERN_DEBUG "%s: %pV", netdev_name(dev), &vaf);
> +		res = printk(KERN_DEBUG "%s%s: %pV", netdev_name(dev),
> +			     netdev_reg_state(dev), &vaf);

etc...


--
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