All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPICA / Interpreter: Remove redundant newline
@ 2016-09-09 16:12 Borislav Petkov
  2016-09-09 18:26   ` Moore, Robert
  2016-09-14  3:09   ` Zheng, Lv
  0 siblings, 2 replies; 32+ messages in thread
From: Borislav Petkov @ 2016-09-09 16:12 UTC (permalink / raw)
  To: LKML
  Cc: Robert Moore, Lv Zheng, Rafael J. Wysocki, Len Brown, linux-acpi,
	devel

From: Borislav Petkov <bp@suse.de>

acpi_info() already issues a '\n' so remove it in the call.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Robert Moore <robert.moore@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Cc: devel@acpica.org
---
 drivers/acpi/acpica/tbxfload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c
index ac71abcd32bb..e7119b7ccd79 100644
--- a/drivers/acpi/acpica/tbxfload.c
+++ b/drivers/acpi/acpica/tbxfload.c
@@ -240,7 +240,7 @@ acpi_status acpi_tb_load_namespace(void)
 	}
 
 	if (!tables_failed) {
-		ACPI_INFO(("%u ACPI AML tables successfully acquired and loaded\n", tables_loaded));
+		ACPI_INFO(("%u ACPI AML tables successfully acquired and loaded", tables_loaded));
 	} else {
 		ACPI_ERROR((AE_INFO,
 			    "%u table load failures, %u successful",
-- 
2.10.0


^ permalink raw reply related	[flat|nested] 32+ messages in thread
* Re: [Devel] [PATCH] ACPICA / Interpreter: Remove redundant newline
  2016-09-09 18:45     ` Moore, Robert
  (?)
@ 2016-09-14  3:11 ` Zheng, Lv
  -1 siblings, 0 replies; 32+ messages in thread
From: Zheng, Lv @ 2016-09-14  3:11 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]

Hi,

> From: linux-acpi-owner(a)vger.kernel.org [mailto:linux-acpi-owner(a)vger.kernel.org] On Behalf Of Moore,
> Robert
> David E <david.e.box(a)intel.com>
> Subject: RE: [PATCH] ACPICA / Interpreter: Remove redundant newline
> 
> Well, I never thought I would write a couple lines of code like this, but here is a solution that
> should make everyone happy.
> 
> diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c
> index 6a937b1..73ee1a2 100644
> --- a/source/components/tables/tbxfload.c
> +++ b/source/components/tables/tbxfload.c
> @@ -334,7 +334,7 @@ AcpiTbLoadNamespace (
>      if (!TablesFailed)
>      {
>          ACPI_INFO ((
> -            "%u ACPI AML tables successfully acquired and loaded\n",
> +            "%u ACPI AML tables successfully acquired and loaded",
>              TablesLoaded));
>      }
>      else
> @@ -348,6 +348,11 @@ AcpiTbLoadNamespace (
>          Status = AE_CTRL_TERMINATE;
>      }
> 
> +#ifdef ACPI_APPLICATION
> +    ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "\n"));
> +#endif
> +
> +

IMO, these lines should be in ACPICA upstream, in a file under tools/acpiexec.

Thanks
Lv

>  UnlockAndExit:
>      (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
>      return_ACPI_STATUS (Status);
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo(a)vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [Devel] [PATCH] ACPICA / Interpreter: Remove redundant newline
  2016-09-09 18:55     ` Joe Perches
@ 2016-09-14  3:14 ` Zheng, Lv
  -1 siblings, 0 replies; 32+ messages in thread
From: Zheng, Lv @ 2016-09-14  3:14 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1963 bytes --]

Hi,

> From: Joe Perches [mailto:joe(a)perches.com]
> Subject: Re: [PATCH] ACPICA / Interpreter: Remove redundant newline
> 
> On Fri, 2016-09-09 at 20:40 +0200, Borislav Petkov wrote:
> > On Fri, Sep 09, 2016 at 06:26:17PM +0000, Moore, Robert wrote:
> > > Is this a big deal?
> > > We do this on purpose for AcpiExec, to make the screen output more readable.
> []
> > What do you mean "big deal"? All other ACPI_INFO calls don't have a "\n"
> > at the end except this one. How does one "\n" make some output more
> > readable?
> 
> Blank lines in logging/dmesg generally don't add value.
> 
> I would prefer if the unnecessary double parentheses also
> were removed in these macro uses and ##__VA_ARGS__ was
> used instead.

Ideally correct.
But __VA_ARGS__ is not portable.
And ACPICA is used in other environment.
I'd prefer to eliminate debugging/logging macros, but implement debugging/logging functions instead.
As stdarg is more portable than __VA_ARGS__.

Thanks and best regards
Lv

> 
> /*
>  * Error reporting. Callers module and line number are inserted by AE_INFO,
>  * the plist contains a set of parens to allow variable-length lists.
>  * These macros are used for both the debug and non-debug versions of the code.
>  */
> #define ACPI_INFO(plist)                acpi_info plist
> #define ACPI_WARNING(plist)             acpi_warning plist
> #define ACPI_EXCEPTION(plist)           acpi_exception plist
> #define ACPI_ERROR(plist)               acpi_error plist
> #define ACPI_BIOS_WARNING(plist)        acpi_bios_warning plist
> #define ACPI_BIOS_ERROR(plist)          acpi_bios_error plist
> 
> It would also be good if format/argument verification
> was done here and in the non-debug macro variants.
> 
> #define ACPI_INFO(plist)
> #define ACPI_WARNING(plist)
> #define ACPI_EXCEPTION(plist)
> #define ACPI_ERROR(plist)
> #define ACPI_BIOS_WARNING(plist)
> #define ACPI_BIOS_ERROR(plist)


^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [Devel] [PATCH] ACPICA / Interpreter: Remove redundant newline
  2016-09-14  3:11 ` Zheng, Lv
@ 2016-09-14 14:03 ` Moore, Robert
  -1 siblings, 0 replies; 32+ messages in thread
From: Moore, Robert @ 2016-09-14 14:03 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2263 bytes --]



> -----Original Message-----
> From: Zheng, Lv
> Sent: Tuesday, September 13, 2016 8:11 PM
> To: Moore, Robert <robert.moore(a)intel.com>; Moore, Robert
> <robert.moore(a)intel.com>; Borislav Petkov <bp(a)alien8.de>; LKML <linux-
> kernel(a)vger.kernel.org>
> Cc: linux-acpi(a)vger.kernel.org; devel(a)acpica.org; Wysocki, Rafael J
> <rafael.j.wysocki(a)intel.com>; Box, David E <david.e.box(a)intel.com>
> Subject: RE: [PATCH] ACPICA / Interpreter: Remove redundant newline
> 
> Hi,
> 
> > From: linux-acpi-owner(a)vger.kernel.org
> > [mailto:linux-acpi-owner(a)vger.kernel.org] On Behalf Of Moore, Robert
> > David E <david.e.box(a)intel.com>
> > Subject: RE: [PATCH] ACPICA / Interpreter: Remove redundant newline
> >
> > Well, I never thought I would write a couple lines of code like this,
> > but here is a solution that should make everyone happy.
> >
> > diff --git a/source/components/tables/tbxfload.c
> > b/source/components/tables/tbxfload.c
> > index 6a937b1..73ee1a2 100644
> > --- a/source/components/tables/tbxfload.c
> > +++ b/source/components/tables/tbxfload.c
> > @@ -334,7 +334,7 @@ AcpiTbLoadNamespace (
> >      if (!TablesFailed)
> >      {
> >          ACPI_INFO ((
> > -            "%u ACPI AML tables successfully acquired and loaded\n",
> > +            "%u ACPI AML tables successfully acquired and loaded",
> >              TablesLoaded));
> >      }
> >      else
> > @@ -348,6 +348,11 @@ AcpiTbLoadNamespace (
> >          Status = AE_CTRL_TERMINATE;
> >      }
> >
> > +#ifdef ACPI_APPLICATION
> > +    ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "\n")); #endif
> > +
> > +
> 
[Moore, Robert] 

I have no problem with this, I just want to get it over with.
It is not a big deal, let's leave it at that and not make it a big issue.





> IMO, these lines should be in ACPICA upstream, in a file under
> tools/acpiexec.
> 
> Thanks
> Lv
> 
> >  UnlockAndExit:
> >      (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
> >      return_ACPI_STATUS (Status);
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-acpi"
> > in the body of a message to majordomo(a)vger.kernel.org More majordomo
> > info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2016-09-23  6:50 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-09 16:12 [PATCH] ACPICA / Interpreter: Remove redundant newline Borislav Petkov
2016-09-09 18:26 ` [Devel] " Moore, Robert
2016-09-09 18:26   ` Moore, Robert
2016-09-09 18:40   ` Borislav Petkov
2016-09-09 18:46     ` [Devel] " Moore, Robert
2016-09-09 18:46       ` Moore, Robert
2016-09-09 18:50       ` Borislav Petkov
2016-09-09 18:55     ` Joe Perches
2016-09-09 18:45   ` [Devel] " Moore, Robert
2016-09-09 18:45     ` Moore, Robert
2016-09-09 19:06     ` Borislav Petkov
2016-09-09 19:15       ` Joe Perches
2016-09-09 19:25         ` Borislav Petkov
2016-09-14  3:09 ` [Devel] " Zheng, Lv
2016-09-14  3:09   ` Zheng, Lv
2016-09-14 11:30   ` Borislav Petkov
2016-09-19  9:30     ` [Devel] " Zheng, Lv
2016-09-19  9:30       ` Zheng, Lv
2016-09-19 10:12       ` Borislav Petkov
2016-09-23  6:46         ` [PATCH] acpiexec: Move an acpiexec specific purposed new line to acpiexec specific file Lv Zheng
2016-09-23  6:46           ` [Devel] " Lv Zheng
2016-09-23  6:46           ` Lv Zheng
2016-09-23  6:49         ` Lv Zheng
2016-09-23  6:49           ` [Devel] " Lv Zheng
2016-09-23  6:49           ` Lv Zheng
  -- strict thread matches above, loose matches on Subject: below --
2016-09-14  3:11 [Devel] [PATCH] ACPICA / Interpreter: Remove redundant newline Zheng, Lv
2016-09-14  3:11 ` Zheng, Lv
2016-09-14  3:11 ` Zheng, Lv
2016-09-14  3:14 [Devel] " Zheng, Lv
2016-09-14  3:14 ` Zheng, Lv
2016-09-14 14:03 [Devel] " Moore, Robert
2016-09-14 14:03 ` Moore, Robert

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.