diff mbox

VT-d: drop pointless uses of __func__

Message ID 57BEAFFC0200007800108D8C@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich Aug. 25, 2016, 6:44 a.m. UTC
>>> On 25.08.16 at 03:08, <feng.wu@intel.com> wrote:
>> From: Jan Beulich [mailto:JBeulich@suse.com]
>> Subject: [PATCH] VT-d: drop pointless uses of __func__
>> --- 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
>> 
>>          dom_index = context_domain_id(*context);
>> 
>> -        if ( dom_index < nr_dom && iommu->domid_map)
>> +        if ( dom_index < nr_dom && iommu->domid_map )
>>              domid = 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",
> 
> This line exceeds the 80 characters limitation, do we have better way to 
> handle this?

Indeed; I had noticed this too (after sending) and intend to break
it like this:


Jan

Comments

Wu, Feng Aug. 25, 2016, 7:52 a.m. UTC | #1
> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Thursday, August 25, 2016 2:45 PM
> To: Wu, Feng <feng.wu@intel.com>
> Cc: Tian, Kevin <kevin.tian@intel.com>; xen-devel <xen-
> devel@lists.xenproject.org>
> Subject: RE: [PATCH] VT-d: drop pointless uses of __func__
> 
> >>> On 25.08.16 at 03:08, <feng.wu@intel.com> wrote:
> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> Subject: [PATCH] VT-d: drop pointless uses of __func__
> >> --- 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
> >>
> >>          dom_index = context_domain_id(*context);
> >>
> >> -        if ( dom_index < nr_dom && iommu->domid_map)
> >> +        if ( dom_index < nr_dom && iommu->domid_map )
> >>              domid = 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",
> >
> > This line exceeds the 80 characters limitation, do we have better way to
> > handle this?
> 
> Indeed; I had noticed this too (after sending) and intend to break
> it like this:
> 
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -129,11 +129,12 @@ static int context_get_domain_id(struct
> 
>          dom_index = context_domain_id(*context);
> 
> -        if ( dom_index < nr_dom && iommu->domid_map)
> +        if ( dom_index < nr_dom && iommu->domid_map )
>              domid = 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);

Looks good to me.

Reviewed-by Feng Wu <feng.wu@intel.com>

Thanks,
Feng

>      }
>      return domid;
>  }
> 
> Jan
diff mbox

Patch

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -129,11 +129,12 @@  static int context_get_domain_id(struct
 
         dom_index = context_domain_id(*context);
 
-        if ( dom_index < nr_dom && iommu->domid_map)
+        if ( dom_index < nr_dom && iommu->domid_map )
             domid = 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;
 }