Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp768173ybc; Sat, 16 Nov 2019 08:20:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwRVDfvmzuhR1hezR5749Ygr9kqNHjSvbuWVLVHEPD8UIYLtSbEVRt3e6fOXjncbazA9e/H X-Received: by 2002:a05:600c:2041:: with SMTP id p1mr20108293wmg.11.1573921256264; Sat, 16 Nov 2019 08:20:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921256; cv=none; d=google.com; s=arc-20160816; b=qQMt66+gyvvAVYPezlcWFMiKkksPfhEYzRveNLUDUQOp2WTTRXDSKCTUkgF6KitDLZ rR+/1gs7ppB0raf8EcGG5MDG5Nl/NskGKie3OkIUIFMpVc4KLVURfPWtuWMX5J+vt54T JZ1EraRLAzFpWvXM6A/4XDaLv6WRVfSOTS54ACZwxvNrw3bCAwugIyE1m/HuOj/Toy/4 Lw7kCWl2GYG0JlJ8wzSon939gD2j0jwQMnMo9A878HFlNNMsC0z6XD1i+mXNL2wMjYv0 huy4kCeW/ARvSSLBCaO9vYbtejXuqkWhWmoAuWaBRbWruUr+l9BiKFQkJ/p8fyrttrL8 jhuw== 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=eu9MrZaHPEzc7WN1BaGMHV0JkrNwLQ2wTk+Rr9TT1lg=; b=rb/Z83VYlHNJzifFj+E+6WcNHopNNhH30Q9P3vI7ov6yRaBWAk+GNsqWWaTInSVSv/ WwF+wWY0+OZ/7ZQdXr9S8lRfMxF2AMvMi/D2w4wEp8JtY/TAcZ61KTYJvi19Glod78vQ zBe0SNktvU+25TVOW8TgwhK7D3HkCE1WuElekPjTDJRnN6IFTu2/bX+FbaopMbkgKxD2 YTAxygRlGJwCfs3/KPlTdJ7spldycXyEkWak0n4v0BVrhSOKhKrx0PjFLj/wL7UCxXx0 JW01dx/nevZqDyslNbHxt8xFiWYthTwuLrDjOXzlLMA7g4AFHVER28Dcyj1rSTkbGJsw l29Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LVVLIxlM; 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 v23si7774711edy.287.2019.11.16.08.20.32; Sat, 16 Nov 2019 08:20:56 -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=LVVLIxlM; 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 S1730201AbfKPQQL (ORCPT + 99 others); Sat, 16 Nov 2019 11:16:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:53704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729589AbfKPPrF (ORCPT ); Sat, 16 Nov 2019 10:47:05 -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 117C22083E; Sat, 16 Nov 2019 15:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573919225; bh=TSfcfKMerSp3xOiFklG5ABCAq1n+d8pMG/0OHuwn+yU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LVVLIxlMj7Swf6PM3zsF/dU/AvZNzXZpl0LfXPun2d/DK87Jbm4lJ0ok78bL7b2Cz byMny3x5PLxTxF6+oHkSJv3g7XJDA5ZezQBpvNga9geNpykJWjZ/lxRHnrkOHeC3iO J4CE2y/P+lhw1Rx7ZQQoe6G4mJ/H/BYGwvOPTrbw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Stefan Wahren , Linus Walleij , Sasha Levin , linux-gpio@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH AUTOSEL 4.19 228/237] pinctrl: bcm2835: Use define directive for BCM2835_PINCONF_PARAM_PULL Date: Sat, 16 Nov 2019 10:41:03 -0500 Message-Id: <20191116154113.7417-228-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 b40ac08ff886302a6aa457fd72e94a969f50e245 ] Clang warns when one enumerated type is implicitly converted to another: drivers/pinctrl/bcm/pinctrl-bcm2835.c:707:40: warning: implicit conversion from enumeration type 'enum bcm2835_pinconf_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] configs[0] = pinconf_to_config_packed(BCM2835_PINCONF_PARAM_PULL, pull); ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning 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: Stefan Wahren Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c index 08925d24180b0..1bd3c10ce1893 100644 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c @@ -72,10 +72,8 @@ #define GPIO_REG_OFFSET(p) ((p) / 32) #define GPIO_REG_SHIFT(p) ((p) % 32) -enum bcm2835_pinconf_param { - /* argument: bcm2835_pinconf_pull */ - BCM2835_PINCONF_PARAM_PULL = (PIN_CONFIG_END + 1), -}; +/* argument: bcm2835_pinconf_pull */ +#define BCM2835_PINCONF_PARAM_PULL (PIN_CONFIG_END + 1) struct bcm2835_pinctrl { struct device *dev; -- 2.20.1