[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Ve87TE3y6hg1bMxSFAPVcY3wPifGuvtpXNhBw5-eOnPrg@mail.gmail.com>
Date: Sat, 7 Jan 2017 00:45:51 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Vladimir Zapolskiy <vz@...ia.com>
Cc: Luis Oliveira <Luis.Oliveira@...opsys.com>,
Wolfram Sang <wsa@...-dreams.de>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
linux-i2c@...r.kernel.org, devicetree <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ramiro.Oliveira@...opsys.com, Joao Pinto <Joao.Pinto@...opsys.com>,
CARLOS.PALMINHA@...opsys.com
Subject: Re: [PATCH] i2c: core: helper function to detect slave mode
On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy <vz@...ia.com> wrote:
>> + if (IS_BUILTIN(CONFIG_OF) && dev->of_node) {
>
> IS_BUILTIN(CONFIG_OF) looks excessive, check for non-NULL dev->of_node
> should be sufficient.
Sorry, but you missed the point.
This will enable compile time optimization and basically be collapsed to no-op.
>> + }
>> + } else if (IS_BUILTIN(CONFIG_ACPI) && ACPI_HANDLE(dev)) {
>> + dev_dbg(dev, "ACPI slave is not supported yet\n");
>> + }
>
> If so, then it might be better to drop else-if stub for now.
Please, don't.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists