From: Brad Boyer <brad@allandria.com>
To: Laurent Vivier <laurent@vivier.eu>
Cc: Greg KH <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-serial@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org, Joshua Thompson <funaho@jurai.org>
Subject: Re: [PATCH] serial: pmac_zilog: don't init if zilog is not available
Date: Tue, 20 Oct 2020 15:44:46 -0700 [thread overview]
Message-ID: <20201020224446.GA15066@allandria.com> (raw)
In-Reply-To: <b52e7fde-8874-3c53-ca13-7709656b69fb@vivier.eu>
On Tue, Oct 20, 2020 at 08:42:53PM +0200, Laurent Vivier wrote:
> Le 20/10/2020 ?? 20:32, Greg KH a ??crit??:
> > On Tue, Oct 20, 2020 at 08:19:26PM +0200, Laurent Vivier wrote:
> >> Le 20/10/2020 ?? 19:37, Greg KH a ??crit??:
> >>> Why not fix it to work properly like other arch checks are done
> >> I would be happy to do the same.
> >>
> >>> Put it in a .h file and do the #ifdef there. Why is this "special"?
> >>
> >> I don't know.
> >>
> >
> > Yup, that would be a good start, but why is the pmac_zilog.h file
> > responsible for this? Shouldn't this be in some arch-specific file
> > somewhere?
>
> For m68k, MACH_IS_MAC is defined in arch/m68k/include/asm/setup.h
>
> If I want to define it for any other archs I don't know in which file we
> can put it.
>
> But as m68k mac is only sharing drivers with pmac perhaps we can put
> this in arch/powerpc/include/asm/setup.h?
Wouldn't it be better to rearrange this code to only run if the devices
are present? This is a macio driver on pmac and a platform driver on mac,
so shouldn't it be possible to only run this code when the appropriate
entries are present in the right data structures?
I didn't look at a lot of the other serial drivers, but some other mac
drivers have recently been updated to no longer have MACH_IS_MAC checks
due to being converted to platform drivers.
Brad Boyer
brad@allandria.com
next prev parent reply other threads:[~2020-10-20 23:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 16:23 [PATCH] serial: pmac_zilog: don't init if zilog is not available Laurent Vivier
2020-10-20 16:28 ` Greg KH
2020-10-20 16:37 ` Laurent Vivier
2020-10-20 17:37 ` Greg KH
2020-10-20 18:19 ` Laurent Vivier
2020-10-20 18:32 ` Greg KH
2020-10-20 18:42 ` Laurent Vivier
2020-10-20 22:44 ` Brad Boyer [this message]
2020-10-20 23:43 ` Finn Thain
2020-10-21 7:54 ` Laurent Vivier
2020-10-22 3:23 ` Finn Thain
2020-10-22 7:16 ` Laurent Vivier
2020-10-22 7:26 ` Geert Uytterhoeven
2020-10-23 3:21 ` Finn Thain
2020-10-22 2:52 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201020224446.GA15066@allandria.com \
--to=brad@allandria.com \
--cc=funaho@jurai.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=laurent@vivier.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-serial@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).