From patchwork Thu Nov 1 00:52:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10663439 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 A344913A4 for ; Thu, 1 Nov 2018 00:53:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B7D428875 for ; Thu, 1 Nov 2018 00:53:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AD7E288E0; Thu, 1 Nov 2018 00:53:29 +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 0EF2F28875 for ; Thu, 1 Nov 2018 00:53:28 +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=pQZxHHiwn2KrbjpXYH+Gw72fkHrstGDp51R0q/Z+wC0=; b=XiQHe7WSt41N1J mtC1OSslVkiEKdw8DBLNrtDLrwDYKyb8STUx+DK3r/dMHX18RQ9klwIgVfhxBdWDaVT0hbsL/llDz ZUyEPCbMG5hvBrTxbWGKFNm4wjyue0WvLWa49iPeJHqUQN8nkAcwsWucTeQd1FN0+io2T98m6shK1 5MgKjM6eMkii/kixB3DY0BLF9cTuo+XucVSTap4dz7luUAw6zvcjqOE0gHH/XEZKA5BbC3UXDlWZB FA9kF6mYBPmRubRfNTb3S3KFjkzY055v/r0rHMynITNkXzfPfU9MSBQ7g4fTmYIPUWvumiwhLJ6jY 3N2EDR3WDwMJWNDa/FUA==; 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 1gI1El-0007dn-7O; Thu, 01 Nov 2018 00:53:27 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gI1Ei-0007c5-F3 for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 00:53:25 +0000 Received: by mail-wr1-x442.google.com with SMTP id g9-v6so18415851wrq.4 for ; Wed, 31 Oct 2018 17:53:11 -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=BxnkFIw1Q+i5FsURVac8qkSHIwEh/FivfEkua9BcaYQ=; b=lfrzm4PBamDlflpvUeEIKTKa2N0P0q2UXYVeQINe6l2Rwba4t5wCvbJvR2ivYVN4GM 3IfB6559wZUO6jiWBFudA/n+VPu0KwZmLDcZu9Lwcf5RMMqHjHr1zFcNBTg+1Sx5shCj VoXddsAQHvCkVR1oP+U/B7Pxc3g8QoR9290y9Ru1OU1a0/UvDbbjlyDwP3dguXY5hFsI nFOq3JwNuOZK3pKy3GxJMCFllP/IqJO69QI59h1gTzmRjJ7/9c3BwwK7vGfFNmTaJ7r0 k619lZaafiBg1gShppEPOHqo0sjCj6/K5Yq9k+fYb+6isMbWTapMbvih+LFftzWiFS+s spGQ== 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=BxnkFIw1Q+i5FsURVac8qkSHIwEh/FivfEkua9BcaYQ=; b=YA0CY20+x+hiZj2Mz46sapXlhpNSYWT1FMG6Y187/GMTkcT/ZxQtYy1bP+5XfsOi7y oxoxOyvjj0/YWdVFgmM74agF8U2OyvVvW2mbQe/TLP+UryEJVQkUHGuB6Urubqfj4FrE c51pvXGdmUeyKewOu0totaRAv7IZTo3dFTssOWuo+gJHAT43b4fClnKUP0268I3BQHr9 pDUNbSadjY3VoIgca8/9xpbSb2JuoET74fP965iFqEXBf44pyPSWpFSn4OsYRKdY9a6U bX7BeuAj/T13vygYJ+YlyTaoWgJdCoRzvzYSLYcvNSJKqGozJCWfnJy5lKxUCY5ytJ7k bGzw== X-Gm-Message-State: AGRZ1gIWTpCoqMZ3QPrG2NqWbcX3f3cRt/ISrEbN9QIHHyySUpG/DqkA 21Hxa4dSkb+h8dzh1MhnSSs= X-Google-Smtp-Source: AJdET5f7c0m5l4YBCzeg/lqf4vx8lw54pMqdLoidw0SBHIvyrRVb6GOTl5pbzpZ0581+02LY/FZNjw== X-Received: by 2002:adf:b3c1:: with SMTP id x1-v6mr781270wrd.179.1541033589349; Wed, 31 Oct 2018 17:53:09 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id o17-v6sm41180879wro.2.2018.10.31.17.53.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 17:53:08 -0700 (PDT) From: Nathan Chancellor To: Linus Walleij Subject: [PATCH] pinctrl: lpc18xx: Use define directive for PIN_CONFIG_GPIO_PIN_INT Date: Wed, 31 Oct 2018 17:52:57 -0700 Message-Id: <20181101005257.8778-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_175324_507619_C8B2A2C4 X-CRM114-Status: GOOD ( 12.26 ) 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: Nick Desaulniers , linux-kernel@vger.kernel.org, Vladimir Zapolskiy , linux-gpio@vger.kernel.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/pinctrl-lpc18xx.c:643:29: warning: implicit conversion from enumeration type 'enum lpc18xx_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] {"nxp,gpio-pin-interrupt", PIN_CONFIG_GPIO_PIN_INT, 0}, ~ ^~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-lpc18xx.c:648:12: warning: implicit conversion from enumeration type 'enum lpc18xx_pin_config_param' to different enumeration type 'enum pin_config_param' [-Wenum-conversion] PCONFDUMP(PIN_CONFIG_GPIO_PIN_INT, "gpio pin int", 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. Link: https://github.com/ClangBuiltLinux/linux/issues/140 Signed-off-by: Nathan Chancellor --- drivers/pinctrl/pinctrl-lpc18xx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-lpc18xx.c b/drivers/pinctrl/pinctrl-lpc18xx.c index a14bc5e5fc24..4bee606088e1 100644 --- a/drivers/pinctrl/pinctrl-lpc18xx.c +++ b/drivers/pinctrl/pinctrl-lpc18xx.c @@ -631,13 +631,10 @@ static const struct pinctrl_pin_desc lpc18xx_pins[] = { }; /** - * enum lpc18xx_pin_config_param - possible pin configuration parameters * @PIN_CONFIG_GPIO_PIN_INT: route gpio to the gpio pin interrupt * controller. */ -enum lpc18xx_pin_config_param { - PIN_CONFIG_GPIO_PIN_INT = PIN_CONFIG_END + 1, -}; +#define PIN_CONFIG_GPIO_PIN_INT (PIN_CONFIG_END + 1) static const struct pinconf_generic_params lpc18xx_params[] = { {"nxp,gpio-pin-interrupt", PIN_CONFIG_GPIO_PIN_INT, 0},