Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp221052imd; Wed, 31 Oct 2018 17:49:31 -0700 (PDT) X-Google-Smtp-Source: AJdET5cRV3D9AlDAcb+sU9pPG/9uJ8BP6ek/VDANC2N4FcnEsaaFQ94I6J+uFHLirVC39wDc6UpQ X-Received: by 2002:a17:902:b688:: with SMTP id c8-v6mr5557421pls.306.1541033371047; Wed, 31 Oct 2018 17:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541033371; cv=none; d=google.com; s=arc-20160816; b=Xg9q5Qm76fcw37X8dXP1HxykUaBwyleRak1avNF3u8Y5po3u5IQ51M7XjeJ0BYSzEe W/Rebgsd/pgNJGj8Cn0LdeiY5nzXTbpLRdCAMLWBPLjo64Rp95YQ/uQGkIRLc0925Bel AcZ9DxUV75pbfiIExOYD0ENpqc0LrB1fuAaFLl1CVgIoWAfjlZC9tKCpnDVx21p8s5A7 dj60GHLRP4tiVHbrjdKi/Mw3vczf8ZJUTSq7mQIcC3BuyZXc+NgZ7VzUsEiFAPxe8sY5 Fp8RAJFogf8fDcoxadBoxqB1Ch8OBoEjL/nKF934lfX+GWYgm2ec80loiHCb5CUAs+PV uihg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=WXxxxa1VOZ31ZmlZgqX6lLyj4zgqAZ/vMdlhyLpQW9M=; b=KQAsuAzbU4JxI51NjYeS1SZdJOqsPIVW3VU2lOC05Z2Turm5vVaXK1IYY8Bw+qFXSl yTPZUlZrMQoA7JqzxoAaSVBNdGSKJ77EwKqAJcJQt9RM5BNjIooN+3eDXbQI6cgowJv8 bMufXiKMObKm6FsinQaevTuiCYo2N5n3ealql9HslwKC8DYL+BIOwXvGDiZdcjC1Uaa9 qCHGVz2K6QQ95gYNfSAqRkzjiFmP0uI8hNgmGQal3fOjuZp7c6sNhuFAxhXZE7+x4PV0 eV0SuPEDrv/7fs/XIPUvw9FHUqqwQQOAXbDsdQf0j+hfswKlbNsWdAkMuN+xMHw3kozr NMlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O1Q5BWRd; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c135-v6si20676657pfc.6.2018.10.31.17.49.15; Wed, 31 Oct 2018 17:49:31 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=O1Q5BWRd; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726059AbeKAJsM (ORCPT + 99 others); Thu, 1 Nov 2018 05:48:12 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52215 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbeKAJsL (ORCPT ); Thu, 1 Nov 2018 05:48:11 -0400 Received: by mail-wm1-f67.google.com with SMTP id w7-v6so3762wmc.1; Wed, 31 Oct 2018 17:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WXxxxa1VOZ31ZmlZgqX6lLyj4zgqAZ/vMdlhyLpQW9M=; b=O1Q5BWRdSrJxotDZFurLaIov6qzgw7GdA0M5vBDNI1bHdVaiQ9cqxqFEFlVjz90DIG 6F71H9G4d+XG4ThZqkiyRzvLlAM9irf+XHGeLCOEvMxBNpEzud1+1/AyZ+Dz8Fktigk1 wnnFCEwVMk4Q2LPekwkjullam3njbkER9TD73nnCnIgiPQpvpFF2aC7l4UnHGufxVr83 05GLeitYU9u4W3iXvyBcj0WHGmhoR8fU6AHXCtORAK8DI0spKXG35LS2OP/QA7ZchWUb p8YYwfE5ieaYRflVSmF1RRlAOikbvIxtt7nwTeWr5VB9Or9bQ7iP4rX5nbVCocMeqe5m 0O2w== 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:mime-version :content-transfer-encoding; bh=WXxxxa1VOZ31ZmlZgqX6lLyj4zgqAZ/vMdlhyLpQW9M=; b=Z5R2nwW38esJmvz1S3tHEbrFnQJHdzRLhUjAT6/HZ6q+4OfOX6uaSYtrYKfk00bLzo j1/hnT8GCYdVcdPZb6lv/7hsXPAJBhUcLmpCPCB7wR5+SAv3R/Ii6BzWBfHotWO4hOmO uUuW1ske3Efzqwz1QeZgs7uBR0uz2EI4RIdIKR5gYGYiuDJWNvTvTUovNfUk9K/lxDob OpaYfHqC5s6+X/oezEXXoJkdMPY9wksZIVliGRpERPepHBNdPxx2LJRbQanGMAdzX4P0 gxGeG/DAG1SSLO5pyo25i40qL4ev0eoI3Cd4cMM3VNdFDD5oFGeUvbzcOugH0LqKPAQE BcxA== X-Gm-Message-State: AGRZ1gLxYAYCMKvP8j1MTi+YeefZy2+PwYiig9/+jD4EVkSSLPZsnx86 PS6At7um41HPRFarL9CQYF8= X-Received: by 2002:a1c:ab0a:: with SMTP id u10-v6mr3963689wme.55.1541033253381; Wed, 31 Oct 2018 17:47:33 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id u5-v6sm8184091wrm.77.2018.10.31.17.47.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 17:47:32 -0700 (PDT) From: Nathan Chancellor To: Linus Walleij Cc: Eric Anholt , Stefan Wahren , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nathan Chancellor Subject: [PATCH] pinctrl: bcm2835: Use define directive for BCM2835_PINCONF_PARAM_PULL Date: Wed, 31 Oct 2018 17:46:54 -0700 Message-Id: <20181101004653.7552-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 fa530913a2c8..b035c3fc0471 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.19.1