[AF_PACKET]: Remove unused variable.
[linux-2.6-block.git] / net / packet / af_packet.c
index 485af5691d64270a02322925a6ccfad9d02b7f78..a56ed2120e07134b9c9f2cde394fb7dc152ef8e6 100644 (file)
@@ -1658,7 +1658,7 @@ static int packet_set_ring(struct sock *sk, struct tpacket_req *req, int closing
        int err = 0;
 
        if (req->tp_block_nr) {
-               int i, l;
+               int i;
 
                /* Sanity tests and some calculations */
 
@@ -1687,7 +1687,6 @@ static int packet_set_ring(struct sock *sk, struct tpacket_req *req, int closing
                if (unlikely(!pg_vec))
                        goto out;
 
-               l = 0;
                for (i = 0; i < req->tp_block_nr; i++) {
                        char *ptr = pg_vec[i];
                        struct tpacket_hdr *header;
@@ -1870,6 +1869,7 @@ static inline struct sock *packet_seq_idx(struct net *net, loff_t off)
 }
 
 static void *packet_seq_start(struct seq_file *seq, loff_t *pos)
+       __acquires(seq_file_net(seq)->packet.sklist_lock)
 {
        struct net *net = seq_file_net(seq);
        read_lock(&net->packet.sklist_lock);
@@ -1878,7 +1878,7 @@ static void *packet_seq_start(struct seq_file *seq, loff_t *pos)
 
 static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 {
-       struct net *net = seq->private;
+       struct net *net = seq_file_net(seq);
        ++*pos;
        return  (v == SEQ_START_TOKEN)
                ? sk_head(&net->packet.sklist)
@@ -1886,8 +1886,9 @@ static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 }
 
 static void packet_seq_stop(struct seq_file *seq, void *v)
+       __releases(seq_file_net(seq)->packet.sklist_lock)
 {
-       struct net *net = seq->private;
+       struct net *net = seq_file_net(seq);
        read_unlock(&net->packet.sklist_lock);
 }