From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, viro@zeniv.linux.org.uk,
uma.shankar@intel.com, prime.zeng@hisilicon.com,
martin.petersen@oracle.com, luojiaxing@huawei.com,
john.g.garry@oracle.com, jejb@linux.ibm.com,
himanshu.madhani@cavium.com, gregkh@linuxfoundation.org,
felipe.balbi@linux.intel.com, damien.lemoal@opensource.wdc.com,
chenxiang66@hisilicon.com, anshuman.gupta@intel.com,
animesh.manna@intel.com, andriy.shevchenko@linux.intel.com,
yangxingui@huawei.com, akpm@linux-foundation.org
Subject: [merged mm-nonmm-stable] seq_file-add-helper-macro-to-define-attribute-for-rw-file.patch removed from -mm tree
Date: Wed, 04 Oct 2023 13:23:43 -0700 [thread overview]
Message-ID: <20231004202344.F2D84C433CA@smtp.kernel.org> (raw)
The quilt patch titled
Subject: seq_file: add helper macro to define attribute for rw file
has been removed from the -mm tree. Its filename was
seq_file-add-helper-macro-to-define-attribute-for-rw-file.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Xingui Yang <yangxingui@huawei.com>
Subject: seq_file: add helper macro to define attribute for rw file
Date: Tue, 5 Sep 2023 02:48:33 +0000
Patch series "Add helper macro DEFINE_SHOW_STORE_ATTRIBUTE() at
seq_file.c", v6.
We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute
for read-only file, but we found many of drivers also want a helper macro
for read-write file too.
So we add this helper macro to reduce duplicated code.
This patch (of 3):
We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute
for read-only file, but many of drivers want a helper macro for read-write
file too.
So we add DEFINE_SHOW_STORE_ATTRIBUTE() helper to reduce duplicated code.
Link: https://lkml.kernel.org/r/20230905024835.43219-1-yangxingui@huawei.com
Link: https://lkml.kernel.org/r/20230905024835.43219-2-yangxingui@huawei.com
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Co-developed-by: Xingui Yang <yangxingui@huawei.com>
Signed-off-by: Xingui Yang <yangxingui@huawei.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Animesh Manna <animesh.manna@intel.com>
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Xiang Chen <chenxiang66@hisilicon.com>
Cc: Zeng Tao <prime.zeng@hisilicon.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/seq_file.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/include/linux/seq_file.h~seq_file-add-helper-macro-to-define-attribute-for-rw-file
+++ a/include/linux/seq_file.h
@@ -207,6 +207,21 @@ static const struct file_operations __na
.release = single_release, \
}
+#define DEFINE_SHOW_STORE_ATTRIBUTE(__name) \
+static int __name ## _open(struct inode *inode, struct file *file) \
+{ \
+ return single_open(file, __name ## _show, inode->i_private); \
+} \
+ \
+static const struct file_operations __name ## _fops = { \
+ .owner = THIS_MODULE, \
+ .open = __name ## _open, \
+ .read = seq_read, \
+ .write = __name ## _write, \
+ .llseek = seq_lseek, \
+ .release = single_release, \
+}
+
#define DEFINE_PROC_SHOW_ATTRIBUTE(__name) \
static int __name ## _open(struct inode *inode, struct file *file) \
{ \
_
Patches currently in -mm which might be from yangxingui@huawei.com are
reply other threads:[~2023-10-04 20:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231004202344.F2D84C433CA@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=animesh.manna@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=chenxiang66@hisilicon.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=himanshu.madhani@cavium.com \
--cc=jejb@linux.ibm.com \
--cc=john.g.garry@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luojiaxing@huawei.com \
--cc=martin.petersen@oracle.com \
--cc=mm-commits@vger.kernel.org \
--cc=prime.zeng@hisilicon.com \
--cc=uma.shankar@intel.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yangxingui@huawei.com \
/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.