netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: oneukum@suse.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] usbnet: silence an unnecessary warning
Date: Mon, 15 Jan 2018 13:55:44 -0500 (EST)	[thread overview]
Message-ID: <20180115.135544.804519768257591458.davem@davemloft.net> (raw)
In-Reply-To: <20180111150149.32528-1-oneukum@suse.com>

From: Oliver Neukum <oneukum@suse.com>
Date: Thu, 11 Jan 2018 16:01:49 +0100

> That a kevent could not be scheduled is not an error.
> Such handlers must be able to deal with multiple events anyway.
> As the successful scheduling of a work is a debug event, make
> the failure debug priority, too.
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> Reported-by: Cristian Caravena <caravena@gmail.com>
> ---
>  drivers/net/usb/usbnet.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
> index d56fe32bf48d..1e0bbe23f95c 100644
> --- a/drivers/net/usb/usbnet.c
> +++ b/drivers/net/usb/usbnet.c
> @@ -458,8 +458,7 @@ void usbnet_defer_kevent (struct usbnet *dev, int work)
>  {
>  	set_bit (work, &dev->flags);
>  	if (!schedule_work (&dev->kevent)) {
> -		if (net_ratelimit())
> -			netdev_err(dev->net, "kevent %d may have been dropped\n", work);
> +		netdev_dbg(dev->net, "kevent %d may have been dropped\n", work);
>  	} else {
>  		netdev_dbg(dev->net, "kevent %d scheduled\n", work);
>  	}

As Bjørn stated, you have to clean up the braces since both arms of the
conditional are now a single line and therefore should not get curly
braces.

Thank you.

      parent reply	other threads:[~2018-01-15 18:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11 15:01 [PATCH] usbnet: silence an unnecessary warning Oliver Neukum
2018-01-11 15:23 ` Bjørn Mork
2018-01-11 17:09   ` Oliver Neukum
2018-01-15 18:55 ` David Miller [this message]

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=20180115.135544.804519768257591458.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).