All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] debugfs: add helper function to create device related seq_file
Date: Sun, 12 Oct 2014 10:13:35 +0200	[thread overview]
Message-ID: <543A382F.5060608@broadcom.com> (raw)
In-Reply-To: <20141011201723.GA29439@kroah.com>

On 11-10-14 22:17, Greg Kroah-Hartman wrote:
> On Sat, Oct 11, 2014 at 06:01:55PM +0200, Arend van Spriel wrote:
>> This patch adds a helper function that simplifies adding a
>> sequence file for device drivers. The calling device driver
>> needs to provide a read function and a device pointer. The
>> field struct seq_file::private will reference the device
>> pointer upon call to the read function so the driver can
>> obtain his data from it and do its seq_printf() calls.
>>
>> Signed-off-by: Arend van Spriel <arend@broadcom.com>
>> ---
>>  fs/debugfs/file.c       | 54 +++++++++++++++++++++++++++++++++++++++++++++++++
>>  include/linux/debugfs.h | 16 ++++++++++++++-
>>  2 files changed, 69 insertions(+), 1 deletion(-)
> 
> Do you have some kernel code pending that needs this change?  Or can
> existing users be moved to it, saving them code?

Yes and maybe. I made a similar change in our brcm80211 drivers, but
figured it may be useful for other device drivers. So when this gets in
the kernel I want to align the brcm80211 drivers. I will also have a
quick look at the wireless drivers and get some metrics about code savings.

Regards,
Arend

  reply	other threads:[~2014-10-12  8:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-11 16:01 [PATCH] debugfs: add helper function to create device related seq_file Arend van Spriel
2014-10-11 16:09 ` Arend van Spriel
2014-10-11 20:17   ` Greg Kroah-Hartman
2014-10-11 20:17 ` Greg Kroah-Hartman
2014-10-12  8:13   ` Arend van Spriel [this message]
2014-10-19 13:57     ` Arend van Spriel

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=543A382F.5060608@broadcom.com \
    --to=arend@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.