Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5998410ybc; Wed, 27 Nov 2019 13:08:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxqrShCFH4ayLHdf4zNJtV5NTVSMWuOy9WYuJSE5i7+Gf0m9ZCIS6D7weLfQn4Nft4WG+B5 X-Received: by 2002:aa7:d6c8:: with SMTP id x8mr4601947edr.300.1574888937096; Wed, 27 Nov 2019 13:08:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888937; cv=none; d=google.com; s=arc-20160816; b=1LGsio7CkpCgjR6sMY7AzWsX+6YAr3ae/1uqgYmwK8GKG9Eh5dvqyu91nI9VUeMJLH fUVdQAwAfI1InRgNYHfIF3u04n/pm6qFNNH6C1AbvPbHqR/YokF53LjCrHtQ1uzx//6I 5HaKKbNvwaQnUBLVMYnNIntK9MWuz0rom2u7zBtCnPWWmTEIz60hZy4hYYYULInoScMn 9+rLJ1Ak5/QgD+eyuaRWfDZ6NelNLpxqzQKbzJQhdNp2Id/YKa2TpKzAQO0p/A1x+6pD 1IjTVN3Nc1UC/gkF/qRmC8z+xNM6wBETL/yxziB4igSJZRC7EwgAqPIb6SukinMplhP8 sDyg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CqjHQJRxle9xQCfHjWjIb3XsaLcGl/sb3nLEFwFj/II=; b=znJu4DOd1SFTkjs3C5qXxmWw52tTIQ3JUcjPB6i0SiEEEvDRNmzNf0EuXlph9XlsmP t3skGTeiUUzM79193Xezz87UpT20wZuCvZm4XftaobvspeS2e9NlRgm9Bw0dkZX9FOzX QeD8QNRwtnIURw1nt6Tvk/Cc0lm9aIJjGeaqIMDee/+wn3Z55cniipgxWQSN9sjI+1Gb op5PA60gRnNzJTLbPbIsawZY8yueXL9BqGrwJALCHihA9CRZWuTyTGmfeoqCgdMjgDv1 k984UiGSi8Ev31doprSvWbEPk2hD/baCtv8Eiat4KUmeeIe+IF9NbMuk7mnuZiTEesZs 7/RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nB2OjEMc; 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 o64si91267eda.150.2019.11.27.13.08.33; Wed, 27 Nov 2019 13:08:57 -0800 (PST) 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=@kernel.org header.s=default header.b=nB2OjEMc; 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 S1732287AbfK0VF1 (ORCPT + 99 others); Wed, 27 Nov 2019 16:05:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:59132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731685AbfK0VFZ (ORCPT ); Wed, 27 Nov 2019 16:05:25 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4AA5120637; Wed, 27 Nov 2019 21:05:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888724; bh=joWvDbyWmwlaBdQTIKjS8/wZr1JeRCpZe/Ec4J4cdhA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nB2OjEMctbHRgmTCKLaFO/UfUEF2zwocfMAUEHdCvZPUnMLQ/GzqX+dpQYbly6S12 cNoskCFFqU2zYhUCLs5dyicFnlljFZ+md8xvRSVxP7iGBsIitUN+eu0e6V3EWAQHne 9uvKEH8+V1b9v0K1aqntFUz6X9nuRfU/46FOgCQk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Linus Walleij , Sasha Levin Subject: [PATCH 4.19 246/306] pinctrl: lpc18xx: Use define directive for PIN_CONFIG_GPIO_PIN_INT Date: Wed, 27 Nov 2019 21:31:36 +0100 Message-Id: <20191127203132.906140110@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Nathan Chancellor [ Upstream commit f24bfb39975c241374cadebbd037c17960cf1412 ] Clang warns when one enumerated type is implicitly converted to another: drivers/pinctrl/pinctrl-lpc18xx.c:643:29: warning: implicit conversion from enumeration type 'enum lpc18xx_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] {"nxp,gpio-pin-interrupt", PIN_CONFIG_GPIO_PIN_INT, 0}, ~ ^~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-lpc18xx.c:648:12: warning: implicit conversion from enumeration type 'enum lpc18xx_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] PCONFDUMP(PIN_CONFIG_GPIO_PIN_INT, "gpio pin int", NULL, true), ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/pinctrl/pinconf-generic.h:163:11: note: expanded from macro 'PCONFDUMP' .param = a, .display = b, .format = c, .has_arg = d \ ^ 2 warnings generated. It is expected that pinctrl drivers can extend pin_config_param because of the gap between PIN_CONFIG_END and PIN_CONFIG_MAX so this conversion isn't an issue. Most drivers that take advantage of this define the PIN_CONFIG variables as constants, rather than enumerated values. Do the same thing here so that Clang no longer warns. Link: https://github.com/ClangBuiltLinux/linux/issues/140 Signed-off-by: Nathan Chancellor Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-lpc18xx.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/pinctrl-lpc18xx.c b/drivers/pinctrl/pinctrl-lpc18xx.c index 190f17e4bbdaf..1d3b88e6ab862 100644 --- a/drivers/pinctrl/pinctrl-lpc18xx.c +++ b/drivers/pinctrl/pinctrl-lpc18xx.c @@ -630,14 +630,8 @@ static const struct pinctrl_pin_desc lpc18xx_pins[] = { LPC18XX_PIN(i2c0_sda, PIN_I2C0_SDA), }; -/** - * enum lpc18xx_pin_config_param - possible pin configuration parameters - * @PIN_CONFIG_GPIO_PIN_INT: route gpio to the gpio pin interrupt - * controller. - */ -enum lpc18xx_pin_config_param { - PIN_CONFIG_GPIO_PIN_INT = PIN_CONFIG_END + 1, -}; +/* PIN_CONFIG_GPIO_PIN_INT: route gpio to the gpio pin interrupt controller */ +#define PIN_CONFIG_GPIO_PIN_INT (PIN_CONFIG_END + 1) static const struct pinconf_generic_params lpc18xx_params[] = { {"nxp,gpio-pin-interrupt", PIN_CONFIG_GPIO_PIN_INT, 0}, -- 2.20.1