From patchwork Tue Jul 20 05:06:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 112959 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6K56ug1027444 for ; Tue, 20 Jul 2010 05:06:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285Ab0GTFGX (ORCPT ); Tue, 20 Jul 2010 01:06:23 -0400 Received: from mail.perches.com ([173.55.12.10]:1968 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198Ab0GTFGK (ORCPT ); Tue, 20 Jul 2010 01:06:10 -0400 Received: from [192.168.1.151] (Joe-Laptop.home [192.168.1.151]) by mail.perches.com (Postfix) with ESMTP id 771BE24368; Mon, 19 Jul 2010 22:05:58 -0700 (PDT) Subject: [PATCH net-next] drivers/acpi/acpica/utmisc.c: Use printk extension %pV From: Joe Perches To: Len Brown Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, netdev , David Miller Date: Mon, 19 Jul 2010 22:06:07 -0700 Message-ID: <1279602367.19374.20.camel@Joe-Laptop.home> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 20 Jul 2010 05:06:57 +0000 (UTC) diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c index e8d0724..d9a4a64 100644 --- a/drivers/acpi/acpica/utmisc.c +++ b/drivers/acpi/acpica/utmisc.c @@ -53,8 +53,8 @@ ACPI_MODULE_NAME("utmisc") /* * Common suffix for messages */ -#define ACPI_COMMON_MSG_SUFFIX \ - acpi_os_printf(" (%8.8X/%s-%u)\n", ACPI_CA_VERSION, module_name, line_number) +#define ACPI_COMMON_MSG_SUFFIX_FMT " (%8.8X/%s-%u)" +#define ACPI_COMMON_MSG_SUFFIX_ARGS ACPI_CA_VERSION, module_name, line_number /******************************************************************************* * * FUNCTION: acpi_ut_validate_exception @@ -1063,12 +1063,16 @@ void ACPI_INTERNAL_VAR_XFACE acpi_error(const char *module_name, u32 line_number, const char *format, ...) { va_list args; - - acpi_os_printf("ACPI Error: "); + struct va_format vaf; va_start(args, format); - acpi_os_vprintf(format, args); - ACPI_COMMON_MSG_SUFFIX; + + vaf.fmt = format; + vaf.va = &args; + + acpi_os_printf("ACPI Error: %pV" ACPI_COMMON_MSG_SUFFIX_FMT "\n", + &vaf, ACPI_COMMON_MSG_SUFFIX_ARGS); + va_end(args); } @@ -1077,12 +1081,18 @@ acpi_exception(const char *module_name, u32 line_number, acpi_status status, const char *format, ...) { va_list args; - - acpi_os_printf("ACPI Exception: %s, ", acpi_format_exception(status)); + struct va_format vaf; va_start(args, format); - acpi_os_vprintf(format, args); - ACPI_COMMON_MSG_SUFFIX; + + vaf.fmt = format; + vaf.va = &args; + + acpi_os_printf("ACPI Exception: %s, %pV" + ACPI_COMMON_MSG_SUFFIX_FMT "\n", + acpi_format_exception(status), &vaf, + ACPI_COMMON_MSG_SUFFIX_ARGS); + va_end(args); } @@ -1090,12 +1100,16 @@ void ACPI_INTERNAL_VAR_XFACE acpi_warning(const char *module_name, u32 line_number, const char *format, ...) { va_list args; - - acpi_os_printf("ACPI Warning: "); + struct va_format vaf; va_start(args, format); - acpi_os_vprintf(format, args); - ACPI_COMMON_MSG_SUFFIX; + + vaf.fmt = format; + vaf.va = &args; + + acpi_os_printf("ACPI Warning: %pV" ACPI_COMMON_MSG_SUFFIX_FMT "\n", + &vaf, ACPI_COMMON_MSG_SUFFIX_ARGS); + va_end(args); } @@ -1103,12 +1117,15 @@ void ACPI_INTERNAL_VAR_XFACE acpi_info(const char *module_name, u32 line_number, const char *format, ...) { va_list args; - - acpi_os_printf("ACPI: "); + struct va_format vaf; va_start(args, format); - acpi_os_vprintf(format, args); - acpi_os_printf("\n"); + + vaf.fmt = format; + vaf.va = &args; + + acpi_os_printf("ACPI: %pV\n", &vaf); + va_end(args); } @@ -1143,6 +1160,7 @@ acpi_ut_predefined_warning(const char *module_name, u8 node_flags, const char *format, ...) { va_list args; + struct va_format vaf; /* * Warning messages for this method/object will be disabled after the @@ -1152,11 +1170,15 @@ acpi_ut_predefined_warning(const char *module_name, return; } - acpi_os_printf("ACPI Warning for %s: ", pathname); - va_start(args, format); - acpi_os_vprintf(format, args); - ACPI_COMMON_MSG_SUFFIX; + + vaf.fmt = format; + vaf.va = &args; + + acpi_os_printf("ACPI Warning for %s: %pV" + ACPI_COMMON_MSG_SUFFIX_FMT "\n", + pathname, &vaf, ACPI_COMMON_MSG_SUFFIX_ARGS); + va_end(args); } @@ -1185,6 +1207,7 @@ acpi_ut_predefined_info(const char *module_name, char *pathname, u8 node_flags, const char *format, ...) { va_list args; + struct va_format vaf; /* * Warning messages for this method/object will be disabled after the @@ -1194,10 +1217,13 @@ acpi_ut_predefined_info(const char *module_name, return; } - acpi_os_printf("ACPI Info for %s: ", pathname); - va_start(args, format); - acpi_os_vprintf(format, args); - ACPI_COMMON_MSG_SUFFIX; + + vaf.fmt = format; + vaf.va = &args; + + acpi_os_printf("ACPI Info for %s: %pV" ACPI_COMMON_MSG_SUFFIX_FMT "\n", + pathname, &vaf, ACPI_COMMON_MSG_SUFFIX_ARGS); + va_end(args); }