Received: by 10.223.185.116 with SMTP id b49csp1130933wrg; Fri, 23 Feb 2018 12:28:47 -0800 (PST) X-Google-Smtp-Source: AH8x227fzEJ+Fmun+E9m4amYoM5VW3gY0+undRvFJAnbNDW/5guZeSmv8V/woq7iniYBjY5su9V4 X-Received: by 10.98.228.3 with SMTP id r3mr1344148pfh.77.1519417727136; Fri, 23 Feb 2018 12:28:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417727; cv=none; d=google.com; s=arc-20160816; b=OvjvA9/O2kbA1gQp5jZfl/onCYVuOYQrt2NMPwb96SfMzGZspAQnQCLHDiRlZRS0C4 kZtYQ9qDvD6EZ375ZYXrV0xNeg3tV6u9UhoEy2iOl7iSeyC8QRUu2A1K2qTOoc7prPox rufjzwr6FKra/qikHcPf+5G9CD6m+9bu6KQyL0pYyb42cDjU6alhyA2OcB82ysyEtcKt va4wYH4BqBTq5R3rV47IVgYP9z/M1zi3xcqUlsqlf9R12yupsLWDxuLmhT9XX8FWGlz4 qXR3sKyMZ6pwlPTQEkxF/Vl07qhRrP/tnJNdh4ZqY07ntSx2hcODYRgR86+z8mEsty9e uKvQ== 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=auT36D+I8882IG7bmvl5icimmvk+byl9pHutnc2JHss=; b=yhEu675Xiz3HWT7iizJfAj2MqF32pIaseeWLSiSOgWce+T153gmUMzaP9GM5iNDgZO HTlIBaWp0JFs5alCgiZwaENZ0aylx2sAgW3QUVmoXiPGxElvD/quyH7xaQK3Xn3XyViy pig2RDobAo6r84agPh792O2Tfxll3GhX8mzTS56yDwzHHroNTGvgPfpcHf6N4ku02NUD d3fOCuSUHu28+fWIMe2L6KF8mfkgJEeh4QVCyvokLLKY+xBaEcckabzlq6vNjmORTqJE IveIXJ4Ipai+xS8qs1HXn2AQKtYTsFRTtr10gPw2xItENFHSXQ9XDdacJamS4NWxgj8Q 4k0g== 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 k14si1925850pgp.812.2018.02.23.12.28.32; Fri, 23 Feb 2018 12:28:47 -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 S1754167AbeBWShE (ORCPT + 99 others); Fri, 23 Feb 2018 13:37:04 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38358 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753303AbeBWShC (ORCPT ); Fri, 23 Feb 2018 13:37:02 -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 83BF58F5; Fri, 23 Feb 2018 18:37:01 +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 094/193] staging: ste_rmi4: avoid unused function warnings Date: Fri, 23 Feb 2018 19:25:27 +0100 Message-Id: <20180223170340.748931974@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 9045a4a7e686a6316129d6d0b21b4fe2520968e4 upstream. The rmi4 touchscreen driver encloses the power-management functions in #ifdef CONFIG_PM, but the smtcfb_pci_suspend/resume functions are only really used when CONFIG_PM_SLEEP is also set, as a frequent gcc warning shows: ste_rmi4/synaptics_i2c_rmi4.c:1050:12: warning: 'synaptics_rmi4_suspend' defined but not used ste_rmi4/synaptics_i2c_rmi4.c:1084:12: warning: 'synaptics_rmi4_resume' defined but not used This changes the driver to remove the #ifdef and instead mark the functions as __maybe_unused, which is a nicer anyway, as it provides build testing for all the code in all configurations and is harder to get wrong. Signed-off-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c +++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c @@ -1039,7 +1039,6 @@ static int synaptics_rmi4_remove(struct return 0; } -#ifdef CONFIG_PM /** * synaptics_rmi4_suspend() - suspend the touch screen controller * @dev: pointer to device structure @@ -1047,7 +1046,7 @@ static int synaptics_rmi4_remove(struct * This function is used to suspend the * touch panel controller and returns integer */ -static int synaptics_rmi4_suspend(struct device *dev) +static int __maybe_unused synaptics_rmi4_suspend(struct device *dev) { /* Touch sleep mode */ int retval; @@ -1081,7 +1080,7 @@ static int synaptics_rmi4_suspend(struct * This function is used to resume the touch panel * controller and returns integer. */ -static int synaptics_rmi4_resume(struct device *dev) +static int __maybe_unused synaptics_rmi4_resume(struct device *dev) { int retval; unsigned char intr_status; @@ -1112,8 +1111,6 @@ static int synaptics_rmi4_resume(struct return 0; } -#endif - static SIMPLE_DEV_PM_OPS(synaptics_rmi4_dev_pm_ops, synaptics_rmi4_suspend, synaptics_rmi4_resume);