The patch titled Make /proc/misc use seq_list_xxx helpers has been added to the -mm tree. Its filename is make-proc-misc-use-seq_list_xxx-helpers.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Make /proc/misc use seq_list_xxx helpers From: Pavel Emelianov <xemul@xxxxx> Simple and stupid - just use the helpers. Signed-off-by: Pavel Emelianov <xemul@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/char/misc.c | 18 +++--------------- 1 files changed, 3 insertions(+), 15 deletions(-) diff -puN drivers/char/misc.c~make-proc-misc-use-seq_list_xxx-helpers drivers/char/misc.c --- a/drivers/char/misc.c~make-proc-misc-use-seq_list_xxx-helpers +++ a/drivers/char/misc.c @@ -67,25 +67,13 @@ extern int pmu_device_init(void); #ifdef CONFIG_PROC_FS static void *misc_seq_start(struct seq_file *seq, loff_t *pos) { - struct miscdevice *p; - loff_t off = 0; - mutex_lock(&misc_mtx); - list_for_each_entry(p, &misc_list, list) { - if (*pos == off++) - return p; - } - return NULL; + return seq_list_start(&misc_list, *pos); } static void *misc_seq_next(struct seq_file *seq, void *v, loff_t *pos) { - struct list_head *n = ((struct miscdevice *)v)->list.next; - - ++*pos; - - return (n != &misc_list) ? list_entry(n, struct miscdevice, list) - : NULL; + return seq_list_next(v, &misc_list, pos); } static void misc_seq_stop(struct seq_file *seq, void *v) @@ -95,7 +83,7 @@ static void misc_seq_stop(struct seq_fil static int misc_seq_show(struct seq_file *seq, void *v) { - const struct miscdevice *p = v; + const struct miscdevice *p = list_entry(v, struct miscdevice, list); seq_printf(seq, "%3i %s\n", p->minor, p->name ? p->name : ""); return 0; _ Patches currently in -mm which might be from xemul@xxxxx are make-common-helpers-for-seq_files-that-work-with-list_head-s.patch make-afs-use-seq_list_xxx-helpers.patch make-atm-driver-use-seq_list_xxx-helpers.patch make-block-layer-proc-files-use-seq_list_xxx-helpers.patch make-crypto-api-use-seq_list_xxx-helpers.patch make-input-layer-use-seq_list_xxx-helpers.patch make-isdn-capi-use-seq_list_xxx-helpers.patch make-proc-misc-use-seq_list_xxx-helpers.patch make-proc-modules-use-seq_list_xxx-helpers.patch make-some-network-related-proc-files-use-seq_list_xxx.patch make-some-netfilter-related-proc-files-use-seq_list_xxx.patch make-nfs-client-use-seq_list_xxx-helpers.patch make-proc-tty-drivers-use-seq_list_xxx-helpers.patch make-proc-slabinfo-use-seq_list_xxx-helpers.patch make-proc-self-mountstats-use-seq_list_xxx-helpers.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html