2017-12-08 16:29:31

by Vasyl Gomonovych

[permalink] [raw]
Subject: [PATCH] ACPICA: Fix indentation

This patch avoids that smatch reports the following:
drivers/acpi/acpica/exdump.c:623 acpi_ex_dump_operand() warn: inconsistent indenting

Signed-off-by: Vasyl Gomonovych <[email protected]>
---
drivers/acpi/acpica/exdump.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c
index 83398dc..f43d3d7 100644
--- a/drivers/acpi/acpica/exdump.c
+++ b/drivers/acpi/acpica/exdump.c
@@ -619,8 +619,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)

ACPI_FUNCTION_NAME(ex_dump_operand)

- /* Check if debug output enabled */
- if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_EXEC, _COMPONENT)) {
+ /* Check if debug output enabled */
+ if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_EXEC, _COMPONENT)) {
return;
}

--
1.9.1


2017-12-08 17:06:28

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] ACPICA: Fix indentation

On Fri, Dec 8, 2017 at 5:29 PM, Vasyl Gomonovych <[email protected]> wrote:
> This patch avoids that smatch reports the following:
> drivers/acpi/acpica/exdump.c:623 acpi_ex_dump_operand() warn: inconsistent indenting
>
> Signed-off-by: Vasyl Gomonovych <[email protected]>

This is ACPICA code, so changes like this should go in via the upstream.

Erik may want to pick this up, however.

> ---
> drivers/acpi/acpica/exdump.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c
> index 83398dc..f43d3d7 100644
> --- a/drivers/acpi/acpica/exdump.c
> +++ b/drivers/acpi/acpica/exdump.c
> @@ -619,8 +619,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
>
> ACPI_FUNCTION_NAME(ex_dump_operand)
>
> - /* Check if debug output enabled */
> - if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_EXEC, _COMPONENT)) {
> + /* Check if debug output enabled */
> + if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_EXEC, _COMPONENT)) {
> return;
> }
>
> --

2017-12-08 21:13:21

by Moore, Robert

[permalink] [raw]
Subject: RE: [PATCH] ACPICA: Fix indentation

This type of thing more often than not is caused by running the code through indent (lindent).


Original ACPICA code:

ACPI_FUNCTION_NAME (ExDumpOperand)

/* Check if debug output enabled */

if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_EXEC, _COMPONENT))
{
return;
}


Raw "linuxized" code:

ACPI_FUNCTION_NAME (ex_dump_operand)

/* Check if debug output enabled */

if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_EXEC, _COMPONENT)) {
return;
}


> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of
> Rafael J. Wysocki
> Sent: Friday, December 8, 2017 9:06 AM
> To: Vasyl Gomonovych <[email protected]>
> Cc: Moore, Robert <[email protected]>; Zheng, Lv
> <[email protected]>; Wysocki, Rafael J <[email protected]>;
> Len Brown <[email protected]>; ACPI Devel Maling List <linux-
> [email protected]>; [email protected]; Linux Kernel Mailing List
> <[email protected]>; Schmauss, Erik <[email protected]>
> Subject: Re: [PATCH] ACPICA: Fix indentation
>
> On Fri, Dec 8, 2017 at 5:29 PM, Vasyl Gomonovych <[email protected]>
> wrote:
> > This patch avoids that smatch reports the following:
> > drivers/acpi/acpica/exdump.c:623 acpi_ex_dump_operand() warn:
> > inconsistent indenting
> >
> > Signed-off-by: Vasyl Gomonovych <[email protected]>
>
> This is ACPICA code, so changes like this should go in via the upstream.
>
> Erik may want to pick this up, however.
>
> > ---
> > drivers/acpi/acpica/exdump.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/acpi/acpica/exdump.c
> > b/drivers/acpi/acpica/exdump.c index 83398dc..f43d3d7 100644
> > --- a/drivers/acpi/acpica/exdump.c
> > +++ b/drivers/acpi/acpica/exdump.c
> > @@ -619,8 +619,8 @@ void acpi_ex_dump_operand(union
> > acpi_operand_object *obj_desc, u32 depth)
> >
> > ACPI_FUNCTION_NAME(ex_dump_operand)
> >
> > - /* Check if debug output enabled */
> > - if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_EXEC, _COMPONENT)) {
> > + /* Check if debug output enabled */
> > + if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_EXEC, _COMPONENT)) {
> > return;
> > }
> >
> > --

