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 F28F4EEC2; Tue, 26 Dec 2023 00:23:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d3ynbyNG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B17A5C433C7; Tue, 26 Dec 2023 00:23:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703550181; bh=IXu3w1hIH5VlHvFJPhN0KkQphUYGmzFOAnbfy8HlK/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d3ynbyNG+lxM6wAhQIWEmwR0EmIg7jhfuYrIg+z2YQpVA4y4SrsARyM+gNWtaupiF yTlPK1Q7hZ/1gmhh9GjW8B5j/vsp+42QsLUuD6s1vi3tak7cg/S1b+1yTmxvH4XXsl ZoKGoXQ9iXBZu1VIjv7SoCO5Ilfu3d7GlQlTchzAK3RuOr7K+BcYEBWL1nfm7gUZ0y CT7M0wmxCRu13n/TcUibNk0Fsu8RCN/YAji6oIMEukthlEbqzKhE56qmg7z5Zni3Z8 dRgVc0uqV//giJVzHr5c+fU/WGVq2BkMc9zv72d3bYlaDdTAcGrMhy9r9/KR5ls+2/ jVgJjEps9/dKA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Krzysztof Kozlowski , Philipp Zabel , Sasha Levin , robh@kernel.org, Steen.Hegelund@microchip.com, dlemoal@kernel.org Subject: [PATCH AUTOSEL 6.1 02/24] reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning Date: Mon, 25 Dec 2023 19:21:55 -0500 Message-ID: <20231226002255.5730-2-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231226002255.5730-1-sashal@kernel.org> References: <20231226002255.5730-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.1.69 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 5ca145b64e63d..30951914afac7 100644 --- a/drivers/reset/hisilicon/hi6220_reset.c +++ b/drivers/reset/hisilicon/hi6220_reset.c @@ -164,7 +164,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