Re: [PATCH 4/4] sh: machvec: remove custom ioport_{un,}map()

Geert Uytterhoeven <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.kernel
Message-ID <CAMuHMdVf6pBn2O61ynkdk9MDj0WiMt-12ffvpzfgL51Kz4_Jfg@mail.gmail.com>
Hi Adrian,

On Fri, Sep 8, 2023 at 12:11 PM John Paul Adrian Glaubitz
<[email protected]> wrote:
> On Wed, 2023-08-02 at 20:48 +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <[email protected]>
> >
> > These functions were only used on the microdev
> > board that is now gone, so remove them to simplify
> > the ioport handling.
> >
> > This could be further simplified to use the generic
> > I/O port accessors now.
> >
> > Signed-off-by: Arnd Bergmann <[email protected]>

> >  void ioport_unmap(void __iomem *addr)
> >  {
> > -     if (sh_mv.mv_ioport_unmap)
> > -             sh_mv.mv_ioport_unmap(addr);
> >  }
> >  EXPORT_SYMBOL(ioport_unmap);
>
> Why aren't you removing the function ioport_unmap(void __iomem *addr) completely
> and just turn it into stub? Is it still referenced somewhere?

Because architectures are supposed to implement it (there is no
__weak default).

An alternative would be to provide a dummy static inline, like
e.g. m68k does:

arch/m68k/include/asm/kmap.h:#define ioport_unmap ioport_unmap
arch/m68k/include/asm/kmap.h:static inline void ioport_unmap(void __iomem *p)
arch/m68k/include/asm/kmap.h-{
arch/m68k/include/asm/kmap.h-}

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.