Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753745AbbHMUNm (ORCPT ); Thu, 13 Aug 2015 16:13:42 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:50656 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752183AbbHMUNk (ORCPT ); Thu, 13 Aug 2015 16:13:40 -0400 Date: Thu, 13 Aug 2015 14:13:35 -0600 From: Jason Gunthorpe To: =?iso-8859-1?B?Suly9G1l?= Glisse Cc: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Christophe Harle , Duncan Poole , Sherry Cheung , Subhash Gutti , John Hubbard , Mark Hairgrove , Lucien Dunning , Cameron Buschardt , Arvind Gopalakrishnan , Haggai Eran , Shachar Raindel , Liran Liss Subject: Re: [RFC PATCH 4/8 v2] IB/odp/hmm: prepare for HMM code path. Message-ID: <20150813201335.GA22581@obsidianresearch.com> References: <1439493653-1191-1-git-send-email-jglisse@redhat.com> <1439493653-1191-5-git-send-email-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1439493653-1191-5-git-send-email-jglisse@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.192 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 909 Lines: 32 On Thu, Aug 13, 2015 at 03:20:49PM -0400, J?r?me Glisse wrote: > +#if IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING_HMM) > +#else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING_HMM */ Yuk, what is wrong with #if !IS_ENABLED(...) ? > -#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING > +#if IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING) > +#if IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING_HMM) > +#else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING_HMM */ Double yuk #if !(IS_ENABLED(..) && IS_ENABLED(..)) ? And the #ifdefs suck, as many as possible should be normal if statements, and one should think carefully if we really need to remove fields from structures.. Jason -- 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/