public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Julia Lawall <Julia.Lawall@lip6.fr>
Subject: [PATCH 0/2] Introduce simple_open()
Date: Sat,  3 Mar 2012 02:06:18 -0800	[thread overview]
Message-ID: <1330769180-22354-1-git-send-email-sboyd@codeaurora.org> (raw)

I noticed that if I want to tweak debugfs file ops I need to copy
the implementation of default_open() in fs/debugfs/file.c. I went
to look for an exported function that would be common across all
debugfs users but I couldn't find any.

This patchset moves default_open() to libfs so that other filesystems
can use it (although almost 99% of users are debugfs clients). I
wrote a semantic patch to find all the kernel users and ended up
with a nice diff:

 58 files changed, 150 insertions(+), 560 deletions(-)

I will send those patches as a follow up to these two once we settle
on naming and merging strategies for the patches.

Stephen Boyd (2):
  libfs: Add simple_open()
  coccinelle: semantic patch for simple_open()

 fs/libfs.c                               |    8 +++++++
 include/linux/fs.h                       |    1 +
 scripts/coccinelle/api/simple_open.cocci |   34 ++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+)
 create mode 100644 scripts/coccinelle/api/simple_open.cocci

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


             reply	other threads:[~2012-03-03 10:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-03 10:06 Stephen Boyd [this message]
2012-03-03 10:06 ` [PATCH 1/2] libfs: Add simple_open() Stephen Boyd
2012-03-03 10:06 ` [PATCH 2/2] coccinelle: semantic patch for simple_open() Stephen Boyd
2012-03-03 12:10   ` Julia Lawall
2012-03-06  8:43     ` Stephen Boyd

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=1330769180-22354-1-git-send-email-sboyd@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=Julia.Lawall@lip6.fr \
    --cc=gregkh@linuxfoundation.org \
    --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