From patchwork Thu Nov 1 15:00:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10664049 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25AE714BD for ; Thu, 1 Nov 2018 15:02:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12B602BFE8 for ; Thu, 1 Nov 2018 15:02:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F319B2BFE1; Thu, 1 Nov 2018 15:02:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A0E242BFDE for ; Thu, 1 Nov 2018 15:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5ZHtZ2sNCPtW+61PKg1f5HZn0+WKqn8MJC280TdCQQg=; b=HTCybWNcrn2oYI STjO7u0hqr8w2rdAKuABFNHg6WyLSNWOhKrg4/2YBSHXgSZ4wJSh8qD+qcD7o+zXhX9rVTythks8h an8jH4pzusKJfUXyhbV60tqr440HAOOte4O8AeDy2ovhL+jXqpnb5rrJFG1WJmUdbdvvrVLxkrvKb w+p1845b0/6uWxOhgQeaFY8VXkTUP/mrfqVPifAXq1P65MXmxd3aBt4KVj6YZGe3T7qG5LdaWQISU yFXM0kjY0k5zh5Lwky7JMGkG90T6Z/P9ZBUMKIWy/Qp8V/mDt7EIX8t9Qu0dNo2z2qgs57KUvW2cM tN0Ww+1ozTR/mVoheVjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIEUR-00032b-Hc; Thu, 01 Nov 2018 15:02:31 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIEUJ-00030q-3F for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 15:02:29 +0000 Received: by mail-wr1-x441.google.com with SMTP id d10-v6so20404097wrs.5 for ; Thu, 01 Nov 2018 08:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JVLYTEuFoqpcrXktMWrcWMbHYKBIdrT+w4l3k60KHrg=; b=GYVb5MLlAwd3qaZi9jpiISVmnxZulvJkShjGJ9M0oAXXa9bM35WKcw+3SP8y5XGo/x guE7oOBqTpPB/CUdLuGCSG9amKWRVEWsuhCm58smQtiqwATrmy+1n01fsd8hUtcOYC1p iaiLOdr/Nkq8ZZtsWFOQZR3vAaD20wZwM4eomIvcFrfOQzuLmW16OXUSDHTOYbQvIpc7 S/blhffhNPclaQOJBetswgd6R1zn40yF+KOIYGBgNUbYqeeE8aQgD6V1eKHBHCB8lnLv KQxAmiG+Jz9AKEjJ4W5B3hfh85993wZQrywpbZJGa1cGwPVqOLDDYqFkOpuc5Q9lIcKk ei1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JVLYTEuFoqpcrXktMWrcWMbHYKBIdrT+w4l3k60KHrg=; b=nZY2JO6cCXeD3hDbDCdxjiOCUQkqKYtrxgWq2Qc+b/OhbewpBWwwNiGiCyZpElgXIt AkquXFAZNqQ3LRbZJFwAz6SA99ya2voGL3MFnuDvSZBG3Ht1OnKbTKhwNSZjIHKYG9hj FCCIi+TmTMw9zn5Ul4kn91MJLX8XIVAvUq9a3p4AwtbRHArPZbkbEi7pIQmkfec+9B0c b7ORxojbjClPjwn+T/ZeAhBFP7PW1qVk6RN6dXPIVOtv1R98ZWxRVm61qnY7k1HTFq2+ DKindN6BgTUZAKE83vVXlcrz+wmqnQehbwQFRs9U9L+6CMO+/eM5y4desgATrrLcEPc9 c8cA== X-Gm-Message-State: AGRZ1gJK0vDbElMyV+2GiIyQVakQzaBwecxDxSBzMRRja8MBc7oLXJxE DLjvl+A+MCW+5ES1MCUgSPo= X-Google-Smtp-Source: AJdET5cmo54vankVbSSk0W6LSCL2ESOT1oqWdZ3flxHG/15XpOjj+OAcqEWM3mLv7MFYHH08s+gnQw== X-Received: by 2002:adf:b519:: with SMTP id a25-v6mr6450985wrd.273.1541084531214; Thu, 01 Nov 2018 08:02:11 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id t14-v6sm22117924wra.63.2018.11.01.08.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Nov 2018 08:02:10 -0700 (PDT) From: Nathan Chancellor To: Linus Walleij Subject: [PATCH v2] pinctrl: lpc18xx: Use define directive for PIN_CONFIG_GPIO_PIN_INT Date: Thu, 1 Nov 2018 08:00:08 -0700 Message-Id: <20181101150007.14145-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101005257.8778-1-natechancellor@gmail.com> References: <20181101005257.8778-1-natechancellor@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_080223_142624_C9594650 X-CRM114-Status: GOOD ( 13.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nick Desaulniers , linux-kernel@vger.kernel.org, Vladimir Zapolskiy , linux-gpio@vger.kernel.org, Nathan Chancellor , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- v1 -> v2: * Improve comment so kernel-doc doesn't warn. 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 a14bc5e5fc24..06be55dab341 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},