From patchwork Fri May 25 21:09:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 136993 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp69803lji; Fri, 25 May 2018 14:10:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpWTNWfdJmgiLeZ4PnejgM6SV3b6ncG0tuFRTNggg38R2+bnqFglYju9JyePyikeP9ZjkB+ X-Received: by 2002:a63:9205:: with SMTP id o5-v6mr3209038pgd.233.1527282630380; Fri, 25 May 2018 14:10:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527282630; cv=none; d=google.com; s=arc-20160816; b=pwgbtYXE/nNAOTczdr9JQKGWnxwq/Rnpb73xx0MZLSS2tDzoDPy4XCz/8rnx2BHm1n buQ/pX048c6yfTqjafAFpwE4MIb+J9IAu3txpb1w4NJpt7SY66GN/DwkDBsi33PUjknp m7FgCT3qNMAbHFGtmriy3MvN+xU3NmpyZPDw0Ao5bkYmGzIx5K8QHWAIDhi1VGdk/Xil ptUzQ97cMNcub5hpBZ8s3JsluiAhLAS6P1PCQ/qV9dcs86MwpRaskXGk1fOtG+oPrddK uei7RSW1eBpEEFVH8jWzJRI8cOVwJOjFi8PqJunoCzKyY4wcKRydvmMpdSW7XeKI2xZn diVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=82BhG9f8CYSz+BDMQeoUXYqIKQfgW1cLPIh7HkiS7sU=; b=b9vmmCSOyxLxi+96NCkGIj2qFsu07wmz8DEq7qSpbvn7CLRkjhfPGSSMlZrfWenmdV ppRiHj9C7Qk8EPHkA/v2CgyRnv1HOFdv/rTl1RGMYJKBwUhWywPb1Q30SksxXC2EqQMp UYljt/gPAf145dnf4bfBS+nN6T+N8tPKYpmspd2/I8TSU6X/i3F9tgM7OluBiyzTidN4 UtuzRGSH9mCp7w58TK3QnFym2pdHBWQJ+LATTSxJE41FMlhgc/yzFKjbDURFIsSzf0E7 f8EITEI11ZER7k8Or8YHLNhWeyn+PBS7a4Ch4RBBbb0cI8UyqZFANuhQb6LvYblp8OO+ D8BA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-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 s14-v6si24040506plp.589.2018.05.25.14.10.30; Fri, 25 May 2018 14:10:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-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-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030283AbeEYVK3 (ORCPT + 2 others); Fri, 25 May 2018 17:10:29 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:45943 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030215AbeEYVK2 (ORCPT ); Fri, 25 May 2018 17:10:28 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0LqDBo-1g02Rc0NsW-00dnFY; Fri, 25 May 2018 23:10:00 +0200 From: Arnd Bergmann To: Jean Delvare Cc: Arnd Bergmann , Wolfram Sang , Jarkko Nikula , Hans de Goede , Srinivas Pandruvada , Qiuxu Zhuo , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] i2c: i801: mark PM functions as __maybe_unused Date: Fri, 25 May 2018 23:09:46 +0200 Message-Id: <20180525210952.1861881-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:CjoKwSHAKJNuasF0wc15cV580fDH7K240GtXv1lS6Ba4Lcf5U4V yVI1837OdxJC/qW4OdkcKCYHKsoOF9B+KKXJ91wB8B+daib3BONCWdS8CUvUftmU97dmz35 PT8TE8iLpDl8Em7nvHEWgrgcRS0jGWdWwUuKaO/8Uus+OUcFM+HfMqlb0WDnG/FqVRGoXGG i0RsZ91SpjcruNQRYXWhg== X-UI-Out-Filterresults: notjunk:1; V01:K0:lDsks6AogT0=:wiqyVgsAZ1cwTMKrXDeXH+ 9lncBvlXjjGL1t4EqY4NSIndYUwVKPytLCxzR8KoZ7NpYIvGRFoWBvhOC+9YpkWW5n4Peb9ib PyKc++Nfb7/jTxsd21wvWq8f95gKLf8aEggyI00653vRirzVewOqy9637JvfJTzzenKtSPVZB 8/i9X73SysBXqbQoGjK5umlvMlB6TrSyMklV/+0h6Gm5ktDh/iIj/P83er04tNgrm8veWT9Uz oUqUi65mJOkBluaYWPy+O0ZlVtaeJs0R8KRzV3kpiX35gooRradRjublpuYsBA6oNxDlu1+8B mMclUYBubs0pJAb6sUITnF6nQgspPZ+SuoyPG5JZuYhTle28/55eNTyJb1f872nfC5qXgpiER ahIgeTs1uBsFp1oystOl9Nva9rqQS3qnEuP05njdROOrbFEI0AvqCkow9iqSxijRXEauDqYEy /sPdBkwXHL3vqAcG8VU7n/eX3cGNF0QYYE666zU2s6+wkzAnc+qVoAq5iJsRtkhbOY/W1iab+ 4HGuCLJY0SmOYDFT4q1paYPDCGCtuQ0Wb1FOqmNZhwFBxhPnaTekaO4SOhRs3BN18cO3AHdea /dM3FX9h40Yn4aHvQjzgezN1r4SMl1cPLsneVhOT9/CoTWEpC2mFj//TxUwVe55/OAN9wTgFE qi/PDEnBNLw02keV6Jbu+9JeGg7JHLIY7BHtJECCvKFOJHo59ZmwcY0HVraYyHXjA7xM= Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Changing from UNIVERSAL_DEV_PM_OPS to SIMPLE_DEV_PM_OPS caused a harmless warning in configurations without CONFIG_PM_SLEEP: drivers/i2c/busses/i2c-i801.c:1723:12: error: 'i801_resume' defined but not used [-Werror=unused-function] static int i801_resume(struct device *dev) ^~~~~~~~~~~ drivers/i2c/busses/i2c-i801.c:1714:12: error: 'i801_suspend' defined but not used [-Werror=unused-function] static int i801_suspend(struct device *dev) This removes the incorrect #ifdef and instead marks both functions as __maybe_unused, which is a more robust way to express the same thing. Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") Signed-off-by: Arnd Bergmann --- drivers/i2c/busses/i2c-i801.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.9.0 diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index ed07f9002710..d6d46e7a5376 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -1710,8 +1710,7 @@ static void i801_shutdown(struct pci_dev *dev) pci_write_config_byte(dev, SMBHSTCFG, priv->original_hstcfg); } -#ifdef CONFIG_PM -static int i801_suspend(struct device *dev) +static int __maybe_unused i801_suspend(struct device *dev) { struct pci_dev *pci_dev = to_pci_dev(dev); struct i801_priv *priv = pci_get_drvdata(pci_dev); @@ -1720,7 +1719,7 @@ static int i801_suspend(struct device *dev) return 0; } -static int i801_resume(struct device *dev) +static int __maybe_unused i801_resume(struct device *dev) { struct pci_dev *pci_dev = to_pci_dev(dev); struct i801_priv *priv = pci_get_drvdata(pci_dev); @@ -1729,7 +1728,6 @@ static int i801_resume(struct device *dev) return 0; } -#endif static SIMPLE_DEV_PM_OPS(i801_pm_ops, i801_suspend, i801_resume);