Re: [PATCH] sh: exports for delay.h

Geert Uytterhoeven <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.kernel.cross-arch
Message-ID <CAMuHMdVpTtcT9LVGNvFLm4cvrNF=fe1dVsi2zo73Yee3oYrJYQ@mail.gmail.com>
Hi Al,

On Sun, Dec 22, 2024 at 11:23 PM Al Viro <[email protected]> wrote:
>         __delay() is either exported or exists as a static inline
> on all architectures - except sh.
>
>         Add the missing export of __delay(), move the exports of
> the rest of that bunch from sh_ksyms32.c to the place where all
> of them are defined (i.e. arch/sh/lib/delay.c).
>
> Signed-off-by: Al Viro <[email protected]>

Thanks for your patch!

> --- a/arch/sh/lib/delay.c
> +++ b/arch/sh/lib/delay.c
> @@ -7,6 +7,7 @@
>
>  #include <linux/sched.h>
>  #include <linux/delay.h>
> +#include <linux/export.h>
>
>  void __delay(unsigned long loops)
>  {
> @@ -29,6 +30,7 @@ void __delay(unsigned long loops)
>                 : "0" (loops)
>                 : "t");
>  }
> +EXPORT_SYMBOL(__delay);

Please do not export __delay, as it is an internal implementation detail.
Drivers should not call __delay() directly, as it has non-standardized
semantics, or may not even exist.

Unfortunately this comes up once in a while, cfr. commit
7619f957dc8cb8b2 ("Revert "sh: add missing EXPORT_SYMBOL() for
__delay"").

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.