b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: lindner_marek@yahoo.de
Cc: b.a.t.m.a.n@lists.open-mesh.net
Subject: [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: Import sparse fixes from mainline.
Date: Sat,  1 May 2010 15:10:08 +0200	[thread overview]
Message-ID: <1272719410-406-3-git-send-email-andrew@lunn.ch> (raw)
In-Reply-To: <1272719410-406-1-git-send-email-andrew@lunn.ch>

I fixed sparce warnings as i moved patches from maint to mainline.
This patch move the fixes back to maint.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 bat_sysfs.c |    9 ++++++---
 vis.c       |    8 ++++----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/bat_sysfs.c b/bat_sysfs.c
index 7acf8d8..e2c000b 100644
--- a/bat_sysfs.c
+++ b/bat_sysfs.c
@@ -357,7 +357,8 @@ void sysfs_del_meshif(struct net_device *dev)
 static ssize_t show_mesh_iface(struct kobject *kobj, struct attribute *attr,
 			       char *buff)
 {
-	struct net_device *net_dev = to_net_dev(to_dev(kobj->parent));
+	struct device *dev = to_dev(kobj->parent);
+	struct net_device *net_dev = to_net_dev(dev);
 	struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
 
 	if (!batman_if)
@@ -371,7 +372,8 @@ static ssize_t show_mesh_iface(struct kobject *kobj, struct attribute *attr,
 static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr,
 				char *buff, size_t count)
 {
-	struct net_device *net_dev = to_net_dev(to_dev(kobj->parent));
+	struct device *dev = to_dev(kobj->parent);
+	struct net_device *net_dev = to_net_dev(dev);
 	struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
 	int status_tmp = -1;
 
@@ -409,7 +411,8 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr,
 static ssize_t show_iface_status(struct kobject *kobj, struct attribute *attr,
 				 char *buff)
 {
-	struct net_device *net_dev = to_net_dev(to_dev(kobj->parent));
+	struct device *dev = to_dev(kobj->parent);
+	struct net_device *net_dev = to_net_dev(dev);
 	struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
 
 	if (!batman_if)
diff --git a/vis.c b/vis.c
index 3144439..bac1401 100644
--- a/vis.c
+++ b/vis.c
@@ -103,7 +103,7 @@ static int vis_info_choose(void *data, int size)
 
 /* insert interface to the list of interfaces of one originator, if it
  * does not already exist in the list */
-void vis_data_insert_interface(const uint8_t *interface,
+static void vis_data_insert_interface(const uint8_t *interface,
 				      struct hlist_head *if_list,
 				      bool primary)
 {
@@ -124,7 +124,7 @@ void vis_data_insert_interface(const uint8_t *interface,
 	hlist_add_head(&entry->list, if_list);
 }
 
-ssize_t vis_data_read_prim_sec(char *buff, struct hlist_head *if_list)
+static ssize_t vis_data_read_prim_sec(char *buff, struct hlist_head *if_list)
 {
 	struct if_list_entry *entry;
 	struct hlist_node *pos;
@@ -144,8 +144,8 @@ ssize_t vis_data_read_prim_sec(char *buff, struct hlist_head *if_list)
 }
 
 /* read an entry  */
-ssize_t vis_data_read_entry(char *buff, struct vis_info_entry *entry,
-			    uint8_t *src, bool primary)
+static ssize_t vis_data_read_entry(char *buff, struct vis_info_entry *entry,
+				   uint8_t *src, bool primary)
 {
 	char to[40];
 
-- 
1.7.1


  parent reply	other threads:[~2010-05-01 13:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-01 13:10 [B.A.T.M.A.N.] [PATCH 0/4] *** SUBJECT HERE *** Andrew Lunn
2010-05-01 13:10 ` [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: Update README to match mainline README Andrew Lunn
2010-05-01 13:53   ` Sven Eckelmann
2010-05-01 14:26     ` Andrew Lunn
2010-05-01 13:10 ` Andrew Lunn [this message]
2010-05-01 16:34   ` [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: Import sparse fixes from mainline Sven Eckelmann
2010-05-01 16:48     ` Andrew Lunn
2010-05-01 17:13     ` Marek Lindner
2010-05-01 18:10       ` Sven Eckelmann
2010-05-01 13:10 ` [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: whitespace " Andrew Lunn
2010-05-01 13:33   ` Sven Eckelmann
2010-05-01 13:46     ` [B.A.T.M.A.N.] [PATCH] Staging: batman-adv: send.c: Checkpatch cleanup Sven Eckelmann
2010-05-01 14:12       ` Andrew Lunn
2010-05-01 14:10     ` [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: whitespace fixes from mainline Andrew Lunn
2010-05-01 13:10 ` [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit Andrew Lunn
2010-05-01 13:28   ` Sven Eckelmann
2010-05-01 14:05     ` Andrew Lunn
2010-05-01 17:14 ` [B.A.T.M.A.N.] [PATCH 0/4] *** SUBJECT HERE *** Marek Lindner
2010-05-01 18:17   ` Andrew Lunn
2010-05-01 18:56     ` Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272719410-406-3-git-send-email-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.net \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=lindner_marek@yahoo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).