2017-12-13 21:53:42

by Schmauss, Erik

[permalink] [raw]
Subject: RE: [PATCH] ACPICA: Fix indentation


> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Rafael
> J. Wysocki
> Sent: Friday, December 8, 2017 9:06 AM
> To: Vasyl Gomonovych <[email protected]>
> Cc: Moore, Robert <[email protected]>; Zheng, Lv
> <[email protected]>; Wysocki, Rafael J <[email protected]>; Len
> Brown <[email protected]>; ACPI Devel Maling List <[email protected]>;
> [email protected]; Linux Kernel Mailing List <[email protected]>;
> Schmauss, Erik <[email protected]>
> Subject: Re: [PATCH] ACPICA: Fix indentation
>
> On Fri, Dec 8, 2017 at 5:29 PM, Vasyl Gomonovych <[email protected]>
> wrote:
> > This patch avoids that smatch reports the following:
> > drivers/acpi/acpica/exdump.c:623 acpi_ex_dump_operand() warn:
> > inconsistent indenting
> >
> > Signed-off-by: Vasyl Gomonovych <[email protected]>
>
> This is ACPICA code, so changes like this should go in via the upstream.
>

Hi,
> Erik may want to pick this up, however.
>

Thanks for pointing this out. I found solution to fix the indentation issue. It will be in the next release.
Erik
> > ---
> > drivers/acpi/acpica/exdump.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/acpi/acpica/exdump.c
> > b/drivers/acpi/acpica/exdump.c index 83398dc..f43d3d7 100644
> > --- a/drivers/acpi/acpica/exdump.c
> > +++ b/drivers/acpi/acpica/exdump.c
> > @@ -619,8 +619,8 @@ void acpi_ex_dump_operand(union
> > acpi_operand_object *obj_desc, u32 depth)
> >
> > ACPI_FUNCTION_NAME(ex_dump_operand)
> >
> > - /* Check if debug output enabled */
> > - if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_EXEC, _COMPONENT)) {
> > + /* Check if debug output enabled */
> > + if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_EXEC, _COMPONENT)) {
> > return;
> > }
> >
> > --

2017-12-13 22:27:11

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] ACPICA: Fix indentation

On Wed, Dec 13, 2017 at 10:53 PM, Schmauss, Erik
<[email protected]> wrote:
>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On Behalf Of Rafael
>> J. Wysocki
>> Sent: Friday, December 8, 2017 9:06 AM
>> To: Vasyl Gomonovych <[email protected]>
>> Cc: Moore, Robert <[email protected]>; Zheng, Lv
>> <[email protected]>; Wysocki, Rafael J <[email protected]>; Len
>> Brown <[email protected]>; ACPI Devel Maling List <[email protected]>;
>> [email protected]; Linux Kernel Mailing List <[email protected]>;
>> Schmauss, Erik <[email protected]>
>> Subject: Re: [PATCH] ACPICA: Fix indentation
>>
>> On Fri, Dec 8, 2017 at 5:29 PM, Vasyl Gomonovych <[email protected]>
>> wrote:
>> > This patch avoids that smatch reports the following:
>> > drivers/acpi/acpica/exdump.c:623 acpi_ex_dump_operand() warn:
>> > inconsistent indenting
>> >
>> > Signed-off-by: Vasyl Gomonovych <[email protected]>
>>
>> This is ACPICA code, so changes like this should go in via the upstream.
>>
>
> Hi,
>> Erik may want to pick this up, however.
>>
>
> Thanks for pointing this out. I found solution to fix the indentation issue. It will be in the next release.

Cool, thanks!