Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp819632ybt; Tue, 7 Jul 2020 00:44:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6SjpaCIUpBPCr2uYHmlpAVNPs8yOMIoW2qT3Y3dQMn5JCoyqN+gdESg02iGN2Ik9EDx29 X-Received: by 2002:a50:f0c6:: with SMTP id a6mr7527727edm.374.1594107876099; Tue, 07 Jul 2020 00:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594107876; cv=none; d=google.com; s=arc-20160816; b=NtbXDoB0ha7VkF294Hif5lD+youvA65Sz88OoeDgRhT8/5dx7EqRZPL4UsjxYPYqxO hSv4eBFrzGfJcDWikPGaS9RMoqm4CYB1Ith4lRCFqFBYVAwkyBGLqoLl/x6BT8RwSRMC S4d1PrSHgJKW7MuINI4fmn0I6JQedE84sdBGCQs568CFcKm2LocsLJssEnTi/vjSgtEA +CBsP6GDROh0nTW9Y0YEleEwELM/WMu+5AdQi/GsCgAT5lmjyW7oJiFTiGuXQBr/M+Ra WWxoOS6OiXFLgO1/+BWw2+Cv+8QM6kiYaxcLfFFMl2oOIAfl1lPIJFh9cs4NVX4IwWNh brPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Oqg0waFV1lp8h1+Iq31KyC6DKlnZLj0Pwy1UxBj6Ho8=; b=AJ+NZU1I04GZcC8qNVaYfhxTuUrR+rTwPV1d7dCg7zhqoWKbXZYClFWFO8H/Oo9F4E 8uvFs5XVkiLaVtqYhL0ZIks7Jvkx7a55Cdk23VdwgU9N4CWhP8UzL/iESV0PRlykXA2q P8P6cZ+tmLgAYQKEVZ35Hkfb55paH0m2N36/3KXHiyOaMgW/PaJxphisLLxt7Mlt8iER +6TsP4jMhDYpQmjn0P33XQ+jfMusa+Te0kffIjcxx4KtQjSXtznDWREXerpXWsOOHOfG vt1IQna44aPPTyqRfru1SkQl0xgs9GbzJLfR6E21W7cfedEnKviuNi9nA8Xcc3fx/Z9b bc0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DAsb8bSZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n24si14232327edt.561.2020.07.07.00.44.11; Tue, 07 Jul 2020 00:44:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DAsb8bSZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbgGGHny (ORCPT + 99 others); Tue, 7 Jul 2020 03:43:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725825AbgGGHnx (ORCPT ); Tue, 7 Jul 2020 03:43:53 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EBA5C061755; Tue, 7 Jul 2020 00:43:53 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id o13so16651271pgf.0; Tue, 07 Jul 2020 00:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Oqg0waFV1lp8h1+Iq31KyC6DKlnZLj0Pwy1UxBj6Ho8=; b=DAsb8bSZtj79L46P+civ1l7WY7x77+BCU4mrZLoBfLIpXtNgH1HY/lGwcKX2o3IbLD 5YRotXnwFtE0/TLB7mK53OSZivzhuVYrhazRzq+ZZ6HVXVsn2BmZBf8z8/XZ+m2Uh8ev bBcfzjmSV01aIEj+gdxVZvQ48Qx50LPHGWxHhGlnK2wC7rrJAiUw3wfAAm1GYV1VrnTs RTPqS5j1+9Cxw44HyDO6ExYYCPzmdqCqvIj+0AZGi/cL34fB+11+/LIPWONa2K4EA4/q 19V0Al4aVIL718Dqf1AvU/RGpCkCwOrFh29Egcac8Nn27l613DujT9givcMQe+j6yewv dCaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Oqg0waFV1lp8h1+Iq31KyC6DKlnZLj0Pwy1UxBj6Ho8=; b=nKPlFdosCkykiq48AAwmA1V4p+cWiapFvAodt1v2595pxbC9S4DLWDeFPQx98aWKCK W9QSrAQeopJmojHDXOj/X1TS4YxqkNBnviDgtXAUvWSgNIlEGKQZgHZkDx+DOcVck5Pk r45EwR2cXQziTro1QW3a3NpUD6hn/fXtYXrlYaS4TsMoK0dDG/w4TEcq9bFowAX3f6FP /A+wBnp7FK2L6bZ5tWNWlKdxooZh+JVSQUlHQzQ9eeTUemwlmjfgv0bZWfnBl37T2cXZ mEK51aNCdx5A4LUiqvlYcGv3IzCkRQKWK+0ukXZukOIKSKbj80E4lj7Opblxw/Nk9Ucx MPnw== X-Gm-Message-State: AOAM533n923SLP9MD/ycY5zp+2psE1L4KyfUrc7C4op32Z4pwaHHbkR0 84tRQ4l3PhEGzS30tirC2vU= X-Received: by 2002:a62:fb06:: with SMTP id x6mr48186275pfm.28.1594107832958; Tue, 07 Jul 2020 00:43:52 -0700 (PDT) Received: from varodek.iballbatonwifi.com ([103.105.153.67]) by smtp.gmail.com with ESMTPSA id s30sm21439248pgn.34.2020.07.07.00.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 00:43:52 -0700 (PDT) From: Vaibhav Gupta To: Bjorn Helgaas , Bjorn Helgaas , bjorn@helgaas.com, Vaibhav Gupta , "David S. Miller" , Jakub Kicinski , Stephen Rothwell Cc: Vaibhav Gupta , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org Subject: [PATCH net-next] sun/niu: add __maybe_unused attribute to PM functions Date: Tue, 7 Jul 2020 13:11:22 +0530 Message-Id: <20200707074121.230686-1-vaibhavgupta40@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The upgraded .suspend() and .resume() throw "defined but not used [-Wunused-function]" warning for certain configurations. Mark them with "__maybe_unused" attribute. Compile-tested only. Fixes: b0db0cc2f695 ("sun/niu: use generic power management") Reported-by: Stephen Rothwell Signed-off-by: Vaibhav Gupta --- drivers/net/ethernet/sun/niu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 68541c823245..b4e20d15d138 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c @@ -9873,7 +9873,7 @@ static void niu_pci_remove_one(struct pci_dev *pdev) } } -static int niu_suspend(struct device *dev_d) +static int __maybe_unused niu_suspend(struct device *dev_d) { struct net_device *dev = dev_get_drvdata(dev_d); struct niu *np = netdev_priv(dev); @@ -9900,7 +9900,7 @@ static int niu_suspend(struct device *dev_d) return 0; } -static int niu_resume(struct device *dev_d) +static int __maybe_unused niu_resume(struct device *dev_d) { struct net_device *dev = dev_get_drvdata(dev_d); struct niu *np = netdev_priv(dev); -- 2.27.0