diff mbox

Staging: batman-adv: send.c: Checkpatch cleanup

Message ID 1272721576-9372-1-git-send-email-sven.eckelmann@gmx.de
State Not Applicable, archived
Headers show

Commit Message

Sven Eckelmann May 1, 2010, 1:46 p.m. UTC
From: Andrea Gelmini <andrea.gelmini@gelma.net>

drivers/staging/batman-adv/send.c:137: CHECK: multiple assignments should be avoided

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/batman-adv/send.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Andrew Lunn May 1, 2010, 2:12 p.m. UTC | #1
On Sat, May 01, 2010 at 03:46:16PM +0200, Sven Eckelmann wrote:
> From: Andrea Gelmini <andrea.gelmini@gelma.net>
> 
> drivers/staging/batman-adv/send.c:137: CHECK: multiple assignments should be avoided
> 
> Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> ---
>  drivers/staging/batman-adv/send.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c
> index 2a9fac8..ff7b1f1 100644
> --- a/drivers/staging/batman-adv/send.c
> +++ b/drivers/staging/batman-adv/send.c
> @@ -134,7 +134,8 @@ static void send_packet_to_if(struct forw_packet *forw_packet,
>  	if (batman_if->if_active != IF_ACTIVE)
>  		return;
>  
> -	packet_num = buff_pos = 0;
> +	packet_num = 0;
> +	buff_pos = 0;
>  	batman_packet = (struct batman_packet *)
>  		(forw_packet->packet_buff);
>  
> -- 

I was too lazy to go searching upstream. We can just import this patch
and use your three checkpatch patches.

    Andrew
diff mbox

Patch

diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c
index 2a9fac8..ff7b1f1 100644
--- a/drivers/staging/batman-adv/send.c
+++ b/drivers/staging/batman-adv/send.c
@@ -134,7 +134,8 @@  static void send_packet_to_if(struct forw_packet *forw_packet,
 	if (batman_if->if_active != IF_ACTIVE)
 		return;
 
-	packet_num = buff_pos = 0;
+	packet_num = 0;
+	buff_pos = 0;
 	batman_packet = (struct batman_packet *)
 		(forw_packet->packet_buff);