From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH] i2c: core: helper function to detect slave mode Date: Sat, 7 Jan 2017 00:45:51 +0200 Message-ID: References: <73246c4a-504c-52d7-dde4-970a45dca0bd@mleia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <73246c4a-504c-52d7-dde4-970a45dca0bd-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Vladimir Zapolskiy Cc: Luis Oliveira , Wolfram Sang , Rob Herring , Mark Rutland , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Ramiro.Oliveira-HKixBCOQz3hWk0Htik3J/w@public.gmane.org, Joao Pinto , CARLOS.PALMINHA-HKixBCOQz3hWk0Htik3J/w@public.gmane.org List-Id: linux-i2c@vger.kernel.org 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. >> + } >> + } 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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html