From patchwork Fri Mar 2 09:10:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 144159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 12C04B6ED0 for ; Fri, 2 Mar 2012 20:10:11 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1S3OV7-0002xB-Tk for incoming@patchwork.ozlabs.org; Fri, 02 Mar 2012 09:10:09 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1S3OV4-0002wZ-Ls for fwts-devel@lists.ubuntu.com; Fri, 02 Mar 2012 09:10:06 +0000 Received: from cpc19-craw6-2-0-cust5.croy.cable.virginmedia.com ([77.102.228.6] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1S3OV4-0003G7-Cf for fwts-devel@lists.ubuntu.com; Fri, 02 Mar 2012 09:10:06 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/3] acpi: wmi: reformat source into 80 columns Date: Fri, 2 Mar 2012 09:10:02 +0000 Message-Id: <1330679404-8789-2-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1330679404-8789-1-git-send-email-colin.king@canonical.com> References: <1330679404-8789-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King Signed-off-by: Colin Ian King Acked-by: Keng-Yu Lin Acked-by: Alex Hung --- src/acpi/wmi/wmi.c | 95 ++++++++++++++++++++++++++++++++++------------------ 1 files changed, 62 insertions(+), 33 deletions(-) diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c index 59e4008..c7e3b15 100644 --- a/src/acpi/wmi/wmi.c +++ b/src/acpi/wmi/wmi.c @@ -58,23 +58,23 @@ typedef struct { } __attribute__ ((packed)) fwts_guid_info; static fwts_wmi_known_guid fwts_wmi_known_guids[] = { - { "67C3371D-95A3-4C37-BB61-DD47B491DAAB", "acer-wmi", "Acer" }, - { "431F16ED-0C2B-444C-B267-27DEB140CF9C", "acer-wmi", "Acer" }, - { "6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3", "acer-wmi", "Acer" }, - { "95764E09-FB56-4e83-B31A-37761F60994A", "acer-wmi", "Acer" }, - { "61EF69EA-865C-4BC3-A502-A0DEBA0CB531", "acer-wmi", "Acer" }, - { "676AA15E-6A47-4D9F-A2CC-1E6D18D14026", "acer-wmi", "Acer" }, - { "9DBB5994-A997-11DA-B012-B622A1EF5492", "dell-wmi", "Dell" }, - { "284A0E6B-380E-472A-921F-E52786257FB4", "dell-wmi-aio", "Dell" }, - { "02314822-307C-4F66-BF0E-48AEAEB26CC8", "dell-wmi-aio", "Dell" }, - { "ABBC0F72-8EA1-11D1-00A0-C90629100000", "eeepc-wmi", "Asus" }, - { "97845ED0-4E6D-11DE-8A39-0800200C9A66", "eeepc-wmi", "Asus" }, - { "95F24279-4D7B-4334-9387-ACCDC67EF61C", "hp-wmi", "HP" }, - { "5FB7F034-2C63-45e9-BE91-3D44E2C707E4", "hp-wmi", "HP" }, - { "551A1F84-FBDD-4125-91DB-3EA8F44F1D45", "msi-wmi", "MSI" }, - { "B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2", "msi-wmi", "MSI" }, - { "C364AC71-36DB-495A-8494-B439D472A505", "tc110-wmi", "HP Compaq" }, - { NULL, NULL, NULL } + { "67C3371D-95A3-4C37-BB61-DD47B491DAAB", "acer-wmi", "Acer" }, + { "431F16ED-0C2B-444C-B267-27DEB140CF9C", "acer-wmi", "Acer" }, + { "6AF4F258-B401-42FD-BE91-3D4AC2D7C0D3", "acer-wmi", "Acer" }, + { "95764E09-FB56-4e83-B31A-37761F60994A", "acer-wmi", "Acer" }, + { "61EF69EA-865C-4BC3-A502-A0DEBA0CB531", "acer-wmi", "Acer" }, + { "676AA15E-6A47-4D9F-A2CC-1E6D18D14026", "acer-wmi", "Acer" }, + { "9DBB5994-A997-11DA-B012-B622A1EF5492", "dell-wmi", "Dell" }, + { "284A0E6B-380E-472A-921F-E52786257FB4", "dell-wmi-aio","Dell" }, + { "02314822-307C-4F66-BF0E-48AEAEB26CC8", "dell-wmi-aio","Dell" }, + { "ABBC0F72-8EA1-11D1-00A0-C90629100000", "eeepc-wmi", "Asus" }, + { "97845ED0-4E6D-11DE-8A39-0800200C9A66", "eeepc-wmi", "Asus" }, + { "95F24279-4D7B-4334-9387-ACCDC67EF61C", "hp-wmi", "HP" }, + { "5FB7F034-2C63-45e9-BE91-3D44E2C707E4", "hp-wmi", "HP" }, + { "551A1F84-FBDD-4125-91DB-3EA8F44F1D45", "msi-wmi", "MSI" }, + { "B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2", "msi-wmi", "MSI" }, + { "C364AC71-36DB-495A-8494-B439D472A505", "tc110-wmi", "HP Compaq" }, + { NULL, NULL, NULL } }; static fwts_wmi_known_guid *wmi_find_guid(char *guid) @@ -111,7 +111,8 @@ static char *wmi_wdg_flags_to_text(const fwts_wmi_flags flags) return buffer; } -static void wmi_parse_wdg_data(fwts_framework *fw, int size, uint8_t *wdg_data, bool *result) +static void wmi_parse_wdg_data(fwts_framework *fw, + int size, uint8_t *wdg_data, bool *result) { int i; int advice_given = 0; @@ -128,32 +129,54 @@ static void wmi_parse_wdg_data(fwts_framework *fw, int size, uint8_t *wdg_data, known = wmi_find_guid(guidstr); if (info->flags & FWTS_WMI_METHOD) { - fwts_log_info(fw, "Found WMI Method WM%c%c with GUID: %s, Instance 0x%2.2x", info->obj_id[0], info->obj_id[1], guidstr, info->instance); + fwts_log_info(fw, + "Found WMI Method WM%c%c with GUID: %s, " + "Instance 0x%2.2x", + info->obj_id[0], info->obj_id[1], + guidstr, info->instance); } else if (info->flags & FWTS_WMI_EVENT) { - fwts_log_info(fw, "Found WMI Event, Notifier ID: 0x%2.2x, GUID: %s, Instance 0x%2.2x", info->notify_id, guidstr, info->instance); + fwts_log_info(fw, + "Found WMI Event, Notifier ID: 0x%2.2x, " + "GUID: %s, Instance 0x%2.2x", + info->notify_id, guidstr, info->instance); if (known == NULL) { fwts_failed(fw, LOG_LEVEL_MEDIUM, "WMIUnknownGUID", - "GUID %s is unknown to the kernel, a driver may need to be implemented for this GUID.", guidstr); + "GUID %s is unknown to the kernel, " + "a driver may need to be implemented " + "for this GUID.", guidstr); *result = true; if (!advice_given) { advice_given = 1; fwts_log_nl(fw); fwts_log_advice(fw, - "ADVICE: A WMI driver probably needs to be written for this event."); + "ADVICE: A WMI driver probably " + "needs to be written for this " + "event."); fwts_log_advice(fw, - "It can checked for using: wmi_has_guid(\"%s\").", guidstr); + "It can checked for using: " + "wmi_has_guid(\"%s\").", + guidstr); fwts_log_advice(fw, - "One can install a notify handler using wmi_install_notify_handler(\"%s\", handler, NULL). ", guidstr); + "One can install a notify " + "handler using " + "wmi_install_notify_handler" + "(\"%s\", handler, NULL). ", + guidstr); fwts_log_advice(fw, - "http://lwn.net/Articles/391230 describes how to write an appropriate driver."); + "http://lwn.net/Articles/391230" + " describes how to write an " + "appropriate driver."); fwts_log_nl(fw); } } } else { char *flags = wmi_wdg_flags_to_text(info->flags); - fwts_log_info(fw, "Found WMI Object, Object ID %c%c, GUID: %s, Instance 0x%2.2x, Flags: %2.2x %s", - info->obj_id[0], info->obj_id[1], guidstr, info->instance, info->flags, flags); + fwts_log_info(fw, + "Found WMI Object, Object ID %c%c, " + "GUID: %s, Instance 0x%2.2x, Flags: %2.2x %s", + info->obj_id[0], info->obj_id[1], guidstr, + info->instance, info->flags, flags); } if (known) { @@ -167,7 +190,8 @@ static void wmi_parse_wdg_data(fwts_framework *fw, int size, uint8_t *wdg_data, } } -static void wmi_get_wdg_data(fwts_framework *fw, fwts_list_link *item, int size, uint8_t *wdg_data) +static void wmi_get_wdg_data(fwts_framework *fw, + fwts_list_link *item, int size, uint8_t *wdg_data) { char *str; uint8_t *data = wdg_data; @@ -201,7 +225,8 @@ static void wmi_get_wdg_data(fwts_framework *fw, fwts_list_link *item, int size, if (data > wdg_data + size) { fwts_failed(fw, LOG_LEVEL_HIGH, "WMI_WDGBufferBad", - "_WDG buffer was more than %d bytes long!", size); + "_WDG buffer was more than %d bytes " + "long!", size); fwts_tag_failed(fw, FWTS_TAG_ACPI_BAD_LENGTH); return; } @@ -210,7 +235,8 @@ static void wmi_get_wdg_data(fwts_framework *fw, fwts_list_link *item, int size, return; } -static void wmi_parse_for_wdg(fwts_framework *fw, fwts_list_link *item, int *count, bool *result) +static void wmi_parse_for_wdg(fwts_framework *fw, + fwts_list_link *item, int *count, bool *result) { uint8_t *wdg_data; int size; @@ -273,7 +299,8 @@ static void wmi_parse_for_wdg(fwts_framework *fw, fwts_list_link *item, int *cou } } -static int wmi_table(fwts_framework *fw, char *table, int which, char *name, bool *result) +static int wmi_table(fwts_framework *fw, + char *table, int which, char *name, bool *result) { fwts_list_link *item; fwts_list* iasl_output; @@ -284,7 +311,8 @@ static int wmi_table(fwts_framework *fw, char *table, int which, char *name, boo if (ret == FWTS_NO_TABLE) /* Nothing more to do */ return ret; if (ret != FWTS_OK) { - fwts_aborted(fw, "Cannot disassemble and parse for WMI information."); + fwts_aborted(fw, "Cannot disassemble and parse for " + "WMI information."); return FWTS_ERROR; } @@ -345,7 +373,8 @@ static fwts_framework_minor_test wmi_tests[] = { }; static fwts_framework_ops wmi_ops = { - .description = "Extract and analyse Windows Management Instrumentation (WMI).", + .description = "Extract and analyse Windows Management " + "Instrumentation (WMI).", .minor_tests = wmi_tests };