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]
Message-ID: <CAK8P3a03tJbbFAjPVW4ebKA5=ystYrFfVceNSmqcGtZg5K4uWw@mail.gmail.com>
Date:   Thu, 20 May 2021 14:32:52 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "C. Scott Ananian" <cananian@...mni.princeton.edu>,
        Kanoj Sarcar <kanoj@....com>
Subject: Re: [PATCH 16/16] char: mem: Provide local prototype for non-static function

On Thu, May 20, 2021 at 2:13 PM Lee Jones <lee.jones@...aro.org> wrote:
>
> Fixes the following W=1 kernel build warning(s):
>
>  drivers/char/mem.c:95:29: warning: no previous prototype for ‘unxlate_dev_mem_ptr’ [-Wmissing-prototypes]
>  drivers/char/mem.c:96:13: note: in expansion of macro ‘unxlate_dev_mem_ptr’
>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: "C. Scott Ananian" <cananian@...mni.princeton.edu>
> Cc: Kanoj Sarcar <kanoj@....com>
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
> ---
>  drivers/char/mem.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/char/mem.c b/drivers/char/mem.c
> index 95741f93a6cd0..7969ac85491df 100644
> --- a/drivers/char/mem.c
> +++ b/drivers/char/mem.c
> @@ -40,6 +40,8 @@
>  #define DEVMEM_MINOR   1
>  #define DEVPORT_MINOR  4
>
> +void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
> +

This one doesn't look quite right to me, won't it break on architectures
that use the static inline unxlate_dev_mem_ptr() definition from
asm-generic?

I think the correct way would be to remove the __weak annotation
as well as the inline definition, and replace the local definition with
a static inline version.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