From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH 1/6] KVM: In kernel pit model Date: Wed, 5 Mar 2008 13:24:31 +0100 Message-ID: <20080305122431.GA1296@elte.hu> References: <200803041822.44757.sheng.yang@intel.com> <200803051504.40409.sheng.yang@intel.com> <20080305091529.GA25357@elte.hu> <200803051935.40229.sheng.yang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Avi Kivity To: "Yang, Sheng" Return-path: Content-Disposition: inline In-Reply-To: <200803051935.40229.sheng.yang@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org * Yang, Sheng wrote: > > * Yang, Sheng wrote: > > > +#if 1 > > > +#define pit_debug(fmt, arg...) printk(KERN_WARNING fmt, ##arg) > > > +#else > > > +#define pit_debug(fmt, arg...) > > > +#endif > > > > this should use pr_debug() instead i guess. > > Um... I followed example on ./virt/kvm/ioapic.c here. Though I think > it's good to substitute all self defined debug printk with pr_debug, > why KVM have little pr_xxx(the only ones are in x86.c)? Maybe for KVM > is acting more like a separate driver, and using printk is easier for > separate debug? I really don't know... it's just a small detail - it's really not a big issue and my suggestion should be functionally equivalent. What i meant is that with pr_debug() you can remove the pit_debug() define altogether (and change all pit_debug's to pr_debug). In that case all you need to do is to get the printks is to stick this to the head of the source code file (to before the include files): #define DEBUG and the pr_debug() calls turn from a NOP into a printk(KERN_DEBUG,...). Ingo ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/