From patchwork Wed Dec 20 05:38:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 13499561 X-Patchwork-Delegate: kw@linux.com Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EF4A11738; Wed, 20 Dec 2023 05:38:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com X-IronPort-AV: E=Sophos;i="6.04,290,1695654000"; d="scan'208";a="187105329" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 20 Dec 2023 14:38:40 +0900 Received: from localhost.localdomain (unknown [10.166.13.99]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 67344416941A; Wed, 20 Dec 2023 14:38:40 +0900 (JST) From: Yoshihiro Shimoda To: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, mani@kernel.org Cc: linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Justin Stitt , Nathan Chancellor , Yoshihiro Shimoda , Geert Uytterhoeven , Manivannan Sadhasivam Subject: [PATCH v4 5/6] PCI: iproc: fix -Wvoid-pointer-to-enum-cast warning Date: Wed, 20 Dec 2023 14:38:28 +0900 Message-Id: <20231220053829.1921187-6-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231220053829.1921187-1-yoshihiro.shimoda.uh@renesas.com> References: <20231220053829.1921187-1-yoshihiro.shimoda.uh@renesas.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Justin Stitt When building with clang 18 I see the following warning: | drivers/pci/controller/pcie-iproc-platform.c:55:15: warning: cast to smaller | integer type 'enum iproc_pcie_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] | 55 | pcie->type = (enum iproc_pcie_type) of_device_get_match_data(dev); To fix this issue, use uintptr_t instead. Link: https://github.com/ClangBuiltLinux/linux/issues/1910 Reported-by: Nathan Chancellor Signed-off-by: Justin Stitt [shimoda: revise the commit description] Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/pcie-iproc-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-iproc-platform.c b/drivers/pci/controller/pcie-iproc-platform.c index acdc583d2980..83cbc95f4384 100644 --- a/drivers/pci/controller/pcie-iproc-platform.c +++ b/drivers/pci/controller/pcie-iproc-platform.c @@ -52,7 +52,7 @@ static int iproc_pltfm_pcie_probe(struct platform_device *pdev) pcie = pci_host_bridge_priv(bridge); pcie->dev = dev; - pcie->type = (enum iproc_pcie_type) of_device_get_match_data(dev); + pcie->type = (uintptr_t) of_device_get_match_data(dev); ret = of_address_to_resource(np, 0, ®); if (ret < 0) {