From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2FB4137B; Tue, 26 Dec 2023 00:20:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A5p6hFXD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96F24C433C8; Tue, 26 Dec 2023 00:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703550028; bh=uPwRkFZ7rJy+O8GUDoosbiTpnSRCgs1QbDUokowEznM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A5p6hFXDQQDeiCokKHDEyigyLH/jZ7NkWKvpkQ/aCZpSUMKoiSnH1+wKJBXOkYCIM LB3SbErVzuKU91iLNbrOxyaRsiGBmix2IgjBrabBZTkDFvRx3ZXO/nRbRZdGkNshit nPSxZM5/mtfZSLXVAvYryppgChwL/etO3k9PlfAP787ZelgUDp6wneivAukti6pq01 K2EfnvokftuAgeCeNfiqKlyD29jw+IHhOtoAxYmGSpbbkNzIAopmvKtzRK5+DVe7vX UIJ7AaazAL9JomtXFTV1dJKIbGgbEsZioGZNLZINgrYAtewsFVLVNfcnHESQ/xkx4x kS3vRKJfcyPpg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Krzysztof Kozlowski , Philipp Zabel , Sasha Levin , Steen.Hegelund@microchip.com, robh@kernel.org, dlemoal@kernel.org Subject: [PATCH AUTOSEL 6.6 02/39] reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning Date: Mon, 25 Dec 2023 19:18:52 -0500 Message-ID: <20231226002021.4776-2-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231226002021.4776-1-sashal@kernel.org> References: <20231226002021.4776-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.8 Content-Transfer-Encoding: 8bit From: Krzysztof Kozlowski [ Upstream commit b5ec294472794ed9ecba0cb4b8208372842e7e0d ] 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: hi6220_reset.c:166:9: error: cast to smaller integer type 'enum hi6220_reset_ctrl_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230810091300.70197-1-krzysztof.kozlowski@linaro.org Signed-off-by: Philipp Zabel Signed-off-by: Sasha Levin --- drivers/reset/hisilicon/hi6220_reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/reset/hisilicon/hi6220_reset.c b/drivers/reset/hisilicon/hi6220_reset.c index 8d1fce18ded78..5c3267acd2b1c 100644 --- a/drivers/reset/hisilicon/hi6220_reset.c +++ b/drivers/reset/hisilicon/hi6220_reset.c @@ -163,7 +163,7 @@ static int hi6220_reset_probe(struct platform_device *pdev) if (!data) return -ENOMEM; - type = (enum hi6220_reset_ctrl_type)of_device_get_match_data(dev); + type = (uintptr_t)of_device_get_match_data(dev); regmap = syscon_node_to_regmap(np); if (IS_ERR(regmap)) { -- 2.43.0