From patchwork Fri Sep 6 02:28:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aaron Lu X-Patchwork-Id: 2854343 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9EF80C0AB5 for ; Fri, 6 Sep 2013 02:28:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9584202E6 for ; Fri, 6 Sep 2013 02:28:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2855202CF for ; Fri, 6 Sep 2013 02:28:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754031Ab3IFC2G (ORCPT ); Thu, 5 Sep 2013 22:28:06 -0400 Received: from mga14.intel.com ([143.182.124.37]:43460 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753732Ab3IFC2E (ORCPT ); Thu, 5 Sep 2013 22:28:04 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 05 Sep 2013 19:28:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,850,1371106800"; d="scan'208";a="356633940" Received: from aaronlu.sh.intel.com ([10.239.37.146]) by azsmga001.ch.intel.com with ESMTP; 05 Sep 2013 19:27:58 -0700 Message-ID: <52293DD4.6050403@intel.com> Date: Fri, 06 Sep 2013 10:28:36 +0800 From: Aaron Lu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: Amit Shah CC: Rusty Russell , "Rafael J. Wysocki" , virtualization@lists.linux-foundation.org, Linux-pm mailing list Subject: [PATCH] virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The virtio_pci_freeze/restore are defined under CONFIG_PM but is used by SET_SYSTEM_SLEEP_PM_OPS macro, which is defined under CONFIG_PM_SLEEP. So if CONFIG_PM_SLEEP is not cofigured but CONFIG_PM_RUNTIME is, the following warning message appeared: drivers/virtio/virtio_pci.c:770:12: warning: ‘virtio_pci_freeze’ defined but not used [-Wunused-function] static int virtio_pci_freeze(struct device *dev) ^ drivers/virtio/virtio_pci.c:790:12: warning: ‘virtio_pci_restore’ defined but not used [-Wunused-function] static int virtio_pci_restore(struct device *dev) ^ Fix it by changing CONFIG_PM to CONFIG_PM_SLEEP. Signed-off-by: Aaron Lu Reviewed-by: Amit Shah --- drivers/virtio/virtio_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 1aba255..98917fc 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -766,7 +766,7 @@ static void virtio_pci_remove(struct pci_dev *pci_dev) kfree(vp_dev); } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int virtio_pci_freeze(struct device *dev) { struct pci_dev *pci_dev = to_pci_dev(dev); @@ -824,7 +824,7 @@ static struct pci_driver virtio_pci_driver = { .id_table = virtio_pci_id_table, .probe = virtio_pci_probe, .remove = virtio_pci_remove, -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP .driver.pm = &virtio_pci_pm_ops, #endif };