From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752436Ab2BZBre (ORCPT ); Sat, 25 Feb 2012 20:47:34 -0500 Received: from terminus.zytor.com ([198.137.202.10]:39256 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751947Ab2BZBrc (ORCPT ); Sat, 25 Feb 2012 20:47:32 -0500 Message-ID: <4F498EFF.6040309@zytor.com> Date: Sat, 25 Feb 2012 17:46:39 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: Linus Torvalds CC: Andreas Schwab , Ian Kent , David Miller , linux-kernel@vger.kernel.org, autofs@vger.kernel.org, Thomas Meyer , Al Viro Subject: Re: [PATCH] autofs4: fix compilation without CONFIG_COMPAT References: <20120221.221609.218135609185671883.davem@davemloft.net> <1329889428.2193.45.camel@perseus.themaw.net> <1329890027.2193.48.camel@perseus.themaw.net> <1329890251.2193.50.camel@perseus.themaw.net> In-Reply-To: X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/25/2012 05:31 PM, Linus Torvalds wrote: > On Sat, Feb 25, 2012 at 2:10 PM, Andreas Schwab wrote: >> The compat_daemon stuff is only needed on x86-64, and is_compat_task is >> only defined with CONFIG_COMPAT, so disable it for all other >> configurations. > > Ugh, I hate the proliferation of #ifdefs in code when they aren't > really necessary. > > How about this patch instead? It's small, simple, and clean. Maybe it > would even allow a few other #ifdef's to be removed (I see one in > kernel/seccomp.c, for example, although I suspect that > 'mode1_syscalls_32' might also be a compat-only thing, so who knows) > > And if you worry about the size of autofs_sb_info, I think that could > be made denser by using 'char' or bitfields instead of the various > ints that hold small values or flags instead. > I think this patch could help clean up other places, too. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.