From patchwork Thu Nov 1 00:57:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10663441 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 57A3214BD for ; Thu, 1 Nov 2018 00:58:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EAB02B6DF for ; Thu, 1 Nov 2018 00:58:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E6FC2B746; Thu, 1 Nov 2018 00:58:01 +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 C226C2B6DF for ; Thu, 1 Nov 2018 00:58:00 +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: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:In-Reply-To:References: List-Owner; bh=nAkdkXDdlvDn4JKfs+LGKSC1J4MmLRgZ0V97gFwRwL0=; b=B2MpAH2MFlUBwb D+dinWOBy6fHS0BNXFCshNzXSkbzlDyGbXLRhUd3H1t1e1jk06muNw5TMIs0qqAI0z3IV1OqYxOXM ts4VtuNez/ZGjV/w4qgqqwOeYdD0QIll7YD/B5hb0a17Wtx6vNMI3FCsQ49myJnimFeff263JPXzx 4FwOwz6AGKDk+GJb9hiWhO5k2h/kPLKyQMw6kkpP00mAE4tnXRQtINL25f9tWI/KJEWIpQs35mr1b BFYpJi51JsXXRIUa/n2BzFVXzmVdWdRNAIgzNcQog7SevxMVIGOmzNXf8ccdrxurpr3wf3T8ni9Ie yZW/CZ1HJaqYI1pFww2w==; 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 1gI1J9-0001JT-3T; Thu, 01 Nov 2018 00:57:59 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gI1J6-0001I4-2T for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 00:57:57 +0000 Received: by mail-wm1-x341.google.com with SMTP id f19-v6so23062wmb.0 for ; Wed, 31 Oct 2018 17:57:45 -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:mime-version :content-transfer-encoding; bh=NHkWX3Ynrpx1x/BstLxZy3SYlKkmIbrrl/8dz4sPuZA=; b=fgfDop+2yk/8Bj0YDueQ3DZWPtbaLbn8LiaerUY1UwESuviuMDlnQ88pAdLYgk16yo EGco/rlC+WrL7ueZNzGfbQMZVH3zXNrRldQue18qAujqj5a8wba9fclfFc/4AixVYMu2 VeHwQ9FyyaaWSEf3zRTCqJBH+UmQ7eahCqt2OLxVM5NjPEeHdMK0lQMIrzduuMXjbOBC EAOpzvOpE6kCO/RJesxrXgLFBR2vWrf0NJdWHyEwOX1BzL44NP+wlZe50oVAOhlt2wwR n2DOGcF2qHbzOFkYz1H8Jm1aZZptxm2mJ4aFGJwq8H8TZiFEaAZs8BfryZ23oylq7/aL Od1w== 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:mime-version :content-transfer-encoding; bh=NHkWX3Ynrpx1x/BstLxZy3SYlKkmIbrrl/8dz4sPuZA=; b=O5JuRvitIojHz/IDtqf7qat2doRFcLkOog5pGRfpCGridwqL9z+lxRboCkjqGDh6D/ CvpoMZJrskTidRROKvb/n5GenosZc+BqMa7HKQq1Yq3cL/O4xCZgVmuhBdB3GH7vsq4u t3O5k/gLXlWjkrM02GlGo+cbtlZcqypd3RglXvdMulTNu6Ia/Hw3WKGfWnRAFfK9Fcxr hnQGdC6lOJ1fOC0kx7hkS1piQEnRzHsciQ4IQRbFb+8ObAJ6REssAWTZzUNZl2TunLcF 5yHXS2qKNuCaI0Fp4rRqnLVf7Ae1w1hFKFvlklTQpcYi9cBZJ2eyzeXhT8uey39bPARe 1cgw== X-Gm-Message-State: AGRZ1gKXCat4afvvS4cbBYTi+/9whSm9WMAoSFaJKyZUhvwb4uD74h54 Zsc4Qc5VQxWh/L7U67VJe9c= X-Google-Smtp-Source: AJdET5eA3s3upi/lC1xWGAHj7ge9pYPUvPTOyF7Ugi8fG/y82KOzWFO/rYoFsAkktOrySgUXcf/Wgw== X-Received: by 2002:a1c:4a:: with SMTP id 71-v6mr3853782wma.96.1541033863867; Wed, 31 Oct 2018 17:57:43 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id b71-v6sm23764588wma.13.2018.10.31.17.57.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 17:57:43 -0700 (PDT) From: Nathan Chancellor To: Linus Walleij Subject: [PATCH] pinctrl: zynq: Use define directive for PIN_CONFIG_IO_STANDARD Date: Wed, 31 Oct 2018 17:57:24 -0700 Message-Id: <20181101005724.9622-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181031_175756_114766_4B5E39C7 X-CRM114-Status: GOOD ( 12.04 ) 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 , Michal Simek , linux-kernel@vger.kernel.org, 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-zynq.c:985:18: warning: implicit conversion from enumeration type 'enum zynq_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] {"io-standard", PIN_CONFIG_IOSTANDARD, zynq_iostd_lvcmos18}, ~ ^~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-zynq.c:990:16: warning: implicit conversion from enumeration type 'enum zynq_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] = { PCONFDUMP(PIN_CONFIG_IOSTANDARD, "IO-standard", 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. Signed-off-by: Nathan Chancellor --- drivers/pinctrl/pinctrl-zynq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c index a0daf27042bd..57046c221756 100644 --- a/drivers/pinctrl/pinctrl-zynq.c +++ b/drivers/pinctrl/pinctrl-zynq.c @@ -972,14 +972,11 @@ enum zynq_io_standards { }; /** - * enum zynq_pin_config_param - possible pin configuration parameters * @PIN_CONFIG_IOSTANDARD: if the pin can select an IO standard, the argument to * this parameter (on a custom format) tells the driver which alternative * IO standard to use. */ -enum zynq_pin_config_param { - PIN_CONFIG_IOSTANDARD = PIN_CONFIG_END + 1, -}; +#define PIN_CONFIG_IOSTANDARD (PIN_CONFIG_END + 1) static const struct pinconf_generic_params zynq_dt_params[] = { {"io-standard", PIN_CONFIG_IOSTANDARD, zynq_iostd_lvcmos18},