Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965241AbbKDK3e (ORCPT ); Wed, 4 Nov 2015 05:29:34 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:63340 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964964AbbKDK3c (ORCPT ); Wed, 4 Nov 2015 05:29:32 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Peter Ujfalusi , Vinod Koul , Sekhar Nori , linux-kernel@vger.kernel.org, Kevin Hilman , dmaengine@vger.kernel.org, Dan Williams , linux-omap@vger.kernel.org Subject: Re: [PATCH] dmaengine: edma: fix build without CONFIG_OF Date: Wed, 04 Nov 2015 11:29:01 +0100 Message-ID: <3771870.4l0jsKt335@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <5639CA72.4050604@ti.com> References: <17811472.bY8CqmdEVy@wuerfel> <16166945.0Jm7Xdjkb9@wuerfel> <5639CA72.4050604@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:cPxxe8KsOpdyN22OSNT3r4WuHyhowFI5fihsdtcrsw1cjo2+00N jWqIVka9Ap0RWp3oUFpsrbcSaMxsNrIIdyzB2M1Smb4LA2z82mOtRPmFgrZS+pQEObzbDq9 IP2MU29mfUFso2ObkeilsEYnuakwAFWoO/rPI6I2VoRR3b7vY/q9YoKoAjbxrqIJvlMkbrU qNAIjqT9n1w6MTSo2jxtg== X-UI-Out-Filterresults: notjunk:1;V01:K0:ev2SXpCGp8Q=:9QTe8cVPUaR3aYF3/Mh2L7 MZdwovFZQiIqQ5CjTQb6r5gI14IeLLbwSlDkH5XWjr7iBJxpBqWBCKtSdPBDdJ8o3xd85OUMh BZhJrBdeCudRtQV8JmPUu6U9oMrKuwrry8WkSaDcF8DN+oSdoch7VMcA3SDIZICFMf/jWPM+v ESMS7T6EglwPxJ6Wz3Szslp1dCA8+MdR5MwVWJJESgX7wZkd/EWM9wR9dkaAsc6qaDEvozodq yij6Qcdz1HFnYECP4tR5rZlRcu2bjDelBwGVD7ZBluvg7u3o2gRAVQDNdmsCFQ+h44U0+R8/Q 9jhh8xemRtqzgL0n6BqXMMpmrPfTBuUiySwac9f68UONtSV5ZGgJKW5FkHxBnKo2sQ3GveQFR UHDwoYOHwZevuCQwQaYdSY6z6TGstfdRTWPU4L3fB3dHs3+fhOJkQnjH7d2Cy8lfkVH3q6hmu V8C9sgnILiZEq77d3Fz3SoLAlSSCPYvTB/j3lMstTZPCD9sbrFsC49XvFJEmmADt23FhSU3g7 kd6lvnxk0u6vWwtD8skLtGc/ac6Ev5Ys9PFiLKGUdHZG/EPZdsrdib79pI3mJRNkcSzTkDC4T pR4NOL7647r9nzvRRHOyOTp9aucyAlCpivqsHnFtJF5idPCQiHyLqVhTcrIyCollhMxnUVELY WlhxfkR/pFlnRsDPlbdj4TXJVS5P7bYXoVbTnZ7wQd5ZIbEh6kN8gOzTgibTcRExcmVomitV5 2gLW+MWdXDyjxpLG Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1598 Lines: 40 On Wednesday 04 November 2015 11:05:54 Peter Ujfalusi wrote: > > > > I think that would be less readable, and gives no compile-time coverage > > to the contents of the edma_tc_set_pm_state function. > > Hrm, if the compiler knows that there is no need to compile the code after the: > if (!IS_ENABLED(CONFIG_OF) || !tc) > when OF is disabled, then it does not give more compile coverage then have > empty inline function in case of !OF. No, the way it works (simplified but close enough here) is that gcc parses all the source code first and throws warnings or errors for everything that looks wrong to it, and only later throws out all code that it knows is never used before emitting the object code. The difference to the #ifdef is that the preprocessor here throws out all disabled code before it gets parsed, so we don't get warnings for it. > Not sure about it, but if we disable all optimization in gcc, then we might > get the same missing symbol? It's impossible to build the kernel with inlining disabled, because we rely on the same kind of optimization in lots of places. > > The effect is the same, so I'd rather stay with my version. > > I'm fine with both. It is up to Vinod to decide which one he prefers (I prefer > the #if #else #endif version). > > Anyways: > Acked-by: Peter Ujfalusi Thanks! Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/