[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a37rQz6ihEJBZNkOARJXJE7U9TX7pCUhyQjQn6fJw+jUQ@mail.gmail.com>
Date: Wed, 9 Dec 2020 12:04:53 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Daniel Palmer <daniel@...f.com>
Cc: Paul Cercueil <paul@...pouillou.net>,
Linus Walleij <linus.walleij@...aro.org>, od@...c.me,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
"open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] pinctrl: ingenic: Only support SoCs enabled in config
On Wed, Dec 9, 2020 at 11:13 AM Daniel Palmer <daniel@...f.com> wrote:
>
> Hi Paul and others,
>
> Sorry to hijack this but I actually want to do something similar to
> this in some other drivers.
> The targets I'm working with have only 64MB of ram so I want to remove
> code wherever possible.
> Is there any reason to do it like this instead of wrapping the whole
> unneeded of_device_id struct in an #ifdef?
> For example there is a rule that the compatible strings have to be
> present even if the driver isn't usable or something?
No, there is no such rule, but adding lots of #ifdef checks in this
file would be much less readable and more error-prone, as you'd
have to make sure the two #ifdef blocks around the structure
match the one for the ID table, and any function that is called
by more than one SoC has the correct combination of A || B || D
checks, and nobody ever gets that right.
Arnd
Powered by blists - more mailing lists