diff mbox

[2/9] KVM: arm: Do not indent the arguments of DECLARE_BITMAP

Message ID 1444940195-28272-3-git-send-email-mmarek@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Marek Oct. 15, 2015, 8:16 p.m. UTC
Besides being a coding style issue, it confuses make tags:

ctags: Warning: include/kvm/arm_vgic.h:307: null expansion of name pattern "\1"
ctags: Warning: include/kvm/arm_vgic.h:308: null expansion of name pattern "\1"
ctags: Warning: include/kvm/arm_vgic.h:309: null expansion of name pattern "\1"
ctags: Warning: include/kvm/arm_vgic.h:317: null expansion of name pattern "\1"

Cc: kvmarm@lists.cs.columbia.edu
Signed-off-by: Michal Marek <mmarek@suse.com>
---
 include/kvm/arm_vgic.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Christoffer Dall Oct. 18, 2015, 8:34 p.m. UTC | #1
On Thu, Oct 15, 2015 at 10:16:28PM +0200, Michal Marek wrote:
> Besides being a coding style issue, it confuses make tags:
> 
> ctags: Warning: include/kvm/arm_vgic.h:307: null expansion of name pattern "\1"
> ctags: Warning: include/kvm/arm_vgic.h:308: null expansion of name pattern "\1"
> ctags: Warning: include/kvm/arm_vgic.h:309: null expansion of name pattern "\1"
> ctags: Warning: include/kvm/arm_vgic.h:317: null expansion of name pattern "\1"
> 
> Cc: kvmarm@lists.cs.columbia.edu
> Signed-off-by: Michal Marek <mmarek@suse.com>
> ---

Is not being able to deal with a whitespace not a make tags problem?

As for coding style, do we really entertain these kinds of changes just
to adhere to a coding style?  It feels unnecessary taints the log etc.

However, I'm curious what the general concesus and previous practice for
this sort of thing is?

Thanks,
-Christoffer

