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]
Message-ID: <20110122234051.GA30734@rere.qmqm.pl>
Date:	Sun, 23 Jan 2011 00:40:51 +0100
From:	Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:	Joe Perches <joe@...ches.com>
Cc:	netdev@...r.kernel.org, Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [PATCH v2 03/16] net: reduce and unify printk level in
	netdev_fix_features()

On Sat, Jan 22, 2011 at 03:12:22PM -0800, Joe Perches wrote:
> On Sat, 2011-01-22 at 23:14 +0100, Michał Mirosław wrote:
> > Reduce printk() levels to KERN_INFO in netdev_fix_features() as this will
> > be used by ethtool and might spam dmesg unnecessarily.
> > diff --git a/net/core/dev.c b/net/core/dev.c
> > index 01d7ce2..168588f 100644
> > --- a/net/core/dev.c
> > +++ b/net/core/dev.c
> > @@ -5127,58 +5127,52 @@ static void rollback_registered(struct net_device *dev)
> >  	rollback_registered_many(&single);
> >  }
> >  
> > -u32 netdev_fix_features(u32 features, const char *name)
> > +u32 netdev_fix_features(struct net_device *dev, u32 features)
> 
> Perhaps this would be simpler as:
> void netdev_fix_features(struct net_device *dev)

Code introduced in next patches in the series pass modified features
values here.

> >  {
> >  	/* Fix illegal checksum combinations */
> >  	if ((features & NETIF_F_HW_CSUM) &&
> >  	    (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
> 
> 	if (dev->features & etc...) {
> 		dev->features &= etc...)
> 
> > +		netdev_info(dev,0
> > +			"mixed HW and IP checksum settings.\n");
> 
> Fits nicely on a single line:
> 
> 		netdev_info(dev, "mixed HW and IP checksum settings\n"); 

Fixed.

> >  		features &= ~(NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM);
> >  	}
> >  
> >  	if ((features & NETIF_F_NO_CSUM) &&
> >  	    (features & (NETIF_F_HW_CSUM|NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
> > -		if (name)
> > -			printk(KERN_NOTICE "%s: mixed no checksumming and other settings.\n",
> > -				name);
> > +		netdev_info(dev,
> > +			"mixed no checksumming and other settings.\n");
> 
> Here too, etc...
> 		netdev_info(dev, "mixed no checksumming and other settings\n");

This one is actually exactly 80 chars then, fixed this and another one.

Long time ago there were editors which added spurious empty line when line
length matched terminal's width. Hope they're all gone by now. ;)

Best Regards,
Michał Mirosław
--
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