Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754082AbXJ1KoH (ORCPT ); Sun, 28 Oct 2007 06:44:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751247AbXJ1Knx (ORCPT ); Sun, 28 Oct 2007 06:43:53 -0400 Received: from sovereign.computergmbh.de ([85.214.69.204]:45948 "EHLO sovereign.computergmbh.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751001AbXJ1Knv (ORCPT ); Sun, 28 Oct 2007 06:43:51 -0400 Date: Sun, 28 Oct 2007 11:43:50 +0100 (CET) From: Jan Engelhardt To: Russell King cc: Joe Perches , Alexey Dobriyan , akpm@osdl.org, torvalds@osdl.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH] proc_fs.h redux In-Reply-To: <20071028103415.GA12554@flint.arm.linux.org.uk> Message-ID: References: <20071027194758.GD9816@martell.zuzino.mipt.ru> <1193524804.26695.103.camel@localhost> <20071028103415.GA12554@flint.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 946 Lines: 26 On Oct 28 2007 10:34, Russell King wrote: >On Sat, Oct 27, 2007 at 03:40:04PM -0700, Joe Perches wrote: >> and forward declarations of >> >> struct proc_dir_entry; >> struct file_operations; >> >> As a general rule, I think it better to use includes >> than use naked forward declarations. > >If you go down that route, you end up with _lots_ of circular >dependencies - header file X needs Y needs Z which needs X. We've >been there, several times. It very quickly becomes quite >unmaintainable - you end up with hard to predict behaviour from >include files. > >The only realistic solution is to use forward declarations. Especially because it reduces the amount of I/O that needs to be done. - 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/