Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5996492ybc; Wed, 27 Nov 2019 13:06:59 -0800 (PST) X-Google-Smtp-Source: APXvYqw5v2EGD1ou9DFM+pWXNJ0RL8cGgtvErL82JJ4iw+a1aclqmtEu1CkOR9AZq5kyzZHvNEyq X-Received: by 2002:aa7:c39a:: with SMTP id k26mr33743806edq.128.1574888819505; Wed, 27 Nov 2019 13:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574888819; cv=none; d=google.com; s=arc-20160816; b=efvk4tgGAXXgYcIrGeCzEJJ4XKvgz/bxOyyqaQyynq47V1c20BdLjoONaPJlbsa4R5 812Mb4wYDp5vaz+4rx1CmMY4K5FI42neQfH8YEu5WZEJ7WJWZgbRQKYEbuteGbs/3xqe f4uY3ELj1Q09VfeT/MO1nRFmpf0+WQoaQo5s0buFVhlbXfYB47s5Lw6wqNluq2jjLfW7 r7S8xgzqGlKbyToaxJ7dw/De2vFvuYVVzDWvl5k8RmuZ++8VEyN2D+0S2RHWmVoVKX/f 6iMlA1HZSGED7gdkzCq7QpaKKuWwLp7dqjv7fkGYX+S6kbvMJD8gZsW8dHvQTcRNPnJK HcUg== 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=joCEblYj6xbRU6yYN3o9RBSpbJO7+Y0YCZ1RVby6eiM=; b=VirdRhCMexhT4sPegq7GY28FDfuFe/5AYBY0H51CpgJZo9rxldalOKCPZTq79lXpFH aDo27ZLtNOPFIMBbrPQq/ep2g074Nx5DnJLIW9oDQ0whn6idVU9B219djkh60GAtZ7sS eoOsATvrEU51P87MTEiaL5FfZBQZDa1D7PUBV8GsuTeJJrWz8DtAneQHr3DXgMZUGsxP cX94T4TSLNQ5ytNxI+z704UQMuR7ooKMcv3jFKB8rcr4YYEUID2fXuv7sxQjBRUi0ugX RbAOqy44sO5uNdtXVUUXD7xcit01vZpbpAKHCJrcfUeMUDvyazFb7BC/l048iB4N4dVs k73w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gxoPWYio; 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 z10si10335809ejr.262.2019.11.27.13.06.35; Wed, 27 Nov 2019 13:06:59 -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=gxoPWYio; 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 S1732294AbfK0VFa (ORCPT + 99 others); Wed, 27 Nov 2019 16:05:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:59206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727484AbfK0VF2 (ORCPT ); Wed, 27 Nov 2019 16:05:28 -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 531022080F; Wed, 27 Nov 2019 21:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888727; bh=gZtgvh8qFeJ0rwP1uNVOTHy9jivYcPY13ibJR/gnb4Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gxoPWYioObapVAZl6ueUAGmyN6maLJABNrt/7qO5tPbIEKSLPP5MFMmqwKOKn1fHI 3PQKhJRuwyNdNoGNAl1/Zrw+VeXM2Thni5tvr5XrGi8qR+omNkp1IkyAf+7Z24Ao33 epDSGYOjGBhhOn4ZvN54p+Kx7eEMDZK4V+BQp/SQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Michal Simek , Linus Walleij , Sasha Levin Subject: [PATCH 4.19 247/306] pinctrl: zynq: Use define directive for PIN_CONFIG_IO_STANDARD Date: Wed, 27 Nov 2019 21:31:37 +0100 Message-Id: <20191127203132.972421333@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 cd8a145a066a1a3beb0ae615c7cb2ee4217418d7 ] 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 Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- 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 a0daf27042bd0..90fd37e8207bf 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}, -- 2.20.1