linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
	Rich Felker <dalias@libc.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux-SH <linux-sh@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH][repost] sh: clkfwk: remove r8/r16/r32
Date: Fri, 10 Jan 2020 00:13:53 +0000	[thread overview]
Message-ID: <87d0bstbge.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <CAMuHMdWo2w=Uf-yKReg+BMjKk4otGqG0DE4urtWhVOTE9+o1kw@mail.gmail.com>


Hi Geert

> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > SH will get below warning
> >
> > ${LINUX}/drivers/sh/clk/cpg.c: In function 'r8':
> > ${LINUX}/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 ${LINUX}/arch/sh/include/asm/io.h:21,
> >                  from ${LINUX}/include/linux/io.h:13,
> >                  from ${LINUX}/drivers/sh/clk/cpg.c:14:
> > ${LINUX}/include/asm-generic/iomap.h:29:29: note: expected 'void *' but
> > argument is of type 'const void *'
> >  extern unsigned int ioread8(void __iomem *);
> >                              ^~~~~~~~~~~~~~
> >
> > We don't need "const" for r8/r16/r32.
> > And we don't need r8/r16/r32 themselvs.
> > This patch cleanup these.
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Thanks

> >  static int sh_clk_mstp_enable(struct clk *clk)
> >  {
> >         sh_clk_write(sh_clk_read(clk) & ~(1 << clk->enable_bit), clk);
> >         if (clk->status_reg) {
> > -               unsigned int (*read)(const void __iomem *addr);
> > +               unsigned int (*read)(void __iomem *addr);
> 
> While it is good to get rid of the wrappers, the change above will conflict with
> [PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic
> implementation)
> (https://lore.kernel.org/lkml/20200108200528.4614-2-krzk@kernel.org/),
> which will add const to ioread*().

Oh, I see.
Will consider about it, and post v2

Thank you for your help !!
Best regards
---
Kuninori Morimoto

  reply	other threads:[~2020-01-10  0:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  0:26 [PATCH][repost] SH: compile fixup patches Kuninori Morimoto
2020-01-09  0:28 ` [PATCH][repost] sh: Convert ins[bwl]/outs[bwl] macros to inline functions Kuninori Morimoto
2020-01-09  0:28 ` [PATCH][repost] sh: clkfwk: remove r8/r16/r32 Kuninori Morimoto
2020-01-09  8:18   ` Geert Uytterhoeven
2020-01-10  0:13     ` Kuninori Morimoto [this message]
2020-01-09  0:30 ` [PATCH][repost] SH: Convert iounmap() macros to inline functions Kuninori Morimoto

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=87d0bstbge.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=akpm@linux-foundation.org \
    --cc=dalias@libc.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /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).