From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A15EAC4332F for ; Wed, 4 Jan 2023 11:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rmoMtKgFuI5GaKYlJbT237g5h32Ck00x75rZIOwre6w=; b=rUyKo/4wVcjNkd R/GYec+x48gmoNtYj4in3vFUyJtnMQtOsF8atVEqdXe5BH3AN6r8m8BXgu9ZYFb32QMA9X0On4Phj KVjzsF2+yUsCCeBqEEGgDvvugCaMMoch7Jl0m2xcKHa0YVnG3n2rmv4SEQxbwpwUWcPUh+Dut01ha nnS4jH4LY7XMuHM+42H1pavo6JiHKbAMUIvCeAPts77129xHw5sc0XgVQepKWGL4hGFu0pKildK43 LHh0gQdj2u5I+JiqEklJMQ9y8mJ1LMfFV6ApS7vpukCgyaxRHVESWxStqWzFfEo+GPCnmWDiaQdHU gbQ39H5scocEOL9rlKjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pD1s4-008jdz-G2; Wed, 04 Jan 2023 11:24:00 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pD1fn-008euI-Ua for linux-arm-kernel@lists.infradead.org; Wed, 04 Jan 2023 11:11:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672830667; x=1704366667; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=EF5y8cJBIgIZwE1pcFSYf3Xzp/7I0nWn/GnCSDBV3U4=; b=TBCwnwT3ItfI+Etbs3CgKFoKU1Y23pqgwHgL/qJLy8fFZJiNqS2o+enb ZUNTE7MGbCwVR+XWGYCq1mxlu+jZnf7B5r2lkJ3pwWTiQvGdoJK4QqL27 aP5vIkwe37KCcvcuQ/aX0LX7vsDxY7ONnMiYt0yjX5u4l8MbN1wOUGwKw oQuu7LX+Qh44e834eHFGDMHfSJ5B27mBcyzV6YenAPW5tJUFRK2F6KvDe 8waey27YdcRO89YLr8UVEOA3DB2xUne6n1Mp84D0HmsSigJ4KdACUGv9U FcHGMo6G1T1VCkM5AGcjSKFwhnwM2Nj7ysHezCoYCdebF4wANl7YI2+mO w==; X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="319619325" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="319619325" 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-Disposition: inline In-Reply-To: <20221215163822.542622-1-arnd@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230104_031108_053575_47B3FB8E X-CRM114-Status: GOOD ( 15.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel