Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6016254ybc; Wed, 27 Nov 2019 13:27:28 -0800 (PST) X-Google-Smtp-Source: APXvYqwAYXhn0v7HW/hb+2JNARX71xlgmwenOg7MntxILAq51lQoIzqi4/GHTipojvIb3jN5JY1+ X-Received: by 2002:a17:906:19d0:: with SMTP id h16mr49428598ejd.301.1574890048243; Wed, 27 Nov 2019 13:27:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890048; cv=none; d=google.com; s=arc-20160816; b=Z81I1vNppsw6D3wTM5AIUdcQkI/1knZy8b9jk1lAr0KVxuq07GeU5Z/WBVLaOem+Hi vUApVSGEPUHQ+AaNZvmz9cfHNWVYgDwz40NMbJU0SfvpS6acSmREQMHTQvST2aLUEwX/ DPg+fTXqeE8HocM5nhZz1LO7xuF9DvUDlBYmPMtgbPK8bvCXqNWJCj/kKlqD9TXHHi0U eDU4FtfM8mD36FoQpOKrsRU3rhzrYlELPol3j1ekNFIV4obvg2/uZMu0Bf1ANrirY9cF 36/K+77FtHrRvZBQ2V6lEWUl1ifrNB86fkT7FAKOmEupnkVp0cnLP0J/iKmXwU4bicvq LgQA== 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=eu9MrZaHPEzc7WN1BaGMHV0JkrNwLQ2wTk+Rr9TT1lg=; b=mOdOLlpvlTR90YKQb/kYYDhFf7dlaICIjF/hQ0rJbKDrxqfX9u64YcCDEaNlUExHJz 9L5RzproFTPA/Rbp97oDe2lFDkCfjUPGd3oIWqrk+PtOlBt3TyVJr4iv6RXfZUchSPew 5Hx8kQudhrqMIhTOS/NhrDnP2CCtgIKrItnfPFRMo3o1eDM/ksEemyT2ihzHXZI4sGq9 vTkNNV3yVXMmWWXCR8Uu41F9wX+C3NXqEV9YBdMStFpxOAPkwRoZoeFb85ONpJsa6s6n 6zSi20LtsMT0Uh6V7bYEg9AxNI/EGYFBzz6JnAiU0dYmq1C1TVFJ/P5NaF3J5msoAsaJ hTzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lDXfgidZ; 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 l19si10915209ejx.406.2019.11.27.13.27.04; Wed, 27 Nov 2019 13:27:28 -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=lDXfgidZ; 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 S1732378AbfK0VWv (ORCPT + 99 others); Wed, 27 Nov 2019 16:22:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:59090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732274AbfK0VFW (ORCPT ); Wed, 27 Nov 2019 16:05:22 -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 D5AFD2166E; Wed, 27 Nov 2019 21:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888722; bh=TSfcfKMerSp3xOiFklG5ABCAq1n+d8pMG/0OHuwn+yU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lDXfgidZJD8oIO/JnWTtZlaXRwYvWdHr9Ulvxz1e3yh/+Tg70GQsXwFL8z7M5SlTm 00gVqHUp9simhk8zuMq54M+I55PzVXAQXiMlDHFumU9h8+9xHdUerE7UMIRuvOmBbB Aj4gBHor5nLkcYoup72j8xqyICzlfmdA7GOHeDhE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Stefan Wahren , Linus Walleij , Sasha Levin Subject: [PATCH 4.19 245/306] pinctrl: bcm2835: Use define directive for BCM2835_PINCONF_PARAM_PULL Date: Wed, 27 Nov 2019 21:31:35 +0100 Message-Id: <20191127203132.838482192@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 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