lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 28 Jun 2019 09:01:40 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Christoph Hellwig <hch@....de>
Cc:     Yoshinori Sato <ysato@...rs.sourceforge.jp>,
        Rich Felker <dalias@...c.org>,
        Linux-sh list <linux-sh@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] sh: clkfwk: don't pass void pointers to ioread*

Hi Christoph,

On Fri, Jun 28, 2019 at 8:25 AM Christoph Hellwig <hch@....de> wrote:
> Passing pointers with a const attrŅ–bute to the ioread* functions
> causes a lot of compiler warnings, so remove the extra attributes.
>
> Signed-off-by: Christoph Hellwig <hch@....de>

Thanks for your patch!

> ---
>  drivers/sh/clk/cpg.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c
> index eeb028b9cdb3..4f3d99d37809 100644
> --- a/drivers/sh/clk/cpg.c
> +++ b/drivers/sh/clk/cpg.c
> @@ -36,17 +36,17 @@ static void sh_clk_write(int value, struct clk *clk)
>                 iowrite32(value, clk->mapped_reg);
>  }
>
> -static unsigned int r8(const void __iomem *addr)
> +static unsigned int r8(void __iomem *addr)

This is due to include/asm-generic/io.h and include/asm-generic/iomap.h
using different prototypes, right?

include/asm-generic/io.h:static inline u8 ioread8(const volatile void
__iomem *addr)
include/asm-generic/io.h:static inline u16 ioread16(const volatile
void __iomem *addr)
include/asm-generic/io.h:static inline u32 ioread32(const volatile
void __iomem *addr)
include/asm-generic/io.h:static inline u64 ioread64(const volatile
void __iomem *addr)

include/asm-generic/iomap.h:extern unsigned int ioread8(void __iomem *);
include/asm-generic/iomap.h:extern unsigned int ioread16(void __iomem *);
include/asm-generic/iomap.h:extern unsigned int ioread32(void __iomem *);
include/asm-generic/iomap.h:extern u64 ioread64(void __iomem *);

Wouldn't it be better to fix include/asm-generic/iomap.h and lib/iomap.c
instead?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