From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940875AbdAFWqT (ORCPT ); Fri, 6 Jan 2017 17:46:19 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:35800 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S940809AbdAFWpx (ORCPT ); Fri, 6 Jan 2017 17:45:53 -0500 MIME-Version: 1.0 In-Reply-To: <73246c4a-504c-52d7-dde4-970a45dca0bd@mleia.com> References: <73246c4a-504c-52d7-dde4-970a45dca0bd@mleia.com> From: Andy Shevchenko Date: Sat, 7 Jan 2017 00:45:51 +0200 Message-ID: Subject: Re: [PATCH] i2c: core: helper function to detect slave mode To: Vladimir Zapolskiy 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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