From patchwork Wed Nov 7 08:56:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10672013 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 6E0B915E9 for ; Wed, 7 Nov 2018 08:57:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54C272B0DF for ; Wed, 7 Nov 2018 08:57:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 490A52B0FA; Wed, 7 Nov 2018 08:57:48 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 EA4962B0DF for ; Wed, 7 Nov 2018 08:57:47 +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=lNlnrp9wbir5f6jxSdR39Cp5AHY+3c3anrbn5j3TqSw=; b=cpBHRXIdP2pTaz ffdJXDnbm0zoYcuHrLFhIrMaA1L1NWxYFWEyhYpte2X+3T8Hl7MSuPDvPCKWeGN/ga7qXyKsxclrg nTn1wsYh+lGs+8rjl8uLhQk+ONEIDnrzgwHbkDuIhLBzgD13fVLkfZqUjMSW0Q3/LCVRGl4D/1ahW 594T2a31z70k3lby7H14kq21S5dcFIJV7e1KkDAlZQC5ETGagO/quYlx54OYEJQfNiFFzFpSG26Mw sOahS+UsvM2HriDF1KjqdfAzeYWf3LEnVYxoG4hyQgGd2gfvaPGU2PoCszNb6i9/WGncIRx2tlQJi BT7++JvJh+0GejsxzQUw==; 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 1gKJek-0007bf-4R; Wed, 07 Nov 2018 08:57:46 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKJeh-0007b0-0E for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2018 08:57:44 +0000 Received: by mail-wr1-x444.google.com with SMTP id y3-v6so16179832wrh.10 for ; Wed, 07 Nov 2018 00:57:31 -0800 (PST) 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=ETL7Is+WZyqQ8ia+CkDrCnNCwY/JOaHMUTqHjGSCshY=; b=AgWmWWJvI9YsOOWIoioj3sjyqyWh6N7/25gBFO3/N4xCnxZ4k94B8qUCYe0rzPVBsu frROf9H5xTvxlRqahxbeXh0V+WNye266sTLkymlH767Hg1HgLiJ3a65/dLv/bZWHOoRp O1bX7W5RbYaSx3nD+sjb7aAhEukJu8WpHeLfge/1pz57qs5m7tPhY11F8JsJSsLVckFP 441ttWdWIzUzxJWDHdREnnjiHYz7/Ei3HGsI9KKVHmL3FOfMHASAA1apYNhikmhv/zOZ ziwmsb3WGboWKVXMYRM0HjkY2qmIrlxzh3mi9o3JhktRyNeuVQTy0rCnywlEGL02Pe4I H7Dg== 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=ETL7Is+WZyqQ8ia+CkDrCnNCwY/JOaHMUTqHjGSCshY=; b=T5jBF5B3RiEbMdQKwFXM6xAH/PTDV1yKy5MYVpYxPuoRzpiGTyvigQdbvxaCDIdccy oV3VTEHgZziACRFvj0euYBHEZ4SS5qZX4+kIIq2Ub2VOnpLltnzR3DqDeYfK1hq9/hv6 uURr4KvO2dLUMZ7PpdwQo+rxq4ju647LE6Wijt9H71OgAg8Qvy1103MoFjBKzu4yNawP 2vjjfsR4k/z1tuFkTT06SnCZGb5QrPpAB3xziLdKMyIqDmzAnHMiCUK5AyoD7/4oaBKl VxuKagY2Xdxry7BANn8LEtAXl25SACLSkFsRS5GHl6Ewf4RrU5Ma/NamEGZvZPv5y+jI BcCQ== X-Gm-Message-State: AGRZ1gL+7YFvVLy+HNTdpOqWoQfBOtcG+5y4Rq2NLi5hgP/kn9J0/wzo lt63yatTzkFUZITW5Qs+dn4= X-Google-Smtp-Source: AJdET5cRv4Xw2d6lJjBIZSQ9GISpn3nVgwckqYAwNvh4tl3uTByoshAtbOkXexMc5tXdagTEnXYB9g== X-Received: by 2002:a5d:62c1:: with SMTP id o1-v6mr969466wrv.83.1541581049999; Wed, 07 Nov 2018 00:57:29 -0800 (PST) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id j203-v6sm256150wmd.46.2018.11.07.00.57.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 00:57:29 -0800 (PST) From: Nathan Chancellor To: Linus Walleij , Michal Simek Subject: [PATCH v2] pinctrl: zynq: Use define directive for PIN_CONFIG_IO_STANDARD Date: Wed, 7 Nov 2018 01:56:40 -0700 Message-Id: <20181107085639.32366-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101005724.9622-1-natechancellor@gmail.com> References: <20181101005724.9622-1-natechancellor@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181107_005743_038648_27A8589B X-CRM114-Status: GOOD ( 13.06 ) 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: linux-gpio@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , linux-kernel@vger.kernel.org, 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 Acked-by: Michal Simek --- v1 -> v2: * Avoid kernel-doc warning drivers/pinctrl/pinctrl-zynq.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl-zynq.c b/drivers/pinctrl/pinctrl-zynq.c index a0daf27042bd..90fd37e8207b 100644 --- a/drivers/pinctrl/pinctrl-zynq.c +++ b/drivers/pinctrl/pinctrl-zynq.c @@ -971,15 +971,12 @@ enum zynq_io_standards { zynq_iostd_max }; -/** - * enum zynq_pin_config_param - possible pin configuration parameters - * @PIN_CONFIG_IOSTANDARD: if the pin can select an IO standard, the argument to +/* + * 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},