Thread (19 messages) 19 messages, 4 authors, 2016-09-23

RE: [PATCH] ACPICA / Interpreter: Remove redundant newline

From: Zheng, Lv <hidden>
Date: 2016-09-14 03:14:39
Also in: lkml

Hi,
From: Joe Perches [mailto:joe@perches.com]
Subject: Re: [PATCH] ACPICA / Interpreter: Remove redundant newline

On Fri, 2016-09-09 at 20:40 +0200, Borislav Petkov wrote:
quoted
On Fri, Sep 09, 2016 at 06:26:17PM +0000, Moore, Robert wrote:
quoted
Is this a big deal?
We do this on purpose for AcpiExec, to make the screen output more readable.
[]
quoted
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)
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help