From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] VT-d: drop pointless uses of __func__ Date: Wed, 24 Aug 2016 01:54:08 -0600 Message-ID: <57BD6EC00200007800108794@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part605687B0.1__=" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcT0l-00071Y-Tb for xen-devel@lists.xenproject.org; Wed, 24 Aug 2016 07:54:12 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel Cc: Kevin Tian , Feng Wu List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part605687B0.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Debugging message text already includes file name and line number, so also logging function names is redundant. Signed-off-by: Jan Beulich --- a/xen/drivers/passthrough/vtd/intremap.c +++ b/xen/drivers/passthrough/vtd/intremap.c @@ -242,8 +242,8 @@ static int remap_entry_to_ioapic_rte( if ( index < 0 || index > IREMAP_ENTRY_NR - 1 ) { dprintk(XENLOG_ERR VTDPREFIX, - "%s: index (%d) for remap table is invalid !\n", - __func__, index); + "IO-APIC index (%d) for remap table is invalid\n", + index); return -EFAULT; } =20 @@ -255,8 +255,8 @@ static int remap_entry_to_ioapic_rte( if ( iremap_entry->val =3D=3D 0 ) { dprintk(XENLOG_ERR VTDPREFIX, - "%s: index (%d) get an empty entry!\n", - __func__, index); + "IO-APIC index (%d) has an empty entry\n", + index); unmap_vtd_domain_page(iremap_entries); spin_unlock_irqrestore(&ir_ctrl->iremap_lock, flags); return -EFAULT; @@ -301,9 +301,8 @@ static int ioapic_rte_to_remap_entry(str if ( index > IREMAP_ENTRY_NR - 1 ) { dprintk(XENLOG_ERR VTDPREFIX, - "%s: intremap index (%d) is larger than" - " the maximum index (%d)!\n", - __func__, index, IREMAP_ENTRY_NR - 1); + "IO-APIC intremap index (%d) larger than maximum index = (%d)\n", + index, IREMAP_ENTRY_NR - 1); spin_unlock_irqrestore(&ir_ctrl->iremap_lock, flags); return -EFAULT; } @@ -500,8 +499,8 @@ static int remap_entry_to_msi_msg( if ( index >=3D IREMAP_ENTRY_NR ) { dprintk(XENLOG_ERR VTDPREFIX, - "%s: index (%d) for remap table is invalid !\n", - __func__, index); + "MSI index (%d) for remap table is invalid\n", + index); return -EFAULT; } =20 @@ -513,8 +512,8 @@ static int remap_entry_to_msi_msg( if ( iremap_entry->val =3D=3D 0 ) { dprintk(XENLOG_ERR VTDPREFIX, - "%s: index (%d) get an empty entry!\n", - __func__, index); + "MSI index (%d) has an empty entry\n", + index); unmap_vtd_domain_page(iremap_entries); spin_unlock_irqrestore(&ir_ctrl->iremap_lock, flags); return -EFAULT; @@ -585,9 +584,8 @@ static int msi_msg_to_remap_entry( if ( index > IREMAP_ENTRY_NR - 1 ) { dprintk(XENLOG_ERR VTDPREFIX, - "%s: intremap index (%d) is larger than" - " the maximum index (%d)!\n", - __func__, index, IREMAP_ENTRY_NR - 1); + "MSI intremap index (%d) larger than maximum index = (%d)!\n", + index, IREMAP_ENTRY_NR - 1); for ( i =3D 0; i < nr; ++i ) msi_desc[i].remap_index =3D -1; spin_unlock_irqrestore(&ir_ctrl->iremap_lock, flags); @@ -689,9 +687,8 @@ int __init intel_setup_hpet_msi(struct m if ( msi_desc->remap_index >=3D IREMAP_ENTRY_NR ) { dprintk(XENLOG_ERR VTDPREFIX, - "%s: intremap index (%d) is larger than" - " the maximum index (%d)!\n", - __func__, msi_desc->remap_index, IREMAP_ENTRY_NR - 1); + "HPET intremap index (%d) larger than maximum index = (%d)!\n", + msi_desc->remap_index, IREMAP_ENTRY_NR - 1); msi_desc->remap_index =3D -1; rc =3D -ENXIO; } --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -129,11 +129,11 @@ static int context_get_domain_id(struct =20 dom_index =3D context_domain_id(*context); =20 - if ( dom_index < nr_dom && iommu->domid_map) + if ( dom_index < nr_dom && iommu->domid_map ) domid =3D iommu->domid_map[dom_index]; else - dprintk(XENLOG_DEBUG VTDPREFIX, "%s: dom_index %lu exceeds = nr_dom %lu or iommu has no domid_map\n", - __func__, dom_index, nr_dom); + dprintk(XENLOG_DEBUG VTDPREFIX, "dom_index %lu exceeds nr_dom = %lu or iommu has no domid_map\n", + dom_index, nr_dom); } return domid; } --=__Part605687B0.1__= Content-Type: text/plain; name="VT-d-drop-__func__.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="VT-d-drop-__func__.patch" VT-d: drop pointless uses of __func__=0A=0ADebugging message text already = includes file name and line number, so=0Aalso logging function names is = redundant.=0A=0ASigned-off-by: Jan Beulich =0A=0A--- = a/xen/drivers/passthrough/vtd/intremap.c=0A+++ b/xen/drivers/passthrough/vt= d/intremap.c=0A@@ -242,8 +242,8 @@ static int remap_entry_to_ioapic_rte(=0A= if ( index < 0 || index > IREMAP_ENTRY_NR - 1 )=0A {=0A = dprintk(XENLOG_ERR VTDPREFIX,=0A- "%s: index (%d) for remap = table is invalid !\n",=0A- __func__, index);=0A+ = "IO-APIC index (%d) for remap table is invalid\n",=0A+ = index);=0A return -EFAULT;=0A }=0A =0A@@ -255,8 +255,8 @@ = static int remap_entry_to_ioapic_rte(=0A if ( iremap_entry->val =3D=3D = 0 )=0A {=0A dprintk(XENLOG_ERR VTDPREFIX,=0A- = "%s: index (%d) get an empty entry!\n",=0A- __func__, = index);=0A+ "IO-APIC index (%d) has an empty entry\n",=0A+ = index);=0A unmap_vtd_domain_page(iremap_entries);=0A = spin_unlock_irqrestore(&ir_ctrl->iremap_lock, flags);=0A = return -EFAULT;=0A@@ -301,9 +301,8 @@ static int ioapic_rte_to_remap_entry(= str=0A if ( index > IREMAP_ENTRY_NR - 1 )=0A {=0A = dprintk(XENLOG_ERR VTDPREFIX,=0A- "%s: intremap index (%d) = is larger than"=0A- " the maximum index (%d)!\n",=0A- = __func__, index, IREMAP_ENTRY_NR - 1);=0A+ = "IO-APIC intremap index (%d) larger than maximum index (%d)\n",=0A+ = index, IREMAP_ENTRY_NR - 1);=0A spin_unlock_irqrestore(&ir_= ctrl->iremap_lock, flags);=0A return -EFAULT;=0A }=0A@@ -500,8 = +499,8 @@ static int remap_entry_to_msi_msg(=0A if ( index >=3D = IREMAP_ENTRY_NR )=0A {=0A dprintk(XENLOG_ERR VTDPREFIX,=0A- = "%s: index (%d) for remap table is invalid !\n",=0A- = __func__, index);=0A+ "MSI index (%d) for remap table = is invalid\n",=0A+ index);=0A return -EFAULT;=0A = }=0A =0A@@ -513,8 +512,8 @@ static int remap_entry_to_msi_msg(=0A if = ( iremap_entry->val =3D=3D 0 )=0A {=0A dprintk(XENLOG_ERR = VTDPREFIX,=0A- "%s: index (%d) get an empty entry!\n",=0A- = __func__, index);=0A+ "MSI index (%d) has an = empty entry\n",=0A+ index);=0A unmap_vtd_domain_page= (iremap_entries);=0A spin_unlock_irqrestore(&ir_ctrl->iremap_lock, = flags);=0A return -EFAULT;=0A@@ -585,9 +584,8 @@ static int = msi_msg_to_remap_entry(=0A if ( index > IREMAP_ENTRY_NR - 1 )=0A = {=0A dprintk(XENLOG_ERR VTDPREFIX,=0A- "%s: = intremap index (%d) is larger than"=0A- " the maximum index = (%d)!\n",=0A- __func__, index, IREMAP_ENTRY_NR - 1);=0A+ = "MSI intremap index (%d) larger than maximum index (%d)!\n",=0A= + index, IREMAP_ENTRY_NR - 1);=0A for ( i =3D 0; i = < nr; ++i )=0A msi_desc[i].remap_index =3D -1;=0A = spin_unlock_irqrestore(&ir_ctrl->iremap_lock, flags);=0A@@ -689,9 +687,8 = @@ int __init intel_setup_hpet_msi(struct m=0A if ( msi_desc->remap_ind= ex >=3D IREMAP_ENTRY_NR )=0A {=0A dprintk(XENLOG_ERR VTDPREFIX,= =0A- "%s: intremap index (%d) is larger than"=0A- = " the maximum index (%d)!\n",=0A- __func__, msi_desc->r= emap_index, IREMAP_ENTRY_NR - 1);=0A+ "HPET intremap index = (%d) larger than maximum index (%d)!\n",=0A+ msi_desc->remap= _index, IREMAP_ENTRY_NR - 1);=0A msi_desc->remap_index =3D -1;=0A = rc =3D -ENXIO;=0A }=0A--- a/xen/drivers/passthrough/vtd/iommu.c= =0A+++ b/xen/drivers/passthrough/vtd/iommu.c=0A@@ -129,11 +129,11 @@ = static int context_get_domain_id(struct=0A =0A dom_index =3D = context_domain_id(*context);=0A =0A- if ( dom_index < nr_dom && = iommu->domid_map)=0A+ if ( dom_index < nr_dom && iommu->domid_map = )=0A domid =3D iommu->domid_map[dom_index];=0A = else=0A- dprintk(XENLOG_DEBUG VTDPREFIX, "%s: dom_index %lu = exceeds nr_dom %lu or iommu has no domid_map\n",=0A- = __func__, dom_index, nr_dom);=0A+ dprintk(XENLOG_DEBUG = VTDPREFIX, "dom_index %lu exceeds nr_dom %lu or iommu has no domid_map\n",= =0A+ dom_index, nr_dom);=0A }=0A return = domid;=0A }=0A --=__Part605687B0.1__= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --=__Part605687B0.1__=--