mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: mst@redhat.com, jasowang@redhat.com, john.fastabend@gmail.com,
	willemb@google.com, bigeasy@linutronix.de, edumazet@google.com,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] virtio-net: mark PM functions as __maybe_unused
Date: Tue, 25 Jul 2017 21:23:13 -0700 (PDT)	[thread overview]
Message-ID: <20170725.212313.1074903864708351840.davem@davemloft.net> (raw)
In-Reply-To: <20170725153600.211694-1-arnd@arndb.de>

From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 25 Jul 2017 17:35:50 +0200

> After removing the reset function, the freeze and restore functions
> are now unused when CONFIG_PM_SLEEP is disabled:
> 
> drivers/net/virtio_net.c:1881:12: error: 'virtnet_restore_up' defined but not used [-Werror=unused-function]
>  static int virtnet_restore_up(struct virtio_device *vdev)
> drivers/net/virtio_net.c:1859:13: error: 'virtnet_freeze_down' defined but not used [-Werror=unused-function]
>  static void virtnet_freeze_down(struct virtio_device *vdev)
> 
> A more robust way to do this is to remove the #ifdef around the callers
> and instead mark them as __maybe_unused. The compiler will now just
> silently drop the unused code.
> 
> Fixes: 4941d472bf95 ("virtio-net: do not reset during XDP set")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied, thanks.

      parent reply	other threads:[~2017-07-26  4:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 15:35 Arnd Bergmann
2017-07-26  3:21 ` Jason Wang
2017-07-26  4:23 ` 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=20170725.212313.1074903864708351840.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=willemb@google.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

all inboxes | Powered by JetHome®