diff mbox

[3/4] batman-adv: whitespace fixes from mainline.

Message ID 1272719410-406-4-git-send-email-andrew@lunn.ch
State Superseded, archived
Headers show

Commit Message

Andrew Lunn May 1, 2010, 1:10 p.m. UTC
The mainline driver has some whitespace patches which are not in
maint. This patch brings imports them.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 bitarray.c |    2 +-
 main.h     |    4 ++--
 routing.c  |    3 ++-
 send.c     |    3 ++-
 vis.c      |    6 +++---
 5 files changed, 10 insertions(+), 8 deletions(-)

Comments

Sven Eckelmann May 1, 2010, 1:33 p.m. UTC | #1
Andrew Lunn wrote:
> The mainline driver has some whitespace patches which are not in
> maint. This patch brings imports them.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

Please be aware that this one conflicts heavily with 
 * [PATCH-maint 1/2] batman-adv: Fix whitespace problems criticized by checkpatch.pl
 * [PATCH-maint 2/2v2] batman-adv: Reduce max characters on a line to 80

Only following part seems to be new:

> diff --git a/send.c b/send.c
> index caec6ef..8413ddc 100644
> --- a/send.c
> +++ b/send.c
> @@ -128,7 +128,8 @@ static void send_packet_to_if(struct forw_packet
> *forw_packet, if (batman_if->if_status != IF_ACTIVE)
>  		return;
> 
> -	packet_num = buff_pos = 0;
> +	packet_num = 0;
> +	buff_pos = 0;
>  	batman_packet = (struct batman_packet *)
>  		(forw_packet->packet_buff);
> 

Best regards,
	Sven
Andrew Lunn May 1, 2010, 2:10 p.m. UTC | #2
On Sat, May 01, 2010 at 03:33:39PM +0200, Sven Eckelmann wrote:
> Andrew Lunn wrote:
> > The mainline driver has some whitespace patches which are not in
> > maint. This patch brings imports them.
> > 
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> 
> Please be aware that this one conflicts heavily with 
>  * [PATCH-maint 1/2] batman-adv: Fix whitespace problems criticized by checkpatch.pl
>  * [PATCH-maint 2/2v2] batman-adv: Reduce max characters on a line to 80

Yes. I was expecting that. It would be nice if your three patches got
into maint sooner rather than later. I guess it is a superset of these
fixes, plus other fixes.

I'm happy to wait for your patches.

    Andrew
diff mbox

Patch

diff --git a/bitarray.c b/bitarray.c
index 437cff8..2fef6e3 100644
--- a/bitarray.c
+++ b/bitarray.c
@@ -150,7 +150,7 @@  char bit_get_packet(TYPE_OF_WORD *seq_bits, int16_t seq_num_diff,
 
 	/* sequence number is much newer, probably missed a lot of packets */
 
-	if ((seq_num_diff >= TQ_LOCAL_WINDOW_SIZE) 
+	if ((seq_num_diff >= TQ_LOCAL_WINDOW_SIZE)
 		|| (seq_num_diff < EXPECTED_SEQNO_RANGE)) {
 		bat_dbg(DBG_BATMAN,
 			"We missed a lot of packets (%i) !\n",
diff --git a/main.h b/main.h
index 2ce3b45..55e2214 100644
--- a/main.h
+++ b/main.h
@@ -69,8 +69,8 @@ 
 #define MODULE_ACTIVE 1
 #define MODULE_DEACTIVATING 2
 
-#define BCAST_QUEUE_LEN		256
-#define BATMAN_QUEUE_LEN 	256
+#define BCAST_QUEUE_LEN 256
+#define BATMAN_QUEUE_LE	256
 
 /*
  * Debug Messages
diff --git a/routing.c b/routing.c
index 0ab8f89..cd2b4d6 100644
--- a/routing.c
+++ b/routing.c
@@ -875,7 +875,8 @@  int recv_unicast_packet(struct sk_buff *skb)
 
 	/* TTL exceeded */
 	if (unicast_packet->ttl < 2) {
-		printk(KERN_WARNING "batman-adv:Warning - can't forward unicast packet from %pM to %pM: ttl exceeded\n", ethhdr->h_source, unicast_packet->dest);
+		printk(KERN_WARNING "batman-adv:Warning - can't forward unicast packet from %pM to %pM: ttl exceeded\n",
+		       ethhdr->h_source, unicast_packet->dest);
 		return NET_RX_DROP;
 	}
 
diff --git a/send.c b/send.c
index caec6ef..8413ddc 100644
--- a/send.c
+++ b/send.c
@@ -128,7 +128,8 @@  static void send_packet_to_if(struct forw_packet *forw_packet,
 	if (batman_if->if_status != IF_ACTIVE)
 		return;
 
-	packet_num = buff_pos = 0;
+	packet_num = 0;
+	buff_pos = 0;
 	batman_packet = (struct batman_packet *)
 		(forw_packet->packet_buff);
 
diff --git a/vis.c b/vis.c
index bac1401..ff511ca 100644
--- a/vis.c
+++ b/vis.c
@@ -40,9 +40,9 @@ 
     * before adding more than 127 to the starting value - it is a predecessor,
     * when adding 128 - it is neither a predecessor nor a successor,
     * after adding more than 127 to the starting value - it is a successor */
-#define seq_before(x,y) ({typeof(x) _dummy = (x - y); \
-                         _dummy > smallest_signed_int(_dummy); })
-#define seq_after(x,y) seq_before(y,x)
+#define seq_before(x, y) ({typeof(x) _dummy = (x - y); \
+			  _dummy > smallest_signed_int(_dummy); })
+#define seq_after(x, y) seq_before(y, x)
 
 struct hashtable_t *vis_hash;
 DEFINE_SPINLOCK(vis_hash_lock);