* [PATCH -next] s390/diag: convert to use DEFINE_SEQ_ATTRIBUTE macro
@ 2020-09-16 2:50 Liu Shixin
2020-09-16 12:20 ` Heiko Carstens
0 siblings, 1 reply; 2+ messages in thread
From: Liu Shixin @ 2020-09-16 2:50 UTC (permalink / raw)
To: Heiko Carstens, Vasily Gorbik, Christian Borntraeger
Cc: linux-s390, linux-kernel, Liu Shixin
Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
arch/s390/kernel/diag.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/arch/s390/kernel/diag.c b/arch/s390/kernel/diag.c
index ccba63aaeb47..b8b0cd7b008f 100644
--- a/arch/s390/kernel/diag.c
+++ b/arch/s390/kernel/diag.c
@@ -104,18 +104,7 @@ static const struct seq_operations show_diag_stat_sops = {
.show = show_diag_stat,
};
-static int show_diag_stat_open(struct inode *inode, struct file *file)
-{
- return seq_open(file, &show_diag_stat_sops);
-}
-
-static const struct file_operations show_diag_stat_fops = {
- .open = show_diag_stat_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
-};
-
+DEFINE_SEQ_ATTRIBUTE(show_diag_stat);
static int __init show_diag_stat_init(void)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] s390/diag: convert to use DEFINE_SEQ_ATTRIBUTE macro
2020-09-16 2:50 [PATCH -next] s390/diag: convert to use DEFINE_SEQ_ATTRIBUTE macro Liu Shixin
@ 2020-09-16 12:20 ` Heiko Carstens
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2020-09-16 12:20 UTC (permalink / raw)
To: Liu Shixin; +Cc: Vasily Gorbik, Christian Borntraeger, linux-s390, linux-kernel
On Wed, Sep 16, 2020 at 10:50:29AM +0800, Liu Shixin wrote:
> Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
> arch/s390/kernel/diag.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-16 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 2:50 [PATCH -next] s390/diag: convert to use DEFINE_SEQ_ATTRIBUTE macro Liu Shixin
2020-09-16 12:20 ` Heiko Carstens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).