From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Yangtao Li <tiny.windzz@gmail.com>
Cc: lenb@kernel.org, tony.luck@intel.com, bp@alien8.de,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI, APEI, EINJ: Change to use DEFINE_SHOW_ATTRIBUTE macro
Date: Mon, 17 Dec 2018 12:40:19 +0100 [thread overview]
Message-ID: <2171529.ACrt31yYEM@aspire.rjw.lan> (raw)
In-Reply-To: <20181130170106.4031-1-tiny.windzz@gmail.com>
On Friday, November 30, 2018 6:01:06 PM CET Yangtao Li wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/acpi/apei/einj.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
> index b38737c83a24..fcccbfdbdd1a 100644
> --- a/drivers/acpi/apei/einj.c
> +++ b/drivers/acpi/apei/einj.c
> @@ -607,17 +607,7 @@ static int available_error_type_show(struct seq_file *m, void *v)
> return 0;
> }
>
> -static int available_error_type_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, available_error_type_show, NULL);
> -}
> -
> -static const struct file_operations available_error_type_fops = {
> - .open = available_error_type_open,
> - .read = seq_read,
> - .llseek = seq_lseek,
> - .release = single_release,
> -};
> +DEFINE_SHOW_ATTRIBUTE(available_error_type);
>
> static int error_type_get(void *data, u64 *val)
> {
>
Applied, thanks!
prev parent reply other threads:[~2018-12-17 11:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-30 17:01 Yangtao Li
2018-12-17 11:40 ` Rafael J. Wysocki [this message]
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=2171529.ACrt31yYEM@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=bp@alien8.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tiny.windzz@gmail.com \
--cc=tony.luck@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®