Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753556AbbETOTO (ORCPT ); Wed, 20 May 2015 10:19:14 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:35673 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752331AbbETOTM (ORCPT ); Wed, 20 May 2015 10:19:12 -0400 MIME-Version: 1.0 In-Reply-To: <8810674.KfveOO5Unf@wuerfel> References: <555BD66A.5020704@nvidia.com> <1432102224-15169-1-git-send-email-acourbot@nvidia.com> <20150520113231.GA21937@ulmo.nvidia.com> <8810674.KfveOO5Unf@wuerfel> From: Alexandre Courbot Date: Wed, 20 May 2015 23:18:51 +0900 Message-ID: Subject: Re: [PATCH] drm/nouveau/platform: fix compilation if !CONFIG_IOMMU To: Arnd Bergmann Cc: "linux-arm-kernel@lists.infradead.org" , Thierry Reding , Alexandre Courbot , David Airlie , Linux Kernel Mailing List , "dri-devel@lists.freedesktop.org" , Ben Skeggs Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 987 Lines: 24 On Wed, May 20, 2015 at 9:01 PM, Arnd Bergmann wrote: > 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. That's precisely the issue here, so not covering this code is exactly what we want if !CONFIG_IOMMU. -- 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/