if (!e)
e = tbl->first;
- if (e == (void *)1) {
+ if (e == SEQ_START_TOKEN) {
e = tbl->first;
--*l;
}
state->locked = NULL;
state->arp_table = 0;
state->misc_table = 0;
- state->node = (void *)1;
+ state->node = SEQ_START_TOKEN;
- return *pos ? lec_get_idx(state, *pos) : (void *)1;
+ return *pos ? lec_get_idx(state, *pos) : SEQ_START_TOKEN;
}
static void lec_seq_stop(struct seq_file *seq, void *v)
" Status Flags "
"VPI/VCI Recv VPI/VCI\n";
- if (v == (void *)1)
+ if (v == SEQ_START_TOKEN)
seq_puts(seq, lec_banner);
else {
struct lec_state *state = seq->private;
{
struct sock *sk = *sock;
- if (sk == (void *)1) {
+ if (sk == SEQ_START_TOKEN) {
for (*bucket = 0; *bucket < VCC_HTABLE_SIZE; ++*bucket) {
struct hlist_head *head = &vcc_hash[*bucket];
sk = sk_head(&vcc_hash[*bucket]);
goto try_again;
}
- sk = (void *)1;
+ sk = SEQ_START_TOKEN;
out:
*sock = sk;
return (l < 0);
loff_t left = *pos;
read_lock(&vcc_sklist_lock);
- state->sk = (void *)1;
- return left ? vcc_walk(state, left) : (void *)1;
+ state->sk = SEQ_START_TOKEN;
+ return left ? vcc_walk(state, left) : SEQ_START_TOKEN;
}
static void vcc_seq_stop(struct seq_file *seq, void *v)
"Itf Type ESI/\"MAC\"addr "
"AAL(TX,err,RX,err,drop) ... [refcnt]\n";
- if (v == (void *)1)
+ if (v == SEQ_START_TOKEN)
seq_puts(seq, atm_dev_banner);
else {
struct atm_dev *dev = list_entry(v, struct atm_dev, dev_list);
static char atm_pvc_banner[] =
"Itf VPI VCI AAL RX(PCR,Class) TX(PCR,Class)\n";
- if (v == (void *)1)
+ if (v == SEQ_START_TOKEN)
seq_puts(seq, atm_pvc_banner);
else {
struct vcc_state *state = seq->private;
static int vcc_seq_show(struct seq_file *seq, void *v)
{
- if (v == (void *)1) {
+ if (v == SEQ_START_TOKEN) {
seq_printf(seq, sizeof(void *) == 4 ? "%-8s%s" : "%-16s%s",
"Address ", "Itf VPI VCI Fam Flags Reply "
"Send buffer Recv buffer [refcnt]\n");
static char atm_svc_banner[] =
"Itf VPI VCI State Remote\n";
- if (v == (void *)1)
+ if (v == SEQ_START_TOKEN)
seq_puts(seq, atm_svc_banner);
else {
struct vcc_state *state = seq->private;
void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos)
{
mutex_lock(&atm_dev_mutex);
- return *pos ? dev_get_idx(*pos) : (void *) 1;
+ return *pos ? dev_get_idx(*pos) : SEQ_START_TOKEN;
}
void atm_dev_seq_stop(struct seq_file *seq, void *v)
void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
++*pos;
- v = (v == (void *)1) ? atm_devs.next : ((struct list_head *)v)->next;
+ v = (v == SEQ_START_TOKEN)
+ ? atm_devs.next : ((struct list_head *)v)->next;
return (v == &atm_devs) ? NULL : v;
}