mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Emelianov <xemul@sw.ru>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dhowells@redhat.com, chas@cmf.nrl.navy.mil, axboe@kernel.dk,
	herbert@gondor.apana.org.au, dmitry.torokhov@gmail.com,
	kkeil@suse.de, David Miller <davem@davemloft.net>,
	Patrick McHardy <kaber@trash.net>,
	viro@zeniv.linux.org.uk, devel@openvz.org
Subject: [PATCH 0/15] Make common helpers for seq_files that work with list_head-s (v2)
Date: Fri, 18 May 2007 13:14:47 +0400	[thread overview]
Message-ID: <464D6E87.7060605@sw.ru> (raw)

Many places in kernel use seq_file API to iterate over a regular
list_head. The code for such iteration is identical in all the
places, so it's worth introducing a common helpers.

This makes code about 300 lines smaller:

 block/genhd.c                                         |   40 +++-----
 crypto/proc.c                                         |   17 ---
 drivers/char/misc.c                                   |   18 ----
 drivers/input/input.c                                 |   29 ------
 drivers/isdn/capi/kcapi_proc.c                        |   28 ------
 fs/afs/proc.c                                         |   81 ++----------------
 fs/namespace.c                                        |   14 ---
 fs/nfs/client.c                                       |   54 +-----------
 fs/proc/proc_tty.c                                    |   15 ---
 fs/seq_file.c                                         |   34 +++++++
 include/linux/seq_file.h                              |   11 ++
 kernel/module.c                                       |   17 ---
 mm/slab.c                                             |   28 +-----
 net/atm/br2684.c                                      |   22 ----
 net/core/sock.c                                       |   39 --------
 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c |   27 ------
 net/netfilter/nf_conntrack_expect.c                   |   27 ------
 net/rxrpc/ar-proc.c                                   |   48 +---------
 18 files changed, 126 insertions(+), 423 deletions(-)

The first version of this patch made the helper functions static inline
in the seq_file.h header. This patch moves them to the fs/seq_file.c as
Andrew proposed. The vmlinux .text section sizes are as follows:

2.6.22-rc1-mm1:              0x001794d5
with the previous version:   0x00179505
with this patch:             0x00179135

The config file used was make allnoconfig with the "y" inclusion of all
the possible options to make the files modified by the patch compile plus
drivers I have on the test node.

             reply	other threads:[~2007-05-18  9:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18  9:14 Pavel Emelianov [this message]
2007-05-18  9:21 ` [PATCH 1/15] The helper functions itselves Pavel Emelianov
2007-05-18  9:25 ` [PATCH 2/15] Make AFS use seq_list_xxx helpers Pavel Emelianov
2007-05-18  9:28 ` [PATCH 3/15] Make ATM driver " Pavel Emelianov
2007-05-18  9:32 ` [PATCH 4/15] Make block layer /proc files " Pavel Emelianov
2007-05-18  9:34 ` [PATCH 5/15] Make crypto API " Pavel Emelianov
2007-05-18 10:13   ` Herbert Xu
2007-05-18  9:37 ` [PATCH 6/15] Make input layer " Pavel Emelianov
2007-05-18  9:41 ` [PATCH 7/15] Make ISDN CAPI " Pavel Emelianov
2007-05-18  9:43 ` [PATCH 8/15] Make /proc/misc " Pavel Emelianov
2007-05-18  9:46 ` [PATCH 9/15] Make /proc/modules " Pavel Emelianov
2007-05-18  9:53 ` [PATCH 10/15] Make some network-related proc files " Pavel Emelianov
2007-05-18 10:24   ` David Miller
2007-05-18  9:59 ` [PATCH 1/15] The helper functions itselves David Howells
2007-05-18 10:00 ` [PATCH 11/15] Make some netfilter-related proc files use seq_list_xxx helpers Pavel Emelianov
2007-05-18 10:04 ` [PATCH 12/15] Make NFS client " Pavel Emelianov
2007-05-18 17:42   ` Trond Myklebust
2007-05-18 10:07 ` [PATCH 13/15] Make /proc/tty/drivers " Pavel Emelianov
2007-05-18 10:11 ` [PATCH 14/15] Make /proc/slabinfo " Pavel Emelianov
2007-05-18 10:14 ` [PATCH 15/15] Make /proc/self/mounts(tats) " Pavel Emelianov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=464D6E87.7060605@sw.ru \
    --to=xemul@sw.ru \
    --cc=akpm@osdl.org \
    --cc=axboe@kernel.dk \
    --cc=chas@cmf.nrl.navy.mil \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=dhowells@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kaber@trash.net \
    --cc=kkeil@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome