From: Chanwoo Choi <chanwoo@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Lee Jones <lee@kernel.org>, Chanwoo Choi <cw00.choi@samsung.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
patches@opensource.cirrus.com
Cc: Andi Shyti <andi.shyti@kernel.org>
Subject: Re: [PATCH 2/9] mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning
Date: Thu, 10 Aug 2023 22:47:12 +0900 [thread overview]
Message-ID: <0bea4002-8160-bebc-2243-c7d4044eb5ad@kernel.org> (raw)
In-Reply-To: <20230810095849.123321-2-krzysztof.kozlowski@linaro.org>
On 23. 8. 10. 18:58, Krzysztof Kozlowski wrote:
> 'dev_type' is an enum, thus cast of pointer on 64-bit compile test with
> W=1 causes:
>
> max14577.c:406:5: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/mfd/max14577.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/max14577.c b/drivers/mfd/max14577.c
> index 25ed8846b7fb..1f4f5002595c 100644
> --- a/drivers/mfd/max14577.c
> +++ b/drivers/mfd/max14577.c
> @@ -402,8 +402,7 @@ static int max14577_i2c_probe(struct i2c_client *i2c)
>
> of_id = of_match_device(max14577_dt_match, &i2c->dev);
> if (of_id)
> - max14577->dev_type =
> - (enum maxim_device_type)of_id->data;
> + max14577->dev_type = (uintptr_t)of_id->data;
> } else {
> max14577->dev_type = id->driver_data;
> }
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
--
Best Regards,
Samsung Electronics
Chanwoo Choi
next prev parent reply other threads:[~2023-08-10 13:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 9:58 [PATCH 1/9] mfd: stmpe: " Krzysztof Kozlowski
2023-08-10 9:58 ` [PATCH 2/9] mfd: max14577: " Krzysztof Kozlowski
2023-08-10 13:47 ` Chanwoo Choi [this message]
2023-08-10 9:58 ` [PATCH 3/9] mfd: max77541: " Krzysztof Kozlowski
2023-08-10 9:58 ` [PATCH 4/9] mfd: hi6421-pmic: " Krzysztof Kozlowski
2023-08-10 9:58 ` [PATCH 5/9] mfd: lp87565: " Krzysztof Kozlowski
2023-08-10 9:58 ` [PATCH 6/9] mfd: tc3589: " Krzysztof Kozlowski
2023-08-10 9:58 ` [PATCH 7/9] mfd: wm8994: " Krzysztof Kozlowski
2023-08-10 10:12 ` Charles Keepax
2023-08-10 9:58 ` [PATCH 8/9] mfd: wm31x: " Krzysztof Kozlowski
2023-08-10 9:58 ` [PATCH 9/9] mfd: mxs-lradc: " Krzysztof Kozlowski
2023-08-17 17:19 ` [PATCH 1/9] mfd: stmpe: " Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0bea4002-8160-bebc-2243-c7d4044eb5ad@kernel.org \
--to=chanwoo@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=andi.shyti@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=patches@opensource.cirrus.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®