From patchwork Thu Nov 1 00:46:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10663437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4B2713A4 for ; Thu, 1 Nov 2018 00:47:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA1FD2B563 for ; Thu, 1 Nov 2018 00:47:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A929A2B59F; Thu, 1 Nov 2018 00:47:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4AA142B563 for ; Thu, 1 Nov 2018 00:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=c5gXObd0yMISpYh2GctDs8VQFCoY+6zp2STmgllf7NE=; b=o1zbypREuPxKG5 AwpEAs9Tq3Dv4WDBcXSbZsUOer1mUlcxOB1wZXojxeMh0GgKWyXeh+8HS68ksvF6k3e1kb8xNRVFP UsJTNjenH8KE37TO4kAxrFcF4jzTg3HU4EDHQ88xLEW/rlTdwBqqHykI5oTwabRbU/K93y6g2FvRE 82XaIIEEwJJ9n4HfqJwa4y247wenwk1pZeyOD9m6LBXA0pljxh72J/o+6ZYuFpFr3YynJvPOCL9NG hoVOUmf8aRL2gB1313CxVDYuLelYlE4eZOT8e+5m5FXvGRuH5xufol/eCDtTio1aW/AyXRPJVDl5D E3e9g4PtZBvCV1KYnAig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gI19J-0005hR-8R; Thu, 01 Nov 2018 00:47:49 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gI19F-0005fF-Sy; Thu, 01 Nov 2018 00:47:47 +0000 Received: by mail-wm1-x341.google.com with SMTP id s10-v6so16776525wmc.5; 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=LqXTViTKi6s1M7Fhcws3ymYjZHdktzEJjm5183wp/R5O8/AZYV5aCDJgQBR+5ccy86 aNaHeFfBEpU0+Y2EuZilH6FiEO/qw8zd+fXKMwn0QVPpkbwrMXcY/GLh6Prgk2zgzudH FOa5w04YwzUf9LjqigDRaZrP4qcAw5DA05zACQn7rFaHC4ZXXx6sB3dnayBceNoPtmb+ CEAsLvpeLuSIKC3Ai8gaDw45v1DiZo4OtqbMoo2yORTm9fPBm3LlxPB+hPjNl2lAti4U IKyVLDMTvk40PH92pZlrqrd7qplc7Zc7PzAWAlrnBYM71QAjLHDDfMmoC3phJuQXgJNG k4Hw== X-Gm-Message-State: AGRZ1gKR2nwT3GuorFItj8wew8MKR4xVxsvSqIHiTzGgxmTz0GtQIHUE hbevfWE2GXA7cu2aR6Pfcyo= X-Google-Smtp-Source: AJdET5fi0txnkQD5Ls1JkYR5EqYHHDrZ+T6EKayKsfwtrvgDb8UR8mi5ShfYTqR6nhb5hF4tBriutw== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181031_174745_937430_0999A81F X-CRM114-Status: GOOD ( 12.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , Florian Fainelli , Scott Branden , linux-gpio@vger.kernel.org, Ray Jui , Nick Desaulniers , linux-kernel@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Nathan Chancellor , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;