Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp739393ybc; Sat, 16 Nov 2019 07:52:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzTKksMUv93oqS3jUvPyb4/IPXdODLp9cUzyxH/s1PSm7BViJWUW9j2mPPMoHuw6iJhfp2G X-Received: by 2002:a17:906:68d9:: with SMTP id y25mr11025503ejr.136.1573919544395; Sat, 16 Nov 2019 07:52:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573919544; cv=none; d=google.com; s=arc-20160816; b=AWqb9/mu5gBAl6IKGkt1vt4LNOChmT3v6xK2oXLiys8qT1C9mbcHRLHSah01T0vRp5 yGuwsH4O9UraxO8FKjr+lIi1gLA8UcxAIFjmtqmyr6oKpQDptVhCHpdca2U+UeIMrBJa eYXWqfVX8QebdS7KAcIkDIoEQwgDNaMhUqFPmoAvvWtm74R6rF5PxxKlPt5mFirin22k hC2ZBAeAICjoaF0apmxZAclfSCgZjltw0sPWXuqk6ZeT8Zit+Q146/Q1huBgQ1mVJ7hG QuQXT3ieqbN+1Ei+/sfzrpqnSQW7W1AokkWZ+aO3p2W6u5UTmtPukpioY6oubq1RD3oi 5ZeA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=joCEblYj6xbRU6yYN3o9RBSpbJO7+Y0YCZ1RVby6eiM=; b=f9ykS918AzdxPJXpIxYXx6bd/0H2gAClTmqSSFREL8r1/vIIP+sGOrwN7l7wCAokFE QeIo1F/Olo6JLaFya+HNEWK9pnUl3IVNkac7KEMfq4K9TllM67ampL0LxU49Hj8NqRzR L7KQx7wcSgvVMdQHxsPTnhUyQvEnC0oV8cWEM8yIaGFXNW8tJPqfwp+W/wuCsgKq1d36 EQZttoDAknPe7aViOus+Y148CwQfOvtswTH1RZj5QzDcc8CkuQcPheC+PDN53o329Bo1 OXHtmtDDjj4Vyt6PzU1VqnMl45VmIlHgVbxIT8FfwwzBZ12Tg8MXNb3eeNEpHBNX0ayW IkkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RzPnVjzv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3si7756507ejx.346.2019.11.16.07.51.59; Sat, 16 Nov 2019 07:52:24 -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=RzPnVjzv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729766AbfKPPrm (ORCPT + 99 others); Sat, 16 Nov 2019 10:47:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:53732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729630AbfKPPrH (ORCPT ); Sat, 16 Nov 2019 10:47:07 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D2D620885; Sat, 16 Nov 2019 15:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919226; bh=gZtgvh8qFeJ0rwP1uNVOTHy9jivYcPY13ibJR/gnb4Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RzPnVjzvEeGIDGL1E28BnWX1OZSe24E4u3MDFcmtvqb8FmdV0G7pMzCgVZjWi1FDt gKTg3gd6ycJ1vuCTXKWPuAUV2R98uFfkPOejc8hkU2HHHHYnxGWHn6ipFfAWEyin5Z UANHkg2bzT3LRXHJqEG1I/zmFUymBcp/ubQnOm/I= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Michal Simek , Linus Walleij , Sasha Levin , linux-gpio@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 4.19 230/237] pinctrl: zynq: Use define directive for PIN_CONFIG_IO_STANDARD Date: Sat, 16 Nov 2019 10:41:05 -0500 Message-Id: <20191116154113.7417-230-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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