From: Ulf Hansson <ulf.hansson@linaro.org>
To: Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
kernel test robot <lkp@intel.com>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] mmc: pwrseq: sd8787: fix compilation warning
Date: Wed, 25 Aug 2021 11:22:45 +0200 [thread overview]
Message-ID: <CAPDyKFpuQ6STxfPb4aFS8nHFwHHL1mHfwTu34RWPJ0MKNwFCqQ@mail.gmail.com> (raw)
In-Reply-To: <20210825081931.598934-1-claudiu.beznea@microchip.com>
On Wed, 25 Aug 2021 at 10:21, Claudiu Beznea
<claudiu.beznea@microchip.com> wrote:
>
> Fixed compilation warning "cast from pointer to integer of
> different size [-Wpointer-to-int-cast]"
>
> Fixes: b2832b96fcf5 ("mmc: pwrseq: sd8787: add support for wilc1000")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/core/pwrseq_sd8787.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/core/pwrseq_sd8787.c b/drivers/mmc/core/pwrseq_sd8787.c
> index 264e48067af2..2e120ad83020 100644
> --- a/drivers/mmc/core/pwrseq_sd8787.c
> +++ b/drivers/mmc/core/pwrseq_sd8787.c
> @@ -56,9 +56,12 @@ static const struct mmc_pwrseq_ops mmc_pwrseq_sd8787_ops = {
> .power_off = mmc_pwrseq_sd8787_power_off,
> };
>
> +static const u32 sd8787_delay_ms = 300;
> +static const u32 wilc1000_delay_ms = 5;
> +
> static const struct of_device_id mmc_pwrseq_sd8787_of_match[] = {
> - { .compatible = "mmc-pwrseq-sd8787", .data = (void *)300 },
> - { .compatible = "mmc-pwrseq-wilc1000", .data = (void *)5 },
> + { .compatible = "mmc-pwrseq-sd8787", .data = &sd8787_delay_ms },
> + { .compatible = "mmc-pwrseq-wilc1000", .data = &wilc1000_delay_ms },
> {/* sentinel */},
> };
> MODULE_DEVICE_TABLE(of, mmc_pwrseq_sd8787_of_match);
> @@ -74,7 +77,7 @@ static int mmc_pwrseq_sd8787_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> match = of_match_node(mmc_pwrseq_sd8787_of_match, pdev->dev.of_node);
> - pwrseq->reset_pwrdwn_delay_ms = (u32)match->data;
> + pwrseq->reset_pwrdwn_delay_ms = *(u32 *)match->data;
>
> pwrseq->pwrdn_gpio = devm_gpiod_get(dev, "powerdown", GPIOD_OUT_LOW);
> if (IS_ERR(pwrseq->pwrdn_gpio))
> --
> 2.25.1
>
prev parent reply other threads:[~2021-08-25 9:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-25 8:19 [PATCH] mmc: pwrseq: sd8787: fix compilation warning Claudiu Beznea
2021-08-25 9:22 ` Ulf Hansson [this message]
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=CAPDyKFpuQ6STxfPb4aFS8nHFwHHL1mHfwTu34RWPJ0MKNwFCqQ@mail.gmail.com \
--to=ulf.hansson@linaro.org \
--cc=claudiu.beznea@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=lkp@intel.com \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).