Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbbETMCC (ORCPT ); Wed, 20 May 2015 08:02:02 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:65428 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751928AbbETMB7 (ORCPT ); Wed, 20 May 2015 08:01:59 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Thierry Reding , Alexandre Courbot , gnurou@gmail.com, David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Ben Skeggs Subject: Re: [PATCH] drm/nouveau/platform: fix compilation if !CONFIG_IOMMU Date: Wed, 20 May 2015 14:01:25 +0200 Message-ID: <8810674.KfveOO5Unf@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150520113231.GA21937@ulmo.nvidia.com> References: <555BD66A.5020704@nvidia.com> <1432102224-15169-1-git-send-email-acourbot@nvidia.com> <20150520113231.GA21937@ulmo.nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:RmKvQ4hGv8HUm5MJO1p5tj6DYVBGXWniRW0rdNHUtxAOGQjwyjr 2f2znUK2J6/ptnoho+MnV2lWjCJGf+D3ja72LBSM6jTRjLdvFJTOpmGAVfVeYe7rDsQwLnm SjXsi2IIkc9c7eOs+dJSBw3s/YCSvPSZ040I9PjiUfZBOuU0VOmIeHM1wPwRF7I4Mf7HzND yhXjovSt/H9el1lBYu9ZA== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 806 Lines: 22 On Wednesday 20 May 2015 13:32:33 Thierry Reding wrote: > > Since these are all static functions, perhaps an "if (IS_ENABLED(...))" > would work here? That way you'd get compile coverage of the code in all > cases. I had the same thought at first. > But perhaps that doesn't work for IOMMU. I have a vague memory of > running across something like this before and IOMMU has this quirk of > defining struct iommu_ops as empty if IOMMU_API is deselected so you'll > probably get compiler errors unless you actually preprocess the code > out. Exactly. 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/