Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4630442imm; Mon, 14 May 2018 10:13:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr4ZC1Tuqcl+9Ti+7xTSqOgcDjNrWddS/oKUXErR0qsxWiJt6rYOv+6GhPjVbK2xr880pSR X-Received: by 2002:a63:b108:: with SMTP id r8-v6mr9211754pgf.438.1526318003684; Mon, 14 May 2018 10:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526318003; cv=none; d=google.com; s=arc-20160816; b=SJnRg/pOeJxn4RYPt8buDQoBke3UWwWDjKYtMfDUZle6++qPxHHOCJoq1SMslDLTw+ TwMkk0N3navzP/B1FNIgDN/p/VGRvFi9241H1M9WJlVoUnFV1z826uVcI5GpI1WnYC7G DPwGxHD0wZHvZAfoA5mZARovwA+F5IWI41nwaKAX9p2J7qtSgw0P77e22Prk6G4bLhmo w1UcC4OYmJf3KjBNRA43A+LwFRQq0erOPgN65Uj8/vvYRw5e3XFlIO5dLCFc4nHK8du3 s+IiDYVZT4h5Co6Gd/RfFgLHcSObv2lBhRiq6K/zpsYxYkyUFDYDGy8AK3MaGS7ivzoh pSNQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=0GyryIlI3hXcmZ/xAtfEIVvSLX9agzcAOtknNwJCF8c=; b=iWkrOAMJF6SbsdzWfUnoBef3DEJfbxFK4aSGojk7FtjLDQVBqIVJKTlo1csUaf3UWz aU+BexGp0Pi+1gSdUkBVKefPM/gK0rsK1hdaJX+d0z5Nr+DqsgJphXwuge0cC7UVbW5N bmErcNN+zm0FW6tByzY6yEuszqndQR7YCtSxapu1iI9BuNOUwI6Wm4QTBYAJ6IIrvMgg QeMpbHYxSAWnGv/DLXxZJJIPasyb84eBdYll/viJw7YCbzMYOsRxStLi95qn5GqJnEE5 jMsLMqRhuckbMBWBnZf+vmMWcoxtz96wpTvC+lh2K/wJ3F3BbFZfl/QrvBppGd6TMuXb XpkQ== 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 v4-v6si7955094pgn.260.2018.05.14.10.13.08; Mon, 14 May 2018 10:13:23 -0700 (PDT) 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 S1754421AbeENPCo convert rfc822-to-8bit (ORCPT + 99 others); Mon, 14 May 2018 11:02:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:60159 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754394AbeENPCn (ORCPT ); Mon, 14 May 2018 11:02:43 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1B412ADC6; Mon, 14 May 2018 15:02:42 +0000 (UTC) Date: Mon, 14 May 2018 17:02:40 +0200 From: Jean Delvare To: Anders Roxell Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] i2c: i801: fix unused-function warning Message-ID: <20180514170240.0b72a2d2@endymion> In-Reply-To: <20180514093326.30314-1-anders.roxell@linaro.org> References: <20180510152719.6e37b10e@endymion> <20180514093326.30314-1-anders.roxell@linaro.org> Organization: SUSE Linux X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 May 2018 11:33:26 +0200, Anders Roxell wrote: > With CONFIG_PM, we get a harmless build warning: > drivers/i2c/busses/i2c-i801.c:1723:12: warning: ‘i801_resume’ defined but not used [-Wunused-function] > static int i801_resume(struct device *dev) > ^~~~~~~~~~~ > drivers/i2c/busses/i2c-i801.c:1714:12: warning: ‘i801_suspend’ defined but not used [-Wunused-function] > static int i801_suspend(struct device *dev) > ^~~~~~~~~~~~ > > Follow design pattern from other drivers like i2c-brcmstb, i2c-mpc, > i2c-ocores, i2c-pnx, i2c-puv3, i2c-st, i2c-stu300 and i2c-mux-pca954x > and changing the ifdef CONFIG_PM to CONFIG_PM_SLEEP. > > Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") > Signed-off-by: Anders Roxell > --- > drivers/i2c/busses/i2c-i801.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c > index ed07f9002710..954fb3f3b7fc 100644 > --- a/drivers/i2c/busses/i2c-i801.c > +++ b/drivers/i2c/busses/i2c-i801.c > @@ -1710,7 +1710,7 @@ static void i801_shutdown(struct pci_dev *dev) > pci_write_config_byte(dev, SMBHSTCFG, priv->original_hstcfg); > } > > -#ifdef CONFIG_PM > +#ifdef CONFIG_PM_SLEEP > static int i801_suspend(struct device *dev) > { > struct pci_dev *pci_dev = to_pci_dev(dev); Reviewed-by: Jean Delvare Thanks, -- Jean Delvare SUSE L3 Support