From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161323AbdAFXnj (ORCPT ); Fri, 6 Jan 2017 18:43:39 -0500 Received: from mleia.com ([178.79.152.223]:49883 "EHLO mail.mleia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969904AbdAFXnf (ORCPT ); Fri, 6 Jan 2017 18:43:35 -0500 Subject: Re: [PATCH] i2c: core: helper function to detect slave mode To: Andy Shevchenko References: <73246c4a-504c-52d7-dde4-970a45dca0bd@mleia.com> 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 From: Vladimir Zapolskiy Message-ID: Date: Sat, 7 Jan 2017 01:43:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20170106_234332_679455_FA623557 X-CRM114-Status: GOOD ( 14.65 ) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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