Received: by 10.223.185.116 with SMTP id b49csp1123950wrg; Fri, 23 Feb 2018 12:20:38 -0800 (PST) X-Google-Smtp-Source: AH8x22728i3a82j2wlmrbxFWWq8OqWqybkddPgmQ62jJoDSL6f8nYbcRf9DQuB19zfIvhe6lREdM X-Received: by 10.98.233.21 with SMTP id j21mr2884500pfh.123.1519417238248; Fri, 23 Feb 2018 12:20:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417238; cv=none; d=google.com; s=arc-20160816; b=E6gRaCV2jbzKj6Yn20ui6Wo2dnxJ1r2gBBHtUY5fmxBR2rtV88PGU+bqHB3tekJcdl 2G+msYRkpfCuSFwOnxBbSowJXVCy6ODA50MSlZNp3oqeudAZsau3AhHnuSMSbW0XrqGJ Te+XE5txF0a6E9HtA1xS2ftnVWdhh+w2muXrFyJP7WvzwCtk2mWdI2dlghKo5CV6sS0t n8RfpnYf/A+bJs4xftyPgzgAMwyL1S34PrItiU1tiSxHF4vKV5+M5iyhCeSKIr1aGUK8 4C3CPez1HyvF07k0/k1T4TZWNse9YSyiZ5bebXGjhtc7EFnbRoMKKA+Y46QLaF+HNNbn Af7Q== 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=sDEvdRCtHzj4GjkKYzR3APbbqTLrBiPG4dLBfZ6Fh4I=; b=sOsocLJ4LMCxU4CPlqwMRVe/Odhptl9p/tr1SHCu9H5k3N4bkIU0tZKVy58/aJCqH0 1fkT+MAV0zQQmknvjcfS8d8pSOnuaRLwIfR3rTeLVZMoslWKNQShWF1k6FstG613bdid E17ouuRbLe5q25ks4SjzK/ZH5R41dBbOYrKiGV3wE2/02AazKfOAXzjB+A9WoXh8D+Px A5ZoTJeSdOHZk2F9j0gsCE7zfZ2UdbmjaYwSqLlqZ6UDvXTv+qL/E2Cdj3jtPlQXerfs HuIxu0lmXO4mrdha/q3MkqApHX1xVPMM05NaB/q8bQJNczfxwesbT1sdFE0ryB6X4pdY k9ew== 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 q16-v6si2218916pls.338.2018.02.23.12.20.22; Fri, 23 Feb 2018 12:20:38 -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 S1755270AbeBWUTU (ORCPT + 99 others); Fri, 23 Feb 2018 15:19:20 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39762 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932241AbeBWSji (ORCPT ); Fri, 23 Feb 2018 13:39:38 -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 C727D1182; Fri, 23 Feb 2018 18:39:37 +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.4 147/193] gpio: xgene: mark PM functions as __maybe_unused Date: Fri, 23 Feb 2018 19:26:20 +0100 Message-Id: <20180223170348.920384237@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@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.4-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 inline struct xgene_gpio *to_xgene_gpio(struct gpio_chip *chip) @@ -132,8 +130,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; @@ -146,7 +143,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; @@ -160,10 +157,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) { @@ -230,7 +223,7 @@ static struct platform_driver xgene_gpio .driver = { .name = "xgene-gpio", .of_match_table = xgene_gpio_of_match, - .pm = XGENE_GPIO_PM_OPS, + .pm = &xgene_gpio_pm, }, .probe = xgene_gpio_probe, .remove = xgene_gpio_remove,