diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-07-25 17:35:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-25 21:22:45 -0700 |
commit | 67a75194bce07669bf11e14a24a95f64ebde8b47 (patch) | |
tree | d34a52b2d747410acc2f79f566fb77907ab1e92e /firmware | |
parent | 34c8c10a766c8daf42293664f5c9ca5516fa3f41 (diff) | |
download | linux-67a75194bce07669bf11e14a24a95f64ebde8b47.tar.bz2 |
virtio-net: mark PM functions as __maybe_unused
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>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions