Received: by 10.223.185.116 with SMTP id b49csp1038661wrg; Fri, 23 Feb 2018 10:48:01 -0800 (PST) X-Google-Smtp-Source: AH8x224YUEt3+7UqT3cV1oHtsjv9S7ek3EFVJbe9pBY9gcvCSIlBsCR3yt06S1PX+swEXLZiAySo X-Received: by 10.98.18.143 with SMTP id 15mr2714448pfs.104.1519411681339; Fri, 23 Feb 2018 10:48:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519411681; cv=none; d=google.com; s=arc-20160816; b=UNnug2bPWHZEVNZ/1l8l++s6DOjR5S6HT1xGRRnIHdhVsgnlgHkvmkyX1nx1Q7vQDV NuTI9WYzqC/II8nJvrHU400yBxA40KX2znvdIp313376KBPqrbdZwR0QU4P18WyE4Iur VVr2v3bhP4K6v47OqxaU29yzl7azvXksCfiBvOf9e1+aODckWLzqVDHHP1RH1dTNWhcL qwCS1oZZ/TxyfoJyGzc7Gs2pWcjylcZVhqqGsiJKQpIg+yY7wT6ylQPkDNs1SDdXz8mE 2TuadaNdMz+IAl4FdWnLKKsuqF9kPtEUsQoH3HstwgJ0+598EVn+dsMF6GoHBvjmNcIq 7JxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=I/IGhRbhGUYX8A0F3lVP+4AC42zCQ+cGcVPzCaF7pus=; b=oYF8P/H8ghQe7QQARMryZxpMxjPppoIwJ2lyGQr/ttPdUKdd51cFOCZEROzv6uf1wM dObEebd4NFrG98UWNcedQO9nInNVaUvmtmRTYxqVl18R1wdyAprPAnlVCqlEhmbleh2R S1cURImXm4Q661wqjZAAk45OTFyNRTrXMCHEHbu5Zywj9NB7iTlNHcRDXnjwi6p6IWeW VDMgEp6sr5GjvgQaJJ+1fssONfwphLRGt6FFATErWsyHwFof0djornlGNJv3Bzyc68jl e16kYZuObrKxOxThskMZUvDh5iwIeis+hu37jAhn/hy61FECtNHoKlVg1ruvURSC190t qflQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si1412746pgv.456.2018.02.23.10.47.46; Fri, 23 Feb 2018 10:48:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934088AbeBWSrB (ORCPT + 99 others); Fri, 23 Feb 2018 13:47:01 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44130 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934058AbeBWSq6 (ORCPT ); Fri, 23 Feb 2018 13:46:58 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D762ED1F; Fri, 23 Feb 2018 18:46:57 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Linus Walleij Subject: [PATCH 4.9 105/145] gpio: xgene: mark PM functions as __maybe_unused Date: Fri, 23 Feb 2018 19:26:51 +0100 Message-Id: <20180223170738.367353878@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit b115bebc07f282067eccc06fd5aa3060ab1426da upstream. When CONFIG_PM_SLEEP is disabled, we get a warning about unused functions: drivers/gpio/gpio-xgene.c:155:12: warning: 'xgene_gpio_resume' defined but not used [-Wunused-function] static int xgene_gpio_resume(struct device *dev) ^~~~~~~~~~~~~~~~~ drivers/gpio/gpio-xgene.c:142:12: warning: 'xgene_gpio_suspend' defined but not used [-Wunused-function] static int xgene_gpio_suspend(struct device *dev) The warnings are harmless and can be avoided by simplifying the code and marking the functions as __maybe_unused. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpio-xgene.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) --- a/drivers/gpio/gpio-xgene.c +++ b/drivers/gpio/gpio-xgene.c @@ -42,9 +42,7 @@ struct xgene_gpio { struct gpio_chip chip; void __iomem *base; spinlock_t lock; -#ifdef CONFIG_PM u32 set_dr_val[XGENE_MAX_GPIO_BANKS]; -#endif }; static int xgene_gpio_get(struct gpio_chip *gc, unsigned int offset) @@ -138,8 +136,7 @@ static int xgene_gpio_dir_out(struct gpi return 0; } -#ifdef CONFIG_PM -static int xgene_gpio_suspend(struct device *dev) +static __maybe_unused int xgene_gpio_suspend(struct device *dev) { struct xgene_gpio *gpio = dev_get_drvdata(dev); unsigned long bank_offset; @@ -152,7 +149,7 @@ static int xgene_gpio_suspend(struct dev return 0; } -static int xgene_gpio_resume(struct device *dev) +static __maybe_unused int xgene_gpio_resume(struct device *dev) { struct xgene_gpio *gpio = dev_get_drvdata(dev); unsigned long bank_offset; @@ -166,10 +163,6 @@ static int xgene_gpio_resume(struct devi } static SIMPLE_DEV_PM_OPS(xgene_gpio_pm, xgene_gpio_suspend, xgene_gpio_resume); -#define XGENE_GPIO_PM_OPS (&xgene_gpio_pm) -#else -#define XGENE_GPIO_PM_OPS NULL -#endif static int xgene_gpio_probe(struct platform_device *pdev) { @@ -241,7 +234,7 @@ static struct platform_driver xgene_gpio .name = "xgene-gpio", .of_match_table = xgene_gpio_of_match, .acpi_match_table = ACPI_PTR(xgene_gpio_acpi_match), - .pm = XGENE_GPIO_PM_OPS, + .pm = &xgene_gpio_pm, }, .probe = xgene_gpio_probe, };