Skip to content

Commit

Permalink
batman-adv: rearrange batadv_neigh_node_new() arguments to follow con…
Browse files Browse the repository at this point in the history
…vention

Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
  • Loading branch information
Marek Lindner authored and Antonio Quartulli committed Aug 27, 2015
1 parent bd3524c commit 3f32f8a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ batadv_iv_ogm_neigh_new(struct batadv_hard_iface *hard_iface,
{
struct batadv_neigh_node *neigh_node;

neigh_node = batadv_neigh_node_new(hard_iface, neigh_addr, orig_node);
neigh_node = batadv_neigh_node_new(orig_node, hard_iface, neigh_addr);
if (!neigh_node)
goto out;

Expand Down
7 changes: 4 additions & 3 deletions net/batman-adv/originator.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,16 +444,17 @@ batadv_neigh_ifinfo_new(struct batadv_neigh_node *neigh,

/**
* batadv_neigh_node_new - create and init a new neigh_node object
* @orig_node: originator object representing the neighbour
* @hard_iface: the interface where the neighbour is connected to
* @neigh_addr: the mac address of the neighbour interface
* @orig_node: originator object representing the neighbour
*
* Allocates a new neigh_node object and initialises all the generic fields.
* Returns the new object or NULL on failure.
*/
struct batadv_neigh_node *
batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
const u8 *neigh_addr, struct batadv_orig_node *orig_node)
batadv_neigh_node_new(struct batadv_orig_node *orig_node,
struct batadv_hard_iface *hard_iface,
const u8 *neigh_addr)
{
struct batadv_neigh_node *neigh_node;

Expand Down
5 changes: 3 additions & 2 deletions net/batman-adv/originator.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ batadv_neigh_node_get(const struct batadv_orig_node *orig_node,
const struct batadv_hard_iface *hard_iface,
const u8 *addr);
struct batadv_neigh_node *
batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
const u8 *neigh_addr, struct batadv_orig_node *orig_node);
batadv_neigh_node_new(struct batadv_orig_node *orig_node,
struct batadv_hard_iface *hard_iface,
const u8 *neigh_addr);
void batadv_neigh_node_free_ref(struct batadv_neigh_node *neigh_node);
struct batadv_neigh_node *
batadv_orig_router_get(struct batadv_orig_node *orig_node,
Expand Down

0 comments on commit 3f32f8a

Please sign in to comment.