Re: [PATCH v8 13/25] m68k: Dispatch nvram_ops calls to Atari or Mac functions

From: Arnd Bergmann
Date: Mon Dec 31 2018 - 07:19:47 EST


On Sun, Dec 30, 2018 at 11:12 PM Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> wrote:
> On Sun, 30 Dec 2018, LEROY Christophe wrote:

> But I'm over-simplifying. Arnd's alternative actually goes like this,
>
> #if defined(CONFIG_MAC) && !defined(CONFIG_ATARI)
> const struct nvram_ops arch_nvram_ops = {
> /* ... */
> }
> #elif !defined(CONFIG_MAC) && defined(CONFIG_ATARI)
> const struct nvram_ops arch_nvram_ops = {
> /* ... */
> }
> #elif defined(CONFIG_MAC) && defined(CONFIG_ATARI)
> const struct nvram_ops arch_nvram_ops = {
> /* ... */
> }
> #endif
>
> So, you're right, this isn't "duplication", it's "triplication".

Ok, I failed to realized that MAC and ATARI are not mutually exclusive.
I agree that your original version is best then.

Arnd