All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: Joe Perches <joe@perches.com>
Cc: netdev@vger.kernel.org, Ben Hutchings <bhutchings@solarflare.com>
Subject: Re: [PATCH v2 03/16] net: reduce and unify printk level in netdev_fix_features()
Date: Sun, 23 Jan 2011 00:40:51 +0100	[thread overview]
Message-ID: <20110122234051.GA30734@rere.qmqm.pl> (raw)
In-Reply-To: <1295737942.25868.114.camel@Joe-Laptop>

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

  reply	other threads:[~2011-01-22 23:40 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-22 22:14 [PATCH v2 00/16] net: Unified offload configuration Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 03/16] net: reduce and unify printk level in netdev_fix_features() Michał Mirosław
2011-01-22 23:12   ` Joe Perches
2011-01-22 23:40     ` Michał Mirosław [this message]
2011-01-23 12:44       ` [PATCH] " Michał Mirosław
2011-01-22 23:48   ` [PATCH v2 03/16] " Michał Mirosław
2011-01-24 23:45   ` David Miller
2011-01-22 22:14 ` [PATCH v2 01/16] net: Move check of checksum features to netdev_fix_features() Michał Mirosław
2011-01-24 23:29   ` David Miller
2011-01-22 22:14 ` [PATCH v2 02/16] net: change netdev->features to u32 Michał Mirosław
2011-01-23 10:35   ` Eric Dumazet
2011-01-23 12:44     ` [PATCH] " Michał Mirosław
2011-01-24 23:30   ` [PATCH v2 02/16] " David Miller
2011-01-25 11:07     ` Michał Mirosław
2011-01-25 20:37       ` David Miller
2011-01-22 22:14 ` [PATCH v2 08/16] loopback: convert to hw_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 12/16] jme: convert offload constraints to ndo_fix_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 05/16] net: ethtool: use ndo_fix_features for offload setting Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 11/16] bonding: convert to ndo_fix_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 06/16] net: use ndo_fix_features for ethtool_ops->set_flags Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 10/16] vlan: convert VLAN devices to use ndo_fix_features() Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 09/16] bridge: convert br_features_recompute() to ndo_fix_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 04/16] net: Introduce new feature setting ops Michał Mirosław
2011-01-24 23:51   ` David Miller
2011-01-25  1:26     ` Ben Hutchings
2011-01-22 22:14 ` [PATCH v2 07/16] net: introduce NETIF_F_RXCSUM Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 13/16] virtio_net: convert to ndo_fix_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 15/16] veth: convert to hw_features Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 16/16] skge: " Michał Mirosław
2011-01-31 16:45   ` Stephen Hemminger
2011-01-31 21:53     ` Michał Mirosław
2011-01-31 22:40       ` Michał Mirosław
2011-01-31 23:08       ` Michał Mirosław
2011-01-22 22:14 ` [PATCH v2 14/16] Intel net drivers: convert to ndo_fix_features Michał Mirosław
2011-01-24  7:06   ` Jeff Kirsher
2011-01-26  9:47   ` Jeff Kirsher
2011-04-07 12:51     ` Michał Mirosław
2011-04-07 15:00       ` Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110122234051.GA30734@rere.qmqm.pl \
    --to=mirq-linux@rere.qmqm.pl \
    --cc=bhutchings@solarflare.com \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.