From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Zapolskiy Subject: Re: [PATCH] i2c: core: helper function to detect slave mode Date: Sat, 7 Jan 2017 01:43:31 +0200 Message-ID: References: <73246c4a-504c-52d7-dde4-970a45dca0bd@mleia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-i2c-owner@vger.kernel.org To: Andy Shevchenko Cc: Luis Oliveira , Wolfram Sang , Rob Herring , Mark Rutland , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , linux-i2c@vger.kernel.org, devicetree , "linux-kernel@vger.kernel.org" , Ramiro.Oliveira@synopsys.com, Joao Pinto , CARLOS.PALMINHA@synopsys.com List-Id: devicetree@vger.kernel.org On 01/07/2017 12:45 AM, Andy Shevchenko wrote: > On Fri, Jan 6, 2017 at 11:46 PM, Vladimir Zapolskiy 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. > Good point, do you plan to add more "IS_BUILTIN(CONFIG_OF)" checks all over the code to reduce the size of the built image? >>> + } >>> + } 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. > Why do you ask for this stub to be added? -- With best wishes, Vladimir