Re: [PATCH 32/52] m68k: mac: Add and use "mac.h"

Geert Uytterhoeven
2023-09-09T12:11:11Z

Hi Finn,

On Sat, Sep 9, 2023 at 12:59 AM Finn Thain <fthain@linux-m68k.org> wrote:
> On Fri, 8 Sep 2023, Geert Uytterhoeven wrote:
> > On Fri, Sep 8, 2023 at 1:44 AM Finn Thain <fthain@linux-m68k.org> wrote:
> > > On Thu, 7 Sep 2023, Geert Uytterhoeven wrote:
> > > > --- /dev/null
> > > > +++ b/arch/m68k/mac/mac.h
> > > > @@ -0,0 +1,25 @@
> > > > +/* SPDX-License-Identifier: GPL-2.0 */
> > > > +
> > > > +struct rtc_time;
> > > > +
> > >
> > > I don't think we need a new header file. Related function prototypes
> > > already have homes in existing header files --
> > >
> > > > +/* baboon.c */
> > > > +void baboon_init(void);
> > > > +
> > >
> > > this could go into mac_baboon.h
> > >
> > > > +/* iop.c */
> > > > +void iop_init(void);
> > > > +
> > >
> > > mac_iop.h
> > >
> > > > +/* misc.c */
> > > > +int mac_hwclk(int op, struct rtc_time *t);
> > > > +
> > >
> > > macintosh.h
> > >
> > > > +/* macboing.c */
> > > > +void mac_mksound(unsigned int freq, unsigned int length);
> > > > +
> > >
> > > mac_asc.h
> > >
> > > > +/* oss.c */
> > > > +void oss_init(void);
> > > > +
> > >
> > > mac_oss.h
> > >
> > > > +/* psc.c */
> > > > +void psc_init(void);
> > > > +
> > >
> > > mac_psc.h
> > >
> > > > +/* via.c */
> > > > +void via_init(void);
> > > > +void via_init_clock(void);
> > >
> > > mac_via.h
> >
> > All mac*.h you suggest live under arch/m68k/include/asm/, and are thus
> > shared with the whole tree, while only the core code under arch/m68k/
> > needs these definitions.
> >
>
> I guess #include "../mac/mac.h" is expected but
> #include "../../m68k/mac/mac.h" is not intended (?)

Yes indeed.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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