Re: [PATCH] acpi: sysfs: Fixed a control flow style issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jun 13, 2021 at 12:37 AM Clayton Casciato
<majortomtosourcecontrol@xxxxxxxxx> 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@xxxxxxxxx>
> ---
>  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
>



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux