All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] drivers/sh: clk: drop "const" qualifier in I/O read wrappers
Date: Mon, 26 Feb 2018 13:49:41 +0000	[thread overview]
Message-ID: <20180226144941.37447e49@windsurf.lan> (raw)
In-Reply-To: <20171208160640.13125-1-thomas.petazzoni@free-electrons.com>

Hello,

On Fri,  8 Dec 2017 17:06:40 +0100, Thomas Petazzoni wrote:
> The r8/r16/r32 wrappers around ioread8/ioread16/ioread32 take "const
> void __iomem *" pointers, but ioread8/ioread16/ioread32 as defined in
> <asm-generic/iomap.h> don't take const pointers. This causes a warning
> when building cpg.c:
> 
>   CC      net/ipv4/inet_fragment.o
> drivers/sh/clk/cpg.c: In function ‘r8’:
> drivers/sh/clk/cpg.c:41:17: warning: passing argument 1 of ‘ioread8’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>   return ioread8(addr);
>                  ^~~~
> In file included from arch/sh/include/asm/io.h:21:0,
>                  from include/linux/io.h:25,
>                  from drivers/sh/clk/cpg.c:14:
> include/asm-generic/iomap.h:29:21: note: expected ‘void *’ but argument is of type ‘const void *’
>  extern unsigned int ioread8(void __iomem *);
>                      ^~~~~~~
> drivers/sh/clk/cpg.c: In function ‘r16’:
> drivers/sh/clk/cpg.c:46:18: warning: passing argument 1 of ‘ioread16’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>   return ioread16(addr);
>                   ^~~~
> In file included from arch/sh/include/asm/io.h:21:0,
>                  from include/linux/io.h:25,
>                  from drivers/sh/clk/cpg.c:14:
> include/asm-generic/iomap.h:30:21: note: expected ‘void *’ but argument is of type ‘const void *’
>  extern unsigned int ioread16(void __iomem *);
>                      ^~~~~~~~
> drivers/sh/clk/cpg.c: In function ‘r32’:
> drivers/sh/clk/cpg.c:51:18: warning: passing argument 1 of ‘ioread32’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>   return ioread32(addr);
>                   ^~~~
> In file included from arch/sh/include/asm/io.h:21:0,
>                  from include/linux/io.h:25,
>                  from drivers/sh/clk/cpg.c:14:
> include/asm-generic/iomap.h:32:21: note: expected ‘void *’ but argument is of type ‘const void *’
>  extern unsigned int ioread32(void __iomem *);
> 
> To fix this, we simply drop the const qualifiers in the definitions of
> r8/r16/r32. Changing the prototypes of ioread8/ioread16/ioread32 would
> be a much bigger adventure.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

I've sent the patch almost 3 months ago, and it's a trivial patch. Is
it possible to get some feedback, or alternatively, get this patch
applied ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

  reply	other threads:[~2018-02-26 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08 16:06 [PATCH] drivers/sh: clk: drop "const" qualifier in I/O read wrappers Thomas Petazzoni
2018-02-26 13:49 ` Thomas Petazzoni [this message]
2018-02-26 13:58 ` Geert Uytterhoeven
2018-02-26 13:58   ` Geert Uytterhoeven

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=20180226144941.37447e49@windsurf.lan \
    --to=thomas.petazzoni@bootlin.com \
    --cc=linux-sh@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.