From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 2/13] ATA ACPI: debugging infrastructure Date: Wed, 1 Mar 2006 02:45:59 -0800 Message-ID: <20060301024559.2f36ecda.akpm@osdl.org> References: <20060222133241.595a8509.randy_d_dunlap@linux.intel.com> <20060222135133.3f80fbf9.randy_d_dunlap@linux.intel.com> <20060228114500.GA4057@elf.ucw.cz> <44043B4E.30907@pobox.com> <20060228041817.6fc444d2.akpm@osdl.org> <4405778D.2030001@superbug.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4405778D.2030001@superbug.co.uk> Sender: linux-kernel-owner@vger.kernel.org To: James Courtier-Dutton Cc: jgarzik@pobox.com, pavel@ucw.cz, randy_d_dunlap@linux.intel.com, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org List-Id: linux-ide@vger.kernel.org James Courtier-Dutton wrote: > > Is there a particular debugging coding style that we should adopt for > all the kernel code. Err, probably. But we'd need to have a 1000-email argument first. Right now many subsystems and often many individual drivers go and implement their own set of debugging macros and knobs to twiddle. This was a great source of fun for me in trying to support gcc-2.95.x - each time a new debug macro got implemented I had to go in there (again) and apply the gcc-2.95.x-macro-expansion-bug-workaround to it. Yes, one common toolset with a common way of controlling it would be much more sensible than the present chaos. I count 163 separate definitions of dprintk(), and that's excluding all the non-x86 arch and include dirs. > For example, > kconfig option in order to compile a module/section of core code for > debug work. > A sysfs file to then control the debug level for each module. > A debug module option, in the cases where a particular level of debug is > required at module load time, and before the sysfs entry exists. > If particularly fine grained debug control is needed, the module could > have multiple entries in the sysfs to control different classes of debug > output. > Something like that.. Just don't cc me while you work it out ;)