int err = 0;
if (req->tp_block_nr) {
- int i, l;
+ int i;
/* Sanity tests and some calculations */
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;
}
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);
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)
}
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);
}