[07/10] staging:batman-adv:Updating orig_str for debug

Message ID 1260389373-1071-8-git-send-email-andrew@lunn.ch (mailing list archive)
State Accepted, archived
Commit 8038183add3d635bd10dc9ba7091e84e9ed9ac31
Headers

Commit Message

Andrew Lunn Dec. 9, 2009, 8:09 p.m. UTC
  From: marek <marek@45894c77-fb22-0410-b583-ff6e7d5dbf6c>

In commit 1488 the orig_str has been removed from
purge_orig_neighbours(). Apparently, this breaks compilation when
enabling debug-flags, as bat_dbg() is expecting this variable as a
parameter. Actually, this variable has never been initialised also
before commit 1488 (which was probably the reason for mistakenly
removing it).
This tiny patch adds the orig_str again, but initialises it now as
well.

Signed-off-by: Linus Luessing <linus.luessing@web.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
git-svn-id: http://downloads.open-mesh.net/svn/batman/trunk/batman-adv-kernelland@1490 45894c77-fb22-0410-b583-ff6e7d5dbf6c
---
 originator.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
  

Comments

Greg KH Dec. 9, 2009, 8:23 p.m. UTC | #1
On Wed, Dec 09, 2009 at 09:09:31PM +0100, Andrew Lunn wrote:
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

First off, much better on sending the patches, that worked fine.

> ---
>  drivers/staging/batman-adv/Kconfig |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/batman-adv/Kconfig b/drivers/staging/batman-adv/Kconfig
> index b9742e7..698eb31 100644
> --- a/drivers/staging/batman-adv/Kconfig
> +++ b/drivers/staging/batman-adv/Kconfig

But it seems that only this one, and one other (10/10) are able to be
applied to the kernel tree, as they properly have the files in the
correct location.

What were the other patches against?  A local repo somewhere that did
not have the batman-adv code in drivers/staging/batman-adv?

confused,

greg k-h
  

Patch

diff --git a/originator.c b/originator.c
index d0640a7..9962af7 100644
--- a/originator.c
+++ b/originator.c
@@ -163,7 +163,7 @@  static bool purge_orig_neigbours(struct orig_node *orig_node,
 				 struct neigh_node **best_neigh_node)
 {
 	struct list_head *list_pos, *list_pos_tmp;
-	char neigh_str[ETH_STR_LEN];
+	char neigh_str[ETH_STR_LEN], orig_str[ETH_STR_LEN];
 	struct neigh_node *neigh_node;
 	bool neigh_purged = false;
 
@@ -179,6 +179,7 @@  static bool purge_orig_neigbours(struct orig_node *orig_node,
 				((PURGE_TIMEOUT * HZ) / 1000)))) {
 
 			addr_to_string(neigh_str, neigh_node->addr);
+			addr_to_string(orig_str, orig_node->orig);
 			bat_dbg(DBG_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ));
 
 			neigh_purged = true;