>  include/kvm/arm_vgic.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
> index d901f1a47be6..58c5c0eb8d2d 100644
> --- a/include/kvm/arm_vgic.h
> +++ b/include/kvm/arm_vgic.h
> @@ -304,9 +304,9 @@ struct vgic_cpu {
>  	u8		*vgic_irq_lr_map;
>  
>  	/* Pending/active/both interrupts on this VCPU */
> -	DECLARE_BITMAP(	pending_percpu, VGIC_NR_PRIVATE_IRQS);
> -	DECLARE_BITMAP(	active_percpu, VGIC_NR_PRIVATE_IRQS);
> -	DECLARE_BITMAP(	pend_act_percpu, VGIC_NR_PRIVATE_IRQS);
> +	DECLARE_BITMAP(pending_percpu, VGIC_NR_PRIVATE_IRQS);
> +	DECLARE_BITMAP(active_percpu, VGIC_NR_PRIVATE_IRQS);
> +	DECLARE_BITMAP(pend_act_percpu, VGIC_NR_PRIVATE_IRQS);
>  
>  	/* Pending/active/both shared interrupts, dynamically sized */
>  	unsigned long	*pending_shared;
> @@ -314,7 +314,7 @@ struct vgic_cpu {
>  	unsigned long   *pend_act_shared;
>  
>  	/* Bitmap of used/free list registers */
> -	DECLARE_BITMAP(	lr_used, VGIC_V2_MAX_LRS);
> +	DECLARE_BITMAP(lr_used, VGIC_V2_MAX_LRS);
>  
>  	/* Number of list registers on this CPU */
>  	int		nr_lr;
> -- 
> 2.1.4
> 
> _______________________________________________
> kvmarm mailing list
> kvmarm@lists.cs.columbia.edu
> https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Marek Oct. 19, 2015, 11:55 a.m. UTC | #2
On 2015-10-18 22:34, Christoffer Dall wrote:
> On Thu, Oct 15, 2015 at 10:16:28PM +0200, Michal Marek wrote:
>> Besides being a coding style issue, it confuses make tags:
>>
>> ctags: Warning: include/kvm/arm_vgic.h:307: null expansion of name pattern "\1"
>> ctags: Warning: include/kvm/arm_vgic.h:308: null expansion of name pattern "\1"
>> ctags: Warning: include/kvm/arm_vgic.h:309: null expansion of name pattern "\1"
>> ctags: Warning: include/kvm/arm_vgic.h:317: null expansion of name pattern "\1"
>>
>> Cc: kvmarm@lists.cs.columbia.edu
>> Signed-off-by: Michal Marek <mmarek@suse.com>
>> ---
> 
> Is not being able to deal with a whitespace not a make tags problem?

Yes, but the regular expressions are hardly readable already :-(.


> As for coding style, do we really entertain these kinds of changes just
> to adhere to a coding style?  It feels unnecessary taints the log etc.

I wouldn't have submitted this just for the sake of coding style, it was
the ctags warning prompted me to do so.


> However, I'm curious what the general concesus and previous practice for
> this sort of thing is?

This KVM header was the only instance where whitespace confused the
patterns, so I'd say it's established practice not to do this. The other
ctags warnings were about multi-line macro invocations, where the
line-oriented regular expression rules cannot work.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christoffer Dall Oct. 19, 2015, 12:05 p.m. UTC | #3
On Mon, Oct 19, 2015 at 01:55:24PM +0200, Michal Marek wrote:
> On 2015-10-18 22:34, Christoffer Dall wrote:
> > On Thu, Oct 15, 2015 at 10:16:28PM +0200, Michal Marek wrote:
> >> Besides being a coding style issue, it confuses make tags:
> >>
> >> ctags: Warning: include/kvm/arm_vgic.h:307: null expansion of name pattern "\1"
> >> ctags: Warning: include/kvm/arm_vgic.h:308: null expansion of name pattern "\1"
> >> ctags: Warning: include/kvm/arm_vgic.h:309: null expansion of name pattern "\1"
> >> ctags: Warning: include/kvm/arm_vgic.h:317: null expansion of name pattern "\1"
> >>
> >> Cc: kvmarm@lists.cs.columbia.edu
> >> Signed-off-by: Michal Marek <mmarek@suse.com>
> >> ---
> > 
> > Is not being able to deal with a whitespace not a make tags problem?
> 
> Yes, but the regular expressions are hardly readable already :-(.
> 
> 
> > As for coding style, do we really entertain these kinds of changes just
> > to adhere to a coding style?  It feels unnecessary taints the log etc.
> 
> I wouldn't have submitted this just for the sake of coding style, it was
> the ctags warning prompted me to do so.
> 
> 
> > However, I'm curious what the general concesus and previous practice for
> > this sort of thing is?
> 
> This KVM header was the only instance where whitespace confused the
> patterns, so I'd say it's established practice not to do this. The other
> ctags warnings were about multi-line macro invocations, where the
> line-oriented regular expression rules cannot work.
> 

ok, I've taken the patch.

-Christoffer
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Marek Oct. 19, 2015, 12:07 p.m. UTC | #4
On 2015-10-19 14:05, Christoffer Dall wrote:
> ok, I've taken the patch.

Thank you! I will remove it from my series.

Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index d901f1a47be6..58c5c0eb8d2d 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -304,9 +304,9 @@  struct vgic_cpu {
 	u8		*vgic_irq_lr_map;
 
 	/* Pending/active/both interrupts on this VCPU */
-	DECLARE_BITMAP(	pending_percpu, VGIC_NR_PRIVATE_IRQS);
-	DECLARE_BITMAP(	active_percpu, VGIC_NR_PRIVATE_IRQS);
-	DECLARE_BITMAP(	pend_act_percpu, VGIC_NR_PRIVATE_IRQS);
+	DECLARE_BITMAP(pending_percpu, VGIC_NR_PRIVATE_IRQS);
+	DECLARE_BITMAP(active_percpu, VGIC_NR_PRIVATE_IRQS);
+	DECLARE_BITMAP(pend_act_percpu, VGIC_NR_PRIVATE_IRQS);
 
 	/* Pending/active/both shared interrupts, dynamically sized */
 	unsigned long	*pending_shared;
@@ -314,7 +314,7 @@  struct vgic_cpu {
 	unsigned long   *pend_act_shared;
 
 	/* Bitmap of used/free list registers */
-	DECLARE_BITMAP(	lr_used, VGIC_V2_MAX_LRS);
+	DECLARE_BITMAP(lr_used, VGIC_V2_MAX_LRS);
 
 	/* Number of list registers on this CPU */
 	int		nr_lr;