summaryrefslogtreecommitdiffstats
path: root/net/rose/rose_route.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2008-01-15 03:30:35 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:02:44 -0800
commit95b7d924a589dbefc7ae2ea6c7144b86b75d6a47 (patch)
tree887766c4c98864db4fa1ac0ec5b97bcc90bc2ab5 /net/rose/rose_route.c
parent5c17d5f11212af5f12b91991b1132cf301dd1f28 (diff)
downloadtalos-op-linux-95b7d924a589dbefc7ae2ea6c7144b86b75d6a47.tar.gz
talos-op-linux-95b7d924a589dbefc7ae2ea6c7144b86b75d6a47.zip
[ROSE]: Supress sparse warnings
CHECK net/rose/af_rose.c net/rose/af_rose.c:125:11: warning: expensive signed divide net/rose/af_rose.c:976:46: warning: expensive signed divide net/rose/af_rose.c:1379:13: warning: context imbalance in 'rose_info_start' - wrong count at exit net/rose/af_rose.c:1406:13: warning: context imbalance in 'rose_info_stop' - unexpected unlock CHECK net/rose/rose_in.c net/rose/rose_in.c:185:25: warning: expensive signed divide CHECK net/rose/rose_route.c net/rose/rose_route.c:997:46: warning: expensive signed divide net/rose/rose_route.c:1070:13: warning: context imbalance in 'rose_node_start' - wrong count at exit net/rose/rose_route.c:1093:13: warning: context imbalance in 'rose_node_stop' - unexpected unlock net/rose/rose_route.c:1146:13: warning: context imbalance in 'rose_neigh_start' - wrong count at exit net/rose/rose_route.c:1169:13: warning: context imbalance in 'rose_neigh_stop' - unexpected unlock net/rose/rose_route.c:1229:13: warning: context imbalance in 'rose_route_start' - wrong count at exit net/rose/rose_route.c:1252:13: warning: context imbalance in 'rose_route_stop' - unexpected unlock Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rose/rose_route.c')
-rw-r--r--net/rose/rose_route.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 540c0f26ffee..fb9359fb2358 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -994,8 +994,8 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
goto out;
}
- len = (((skb->data[3] >> 4) & 0x0F) + 1) / 2;
- len += (((skb->data[3] >> 0) & 0x0F) + 1) / 2;
+ len = (((skb->data[3] >> 4) & 0x0F) + 1) >> 1;
+ len += (((skb->data[3] >> 0) & 0x0F) + 1) >> 1;
memset(&facilities, 0x00, sizeof(struct rose_facilities_struct));
@@ -1068,6 +1068,7 @@ out:
#ifdef CONFIG_PROC_FS
static void *rose_node_start(struct seq_file *seq, loff_t *pos)
+ __acquires(rose_neigh_list_lock)
{
struct rose_node *rose_node;
int i = 1;
@@ -1091,6 +1092,7 @@ static void *rose_node_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void rose_node_stop(struct seq_file *seq, void *v)
+ __releases(rose_neigh_list_lock)
{
spin_unlock_bh(&rose_neigh_list_lock);
}
@@ -1144,6 +1146,7 @@ const struct file_operations rose_nodes_fops = {
};
static void *rose_neigh_start(struct seq_file *seq, loff_t *pos)
+ __acquires(rose_neigh_list_lock)
{
struct rose_neigh *rose_neigh;
int i = 1;
@@ -1167,6 +1170,7 @@ static void *rose_neigh_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void rose_neigh_stop(struct seq_file *seq, void *v)
+ __releases(rose_neigh_list_lock)
{
spin_unlock_bh(&rose_neigh_list_lock);
}
@@ -1227,6 +1231,7 @@ const struct file_operations rose_neigh_fops = {
static void *rose_route_start(struct seq_file *seq, loff_t *pos)
+ __acquires(rose_route_list_lock)
{
struct rose_route *rose_route;
int i = 1;
@@ -1250,6 +1255,7 @@ static void *rose_route_next(struct seq_file *seq, void *v, loff_t *pos)
}
static void rose_route_stop(struct seq_file *seq, void *v)
+ __releases(rose_route_list_lock)
{
spin_unlock_bh(&rose_route_list_lock);
}
OpenPOWER on IntegriCloud