Author: marek Date: 2010-05-01 20:40:25 +0200 (Sat, 01 May 2010) New Revision: 1642
Modified: trunk/batman-adv-kernelland/bitarray.c trunk/batman-adv-kernelland/main.h trunk/batman-adv-kernelland/originator.c trunk/batman-adv-kernelland/vis.c Log: batman-adv: Fix whitespace problems criticized by checkpatch.pl
Trailing spaces at the end of a line or before a tab are against Documentation/CodingStyle "3.1: Spaces" and should be avoided. It is also common style to add a single space after commas unless it is followed either by a newline or a tab.
Reported-by: Mikal Sande mikal.sande@gmail.com Reported-by: Luis de Bethencourt luisbg@ubuntu.com Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
Modified: trunk/batman-adv-kernelland/bitarray.c =================================================================== --- trunk/batman-adv-kernelland/bitarray.c 2010-04-28 22:47:18 UTC (rev 1641) +++ trunk/batman-adv-kernelland/bitarray.c 2010-05-01 18:40:25 UTC (rev 1642) @@ -150,7 +150,7 @@
/* 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",
Modified: trunk/batman-adv-kernelland/main.h =================================================================== --- trunk/batman-adv-kernelland/main.h 2010-04-28 22:47:18 UTC (rev 1641) +++ trunk/batman-adv-kernelland/main.h 2010-05-01 18:40:25 UTC (rev 1642) @@ -77,7 +77,7 @@ #define MODULE_DEACTIVATING 2
#define BCAST_QUEUE_LEN 256 -#define BATMAN_QUEUE_LEN 256 +#define BATMAN_QUEUE_LEN 256
/* * Debug Messages
Modified: trunk/batman-adv-kernelland/originator.c =================================================================== --- trunk/batman-adv-kernelland/originator.c 2010-04-28 22:47:18 UTC (rev 1641) +++ trunk/batman-adv-kernelland/originator.c 2010-05-01 18:40:25 UTC (rev 1642) @@ -309,7 +309,7 @@
rcu_read_lock(); hdr_len = sprintf(buff, - " %-14s (%s/%i) %17s [%10s]: %20s ... [B.A.T.M.A.N. adv %s%s, MainIF/MAC: %s/%s (%s)] \n", + " %-14s (%s/%i) %17s [%10s]: %20s ... [B.A.T.M.A.N. adv %s%s, MainIF/MAC: %s/%s (%s)]\n", "Originator", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", "Potential nexthops", SOURCE_VERSION, REVISION_VERSION_STR, bat_priv->primary_if->dev, bat_priv->primary_if->addr_str, @@ -366,7 +366,7 @@
if ((batman_count == 0) && (off == 0)) bytes_written += sprintf(buff + bytes_written, - "No batman nodes in range ... \n"); + "No batman nodes in range ...\n");
return bytes_written; }
Modified: trunk/batman-adv-kernelland/vis.c =================================================================== --- trunk/batman-adv-kernelland/vis.c 2010-04-28 22:47:18 UTC (rev 1641) +++ trunk/batman-adv-kernelland/vis.c 2010-05-01 18:40:25 UTC (rev 1642) @@ -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);