Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13093952rwl; Wed, 4 Jan 2023 03:32:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXvTQI9InDWsbAXDFS4AJn/5X0RXFjXBYiJGanSpJf1ot25QDwha6FtpjXjQENc1B1xwvpq0 X-Received: by 2002:a05:6a20:8e0b:b0:ad:a0c2:53ee with SMTP id y11-20020a056a208e0b00b000ada0c253eemr74059011pzj.12.1672831938528; Wed, 04 Jan 2023 03:32:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672831938; cv=none; d=google.com; s=arc-20160816; b=fQPSxNpgpJizoJEMHsM4fRV0XAck0a1H5pFbD9KHiPUwdjd2f6hNhPLQ/2rnBhJxfh oVq+AN3LHs+v3/Gtp9pUke+vRQ0R/KSV3ueyr9dtbj3CsEoUddfinZeytfrEVA6D6B+u reJsZPP7N6pZENXBtcHUNdKPaN+cWmLAT+kh7HjvGMMalu1Bw4KWsthHB52j3ns9WMrB 5LK33rJM3HlGNMXFALYZuSwqekSoqHNkPeTN2FfVhbUqEiHreNmO0joZq4PwjUbbShqF UO6lIIAx2ewTkI4B2p+DK4HORRHebs7C9zPqxXNgFCt5af1JjFvpXnR3pfgfO/ZHY5Ox zZdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=P03Qq8sQAT4cgvXjQ1QiSfBf5VXLxTKqiVj4uQWTghc=; b=l33a5VXfDa3ri+BLiay1JShCwZ4HNrecdSVW2MNzpho42xSzlCGdwg7nRK+3s6WuMl K+r7xR4Y9xQXdgrw4JDfw3q/A6DgUlhuN1IZpqTGygFgtWtu5egGihzuIQDSMMgMfjzl s/UTFb/Odle9OQXslS+VskZjEGyDTcrTINNhfHhbA0xTACkZ6KW5cnw3sXYUcmkm1L5y OpZRLgh68j0Jc3SfTbHQ4AgeL4CZGK7kKnDhDUg5S4BxKnIJzojNB36IixEPPCXPGsW7 Ex2XUJSkbafJdscr8FPTxA07w5DYSvLflLx+KmgqV8jYmXKN0V5IYVm8rF+mnHfHLkRH SlfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e1d92xNf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q14-20020a6557ce000000b0046ec3bd90bbsi34570047pgr.60.2023.01.04.03.32.11; Wed, 04 Jan 2023 03:32:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e1d92xNf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234701AbjADLLF (ORCPT + 59 others); Wed, 4 Jan 2023 06:11:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230423AbjADLLB (ORCPT ); Wed, 4 Jan 2023 06:11:01 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D62671275D; Wed, 4 Jan 2023 03:11:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672830660; x=1704366660; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=EF5y8cJBIgIZwE1pcFSYf3Xzp/7I0nWn/GnCSDBV3U4=; b=e1d92xNfO6eMGFam68o1YrPq+P321iADTnQ9KGFJg5kxMgw6yKzSNhAx jei6vYPqd+jxkrVAYwk18BO2ATIpFb+KJRrXSh1VNQ+IRMD5gFXXfKQW1 IHTSeAk9Eql63Ol7IT28IzQbRSZEIBLgstefUC7e8RNCLVodGpjlncI1b TreIJ+MkHtkrgJNiSl2ZsUYv1FtSYj7rVwqEqapi33sgGJxAciyjXoOBd 0SOnCxEpG/mN9u1wPQeTE7/RwexNIo6bb4Y6V6SX9dyhdmJatvmm46EsX wEkmVxjeWq+1xDzMGlyhC6cszv2obFEqc/dW5oYCMiKphd4FkbDB69/6e w==; X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="319619321" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="319619321" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2023 03:11:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="762640159" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="762640159" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP; 04 Jan 2023 03:10:57 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pD1fc-004HFz-0O; Wed, 04 Jan 2023 13:10:56 +0200 Date: Wed, 4 Jan 2023 13:10:55 +0200 From: Andy Shevchenko To: Arnd Bergmann Cc: Dvorkin Dmitry , Wells Lu , Linus Walleij , Arnd Bergmann , William Dean , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pinctrl: sp7021: fix unused function warning Message-ID: References: <20221215163822.542622-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221215163822.542622-1-arnd@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 15, 2022 at 05:38:10PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > sppctl_gpio_inv_get is only used from the debugfs code inside > of an #ifdef, so we get a warning without that: > > drivers/pinctrl/sunplus/sppctl.c:393:12: error: 'sppctl_gpio_inv_get' defined but not used [-Werror=unused-function] > 393 | static int sppctl_gpio_inv_get(struct gpio_chip *chip, unsigned int offset) > | ^~~~~~~~~~~~~~~~~~~ > > Replace the #ifdef with an IS_ENABLED() check that avoids the warning. I;m wondering why we can't use PTR_IF() here and in similar cases... -- With Best Regards, Andy Shevchenko