From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: is_initial_xendomain() Date: Fri, 18 Aug 2006 09:12:00 +0200 Message-ID: <44E58460.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Seeing many cases of uses like #ifdef CONFIG_XEN_PRIVILEGED_GUEST if (is_initial_xendomain()) { ... } #endif I'm wondering if it wasn't nice to eliminate the preprocessor conditionals (which appear to be there only to cut down on code size) by doing the conditional in a single place instead: #ifdef CONFIG_XEN_PRIVILEGED_GUEST #define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN) #else #define is_initial_xendomain() 0 #endif If that is acceptable, I'm ready to create a respective patch (but I'd like to avoid spending time on it if there are objections). Jan