Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4655794imm; Mon, 14 May 2018 10:38:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoZfdvm/ULQmQ/ZsSfFqgi3sShaZPUnZptC00Nx8JPkXTsZmJ+CRgkwXkNlmETccCM+wT9C X-Received: by 2002:a17:902:4603:: with SMTP id o3-v6mr11221631pld.49.1526319527096; Mon, 14 May 2018 10:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526319527; cv=none; d=google.com; s=arc-20160816; b=U55MY4u09F1WQQfTB9UsjeJICT5LpwmWrYrQVjQW5y73QRTFw/zMUP6vFPrqGMkx8e GgdTNdEE2sSmHaT8KoGYan6dEnGb08GtHn+n/WAdaIppnwkuoakenqx8fWQCCCddO1gw VZ/ttFPGXiSxnfQsUe4kirwO20fvjyv60y3B/f4m5cB29/gTalcsDvtWlT9qPHbRHbw9 9HV6IBwAo9+wE2WuvkSvTR5gKA+gesuQlWmrVpuq3rJl1Dm1L+RBRvbQlMA3gv8Sed8m ehr6sDLgLgJGEvwg8IJR7xXn4NWqKzQhoJrQaTN+it144fobIDG9/wu2M9OKFwNWAJD+ pOUg== 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:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=8uQgBPEV70MDw0xnqyud2IKtualfChjuqj0lQeh1V/w=; b=sQ2VRHLbj8veBUgAau8rRyKUSYWzzBnenCtrPs2BF6NetK5U6qhHJvLs4OjfnVZzVn i72eInHBdyQvK1hIPjX4JEum/uPoS3UOGO7eWp9UFbocUT24XeaMBLps2Danvw1xWn7k GX6FV58Knt479UTYyyvRw96A+E0M1gsZnDE9SI3ZryPuSlEsfIRI2eWcEcyBN8f0yOci maBBNtfWlzHXlhyrI7yz6Nw0vyRyzAdJHY5IlnbDGgxYfjzD16VNna7hT57py7jX3UEb 8t7eovkSFRm7YtGpLoS/Vo1/rO32gN4HBF6sP7SCfb64D4XQCatKr2iG1++ipJ/9TDkt 4Z5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aLTebfTf; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si7792075pgp.132.2018.05.14.10.38.32; Mon, 14 May 2018 10:38:47 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=aLTebfTf; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753689AbeENRSy (ORCPT + 99 others); Mon, 14 May 2018 13:18:54 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:45867 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752241AbeENRSm (ORCPT ); Mon, 14 May 2018 13:18:42 -0400 Received: by mail-qk0-f194.google.com with SMTP id c64-v6so10607813qkf.12; Mon, 14 May 2018 10:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=8uQgBPEV70MDw0xnqyud2IKtualfChjuqj0lQeh1V/w=; b=aLTebfTflx+2bwC2SMCAFi8wNJz/dz8UCOrWbnPRnOFhmwt2rM7mgF5vL8Pqgj71Zs q45JrGoOsiPE7oxnBhOyuhJ6d1AALMAZcGc2Z2QWQRZwm9tcSAL9/asoCT8LsYitbjDC grnesxu7ECiO7w541bS3xiDDfDnzR1t4XYv3hoosdaCok4w0nJF7Tu3mSFkxkTHIINlb OLdssI/JOQXLTDE+UigwI+dK+CsmjpBOtTj3oymz2QrdoYwIbXOxAz+tpSLpEJYqzCNj ZKj3xyQ3SX5gz1t83ZrFCnP/LE2lHaJwAFEyqgyzkqf600bdRoH5gfGxSfu79KfGSS8h 7kCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8uQgBPEV70MDw0xnqyud2IKtualfChjuqj0lQeh1V/w=; b=PVqEM3446OgUMgU0XAh3Gyjuvk1z9ij8FExAqVdEy7f4Ik/MwcoY2imDeSTk2Jmd2Z KpCu+na+ByW5tRkrrs7BZdpTesd1hn8O9OYT/HuBwPLuyfLFQVBbwIhpAjuOw035xqf0 Zsd77+wd+QXWdAGJ1jXbb2qUWlv2zxJ8Eq5cJy0kKOcB7eGWnfPEYoje9gXi4bmsyK26 W0K5VS/g00x/NTQoe5DlI+1lxIgnfXU4UOd/zqmhIhn6MX+MSPXabB+J3FFvabb2I00v WyhhJroOkJDd7DSgVJ46ozx3BrgngfCkDlpjXOktPBvQ1j+XH+nBHkAvdSGJ6wAuX+yk HNeg== X-Gm-Message-State: ALKqPwddOjt7vqlfhp8A/cLpt0Z2TvCWnuTHFduYZ9nMdl6yddQtkHSC i+W4LozqO7kvvC6OCtrSQc0+wD9V4Rxs73WxDPFpSnU5 X-Received: by 2002:a37:cbc1:: with SMTP id u62-v6mr8783680qkl.83.1526318317708; Mon, 14 May 2018 10:18:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.152.150 with HTTP; Mon, 14 May 2018 10:18:37 -0700 (PDT) In-Reply-To: <20180514093326.30314-1-anders.roxell@linaro.org> References: <20180510152719.6e37b10e@endymion> <20180514093326.30314-1-anders.roxell@linaro.org> From: Andy Shevchenko Date: Mon, 14 May 2018 20:18:37 +0300 Message-ID: Subject: Re: [PATCH v2] i2c: i801: fix unused-function warning To: Anders Roxell Cc: Jean Delvare , linux-i2c , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2018 at 12:33 PM, Anders Roxell wrote: > With CONFIG_PM, we get a harmless build warning: > drivers/i2c/busses/i2c-i801.c:1723:12: warning: =E2=80=98i801_resume=E2= =80=99 defined but not used [-Wunused-function] > static int i801_resume(struct device *dev) > ^~~~~~~~~~~ > drivers/i2c/busses/i2c-i801.c:1714:12: warning: =E2=80=98i801_suspend=E2= =80=99 defined but not used [-Wunused-function] > static int i801_suspend(struct device *dev) > ^~~~~~~~~~~~ > -#ifdef CONFIG_PM > +#ifdef CONFIG_PM_SLEEP > static int i801_suspend(struct device *dev) The better pattern is to get rid of ugly ifdef and supply __maybe_unused annotation to each function in question. --=20 With Best Regards, Andy Shevchenko