diff mbox series

[2/3] mmc: s3cmci: Use proper printk format for iomem pointer

Message ID 20200902204847.2764-2-krzk@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/3] mmc: davinci: Fix -Wpointer-to-int-cast on compile test | expand

Commit Message

Krzysztof Kozlowski Sept. 2, 2020, 8:48 p.m. UTC
iomem pointers should be printed with pointer format to hide the
actual value and fix warnings when compile testing for 64-bit
architecture:

  drivers/mmc/host/s3cmci.c:1355:46: warning:
    cast from pointer to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/mmc/host/s3cmci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ulf Hansson Sept. 3, 2020, 8:10 a.m. UTC | #1
On Wed, 2 Sep 2020 at 22:49, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> iomem pointers should be printed with pointer format to hide the
> actual value and fix warnings when compile testing for 64-bit
> architecture:
>
>   drivers/mmc/host/s3cmci.c:1355:46: warning:
>     cast from pointer to integer of different size [-Wpointer-to-int-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/s3cmci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
> index dcd458649338..3fb597095079 100644
> --- a/drivers/mmc/host/s3cmci.c
> +++ b/drivers/mmc/host/s3cmci.c
> @@ -1352,7 +1352,7 @@ static int s3cmci_state_show(struct seq_file *seq, void *v)
>  {
>         struct s3cmci_host *host = seq->private;
>
> -       seq_printf(seq, "Register base = 0x%08x\n", (u32)host->base);
> +       seq_printf(seq, "Register base = 0x%p\n", host->base);
>         seq_printf(seq, "Clock rate = %ld\n", host->clk_rate);
>         seq_printf(seq, "Prescale = %d\n", host->prescaler);
>         seq_printf(seq, "is2440 = %d\n", host->is2440);
> --
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index dcd458649338..3fb597095079 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1352,7 +1352,7 @@  static int s3cmci_state_show(struct seq_file *seq, void *v)
 {
 	struct s3cmci_host *host = seq->private;
 
-	seq_printf(seq, "Register base = 0x%08x\n", (u32)host->base);
+	seq_printf(seq, "Register base = 0x%p\n", host->base);
 	seq_printf(seq, "Clock rate = %ld\n", host->clk_rate);
 	seq_printf(seq, "Prescale = %d\n", host->prescaler);
 	seq_printf(seq, "is2440 = %d\n", host->is2440);