From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Clayton Casciato <majortomtosourcecontrol@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] acpi: sysfs: Fixed a control flow style issue
Date: Mon, 14 Jun 2021 17:36:19 +0200 [thread overview]
Message-ID: <CAJZ5v0idK5cneSF8+A1SrHcs-WHQLmTeAJdB72yNNfH5QygWoQ@mail.gmail.com> (raw)
In-Reply-To: <20210612223401.9273-1-majortomtosourcecontrol@gmail.com>
On Sun, Jun 13, 2021 at 12:37 AM Clayton Casciato
<majortomtosourcecontrol@gmail.com> wrote:
>
> Fixed coding style issue.
I'm not really sure what issue you are fixing here.
Is it the redundant braces around the nested if () statement?
If so, the flow before and after the patch is different. Is this intentional?
> Signed-off-by: Clayton Casciato <majortomtosourcecontrol@gmail.com>
> ---
> drivers/acpi/sysfs.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
> index d6626aba4a6a..0e685ca8f78f 100644
> --- a/drivers/acpi/sysfs.c
> +++ b/drivers/acpi/sysfs.c
> @@ -254,15 +254,15 @@ static int param_get_trace_state(char *buffer, const struct kernel_param *kp)
> {
> if (!(acpi_gbl_trace_flags & ACPI_TRACE_ENABLED))
> return sprintf(buffer, "disable\n");
> - else {
> - if (acpi_gbl_trace_method_name) {
> - if (acpi_gbl_trace_flags & ACPI_TRACE_ONESHOT)
> - return sprintf(buffer, "method-once\n");
> - else
> - return sprintf(buffer, "method\n");
> - } else
> - return sprintf(buffer, "enable\n");
> - }
> +
> + if (acpi_gbl_trace_method_name) {
> + if (acpi_gbl_trace_flags & ACPI_TRACE_ONESHOT)
> + return sprintf(buffer, "method-once\n");
> + else
> + return sprintf(buffer, "method\n");
> + } else
> + return sprintf(buffer, "enable\n");
> +
> return 0;
> }
>
> --
> 2.31.1
>
next prev parent reply other threads:[~2021-06-14 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-12 22:34 [PATCH] acpi: sysfs: Fixed a control flow style issue Clayton Casciato
2021-06-14 15:36 ` Rafael J. Wysocki [this message]
2021-06-16 3:52 ` Clayton Casciato
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=CAJZ5v0idK5cneSF8+A1SrHcs-WHQLmTeAJdB72yNNfH5QygWoQ@mail.gmail.com \
--to=rafael@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=majortomtosourcecontrol@gmail.com \
--cc=rjw@rjwysocki.net \
/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.