Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / drivers / net / bonding / bond_main.c
index e0578fe..bfe1ed8 100644 (file)
@@ -1002,6 +1002,10 @@ static void bond_mc_swap(struct bonding *bond, struct slave *new_active, struct
 static void bond_do_fail_over_mac(struct bonding *bond,
                                  struct slave *new_active,
                                  struct slave *old_active)
+       __releases(&bond->curr_slave_lock)
+       __releases(&bond->lock)
+       __acquires(&bond->lock)
+       __acquires(&bond->curr_slave_lock)
 {
        u8 tmp_mac[ETH_ALEN];
        struct sockaddr saddr;
@@ -3193,6 +3197,8 @@ out:
 #ifdef CONFIG_PROC_FS
 
 static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
+       __acquires(&dev_base_lock)
+       __acquires(&bond->lock)
 {
        struct bonding *bond = seq->private;
        loff_t off = 0;
@@ -3232,6 +3238,8 @@ static void *bond_info_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 }
 
 static void bond_info_seq_stop(struct seq_file *seq, void *v)
+       __releases(&bond->lock)
+       __releases(&dev_base_lock)
 {
        struct bonding *bond = seq->private;
 
@@ -3369,7 +3377,7 @@ static int bond_info_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations bond_info_seq_ops = {
+static const struct seq_operations bond_info_seq_ops = {
        .start = bond_info_seq_start,
        .next  = bond_info_seq_next,
        .stop  = bond_info_seq_stop,
@@ -4724,7 +4732,7 @@ static void bond_free_all(void)
  */
 int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl)
 {
-       int mode = -1, i, rv;
+       int modeint = -1, i, rv;
        char *p, modestr[BOND_MAX_MODENAME_LEN + 1] = { 0, };
 
        for (p = (char *)buf; *p; p++)
@@ -4734,13 +4742,13 @@ int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl)
        if (*p)
                rv = sscanf(buf, "%20s", modestr);
        else
-               rv = sscanf(buf, "%d", &mode);
+               rv = sscanf(buf, "%d", &modeint);
 
        if (!rv)
                return -1;
 
        for (i = 0; tbl[i].modename; i++) {
-               if (mode == tbl[i].mode)
+               if (modeint == tbl[i].mode)
                        return tbl[i].mode;
                if (strcmp(modestr, tbl[i].modename) == 0)
                        return tbl[i].mode;