From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 2/4] x86: misc printk() adjustments Date: Mon, 21 Dec 2015 14:41:47 +0000 Message-ID: <56780FAB.4080307@citrix.com> References: <56781AAD02000078000C1EBA@prv-mh.provo.novell.com> <56781BFA02000078000C1ECD@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aB1es-00072b-S1 for xen-devel@lists.xenproject.org; Mon, 21 Dec 2015 14:41:54 +0000 In-Reply-To: <56781BFA02000078000C1ECD@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org On 21/12/15 14:34, Jan Beulich wrote: > --- a/xen/arch/x86/io_apic.c > +++ b/xen/arch/x86/io_apic.c > @@ -2310,13 +2310,14 @@ int ioapic_guest_read(unsigned long phys > return 0; > } > > -#define WARN_BOGUS_WRITE(f, a...) \ > - dprintk(XENLOG_INFO, "\n%s: " \ > - "apic=%d, pin=%d, irq=%d\n" \ > - "%s: new_entry=%08x\n" \ > - "%s: " f, __FUNCTION__, apic, pin, irq, \ > - __FUNCTION__, *(u32 *)&rte, \ > - __FUNCTION__ , ##a ) > +#define WARN_BOGUS_WRITE(f, a...) \ > + dprintk(XENLOG_INFO, "\n" \ > + XENLOG_INFO "%s: apic=%d, pin=%d, irq=%d\n" \ > + XENLOG_INFO "%s: new_entry=%08x\n" \ > + XENLOG_INFO "%s: " f "\n", \ > + __func__, apic, pin, irq, \ > + __func__, *(u32 *)&rte, \ > + __func__, ##a ) > > int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val) > { > @@ -2388,7 +2389,7 @@ int ioapic_guest_write(unsigned long phy > rte.vector = desc->arch.vector; > if ( *(u32*)&rte != ret ) > WARN_BOGUS_WRITE("old_entry=%08x pirq=%d\n%s: " > - "Attempt to modify IO-APIC pin for in-use IRQ!\n", > + "Attempt to modify IO-APIC pin for in-use IRQ!", > ret, pirq, __FUNCTION__); Given that this is the sole user of WARN_BOGUS_WRITE(), I would recommend folding it all together in a simple dprintk(), and remove some of the redundant information, and fixing the resulting message to take up fewer lines. ~Andrew