From patchwork Mon Aug 12 10:29:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: naresh.bhat@linaro.org X-Patchwork-Id: 19008 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3CE35246B8 for ; Mon, 12 Aug 2013 10:29:52 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id 1sf8219093qee.2 for ; Mon, 12 Aug 2013 03:29:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=fygJiu9xo13nbi8PTFv1vbJgRu8KLd9DQDuYh89SFWk=; b=U7RBh8jXCESz9vRufGRhLNq6MT4htQ3sXNUdWP+fSVwYQXfb9kWVIxd/bCjkMvHuzw uDn8Y5Ns93DUG1IpPHt5DtxzqGGuixJRJqZlqcIFXlIzNe+FhOQK5BM7ABf3zpw89pjB u2NYAk9Unxvz9KfKnanORS+PBIB0qLKoDBA9SN7aqxUihcgqEsEQXZaZTHUTiOK4L7eC 5vHiZiavxFuKb3pBFiuKrQ/cK2jATfj+g3QE3L+VXISLy+pyntQAqNKATif+zNnv3Z/8 d/Q8SjW3j9dKV7w/iWNQhTOZXTzCJryMBDFY7JU3eYPcNeqMlc8v9VuQLDRaQo4F/DG9 aaew== X-Received: by 10.236.137.210 with SMTP id y58mr1926676yhi.28.1376303391818; Mon, 12 Aug 2013 03:29:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.1.168 with SMTP id 8ls2135182qen.8.gmail; Mon, 12 Aug 2013 03:29:51 -0700 (PDT) X-Received: by 10.52.73.135 with SMTP id l7mr5158494vdv.9.1376303391672; Mon, 12 Aug 2013 03:29:51 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id vr9si8117421vcb.51.2013.08.12.03.29.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 03:29:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id x14so5673715vbb.9 for ; Mon, 12 Aug 2013 03:29:51 -0700 (PDT) X-Gm-Message-State: ALoCoQmFMxgdi8vwoUKW/5uPpFtc0KmFtkyRic5vW12tvTMzfpuePqWQ+hcObL1agVpeMJXLLtpc X-Received: by 10.52.180.229 with SMTP id dr5mr9654229vdc.20.1376303391549; Mon, 12 Aug 2013 03:29:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp87883vcz; Mon, 12 Aug 2013 03:29:50 -0700 (PDT) X-Received: by 10.68.210.103 with SMTP id mt7mr23501078pbc.179.1376303390451; Mon, 12 Aug 2013 03:29:50 -0700 (PDT) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by mx.google.com with ESMTPS id pn6si20930483pbb.201.2013.08.12.03.29.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 03:29:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.178 is neither permitted nor denied by best guess record for domain of naresh.bhat@linaro.org) client-ip=209.85.192.178; Received: by mail-pd0-f178.google.com with SMTP id w10so3252970pde.37 for ; Mon, 12 Aug 2013 03:29:50 -0700 (PDT) X-Received: by 10.68.90.130 with SMTP id bw2mr21840993pbb.89.1376303389901; Mon, 12 Aug 2013 03:29:49 -0700 (PDT) Received: from localhost.localdomain ([117.213.179.208]) by mx.google.com with ESMTPSA id a5sm36403515pbw.4.2013.08.12.03.29.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 12 Aug 2013 03:29:49 -0700 (PDT) From: naresh.bhat@linaro.org To: fwts-devel@lists.ubuntu.com Cc: patches@linaro.org, linaro-acpi@lists.linaro.org, colin.king@canonical.com, ivan.hu@canonical.com, Naresh Bhat Subject: [PATCH] Fix typecast warning on aarch64 Date: Mon, 12 Aug 2013 15:59:10 +0530 Message-Id: <1376303350-4965-1-git-send-email-naresh.bhat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: naresh.bhat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Naresh Bhat Signed-off-by: Naresh Bhat This patch fix all typecast warnings being treated as errors occured while compiling on ARMv8 aarch64 architecture. --- src/acpi/method/method.c | 92 +++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index f46fdff..327a887 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -976,14 +976,14 @@ static void method_test_HID_return( tmp, sizeof(tmp))) fwts_passed(fw, "%s returned an integer " "0x%8.8" PRIx64 " (EISA ID %s).", - name, obj->Integer.Value, tmp); + name, (long unsigned int)obj->Integer.Value, tmp); else fwts_failed(fw, LOG_LEVEL_MEDIUM, "MethodHIDInvalidInteger", "%s returned a integer 0x%8.8" PRIx64 " " "(EISA ID %s) but the this is not a valid " "EISA ID encoded PNP ID.", - name, obj->Integer.Value, tmp); + name, (long unsigned int)obj->Integer.Value, tmp); break; default: fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_HIDBadReturnType", @@ -1865,7 +1865,7 @@ static void method_test_FIX_return( "%s returned an integer " "0x%8.8" PRIx64 " in package element " "%" PRIu32 " that is not a valid " - "EISA ID.", name, obj->Integer.Value, i); + "EISA ID.", name, (long unsigned int)obj->Integer.Value, i); failed = true; } } @@ -2092,7 +2092,7 @@ static void method_test_SEG_return( "%s returned value 0x%8.8" PRIx64 " and some of the " "upper 16 reserved bits are set when they " "should in fact be zero.", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); } else method_passed_sane_uint64(fw, name, obj->Integer.Value); @@ -2333,9 +2333,9 @@ static void method_test_Sx__return( } fwts_log_info(fw, "%s PM1a_CNT.SLP_TYP value: 0x%8.8" PRIx64, name, - obj->Package.Elements[0].Integer.Value); + (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_log_info(fw, "%s PM1b_CNT.SLP_TYP value: 0x%8.8" PRIx64, name, - obj->Package.Elements[1].Integer.Value); + (long unsigned int)obj->Package.Elements[1].Integer.Value); if (!failed) method_passed_sane(fw, name, "package"); @@ -2484,7 +2484,7 @@ static void method_test_CSD_return( "%s sub-package %d element 0 (NumEntries) " "was expected to have value 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[0].Integer.Value); + (long unsigned int)pkg->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -2496,7 +2496,7 @@ static void method_test_CSD_return( "was expected to have value 1, instead it " "was 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[1].Integer.Value); + (long unsigned int)pkg->Package.Elements[1].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -2511,7 +2511,7 @@ static void method_test_CSD_return( "0xfd (SW_ANY) or 0xfe (HW_ALL), instead it " "was 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[3].Integer.Value); + (long unsigned int)pkg->Package.Elements[3].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -2581,7 +2581,7 @@ static void method_test_CST_return( "%" PRIu32 " returned C state sub-elements yet _CST " "reports it has %" PRIu64 " C states.", name, obj->Package.Count - 1, - obj->Package.Elements[0].Integer.Value); + (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); return; } @@ -2677,9 +2677,9 @@ static void method_test_CST_return( fwts_log_info_verbatum(fw, "%2" PRIu32 " C%" PRIu64 " %6" PRIu64 " %6" PRIu64, i, - pkg->Package.Elements[1].Integer.Value, - pkg->Package.Elements[2].Integer.Value, - pkg->Package.Elements[3].Integer.Value); + (long unsigned int)pkg->Package.Elements[1].Integer.Value, + (long unsigned int)pkg->Package.Elements[2].Integer.Value, + (long unsigned int)pkg->Package.Elements[3].Integer.Value); } else { fwts_log_info_verbatum(fw, "%2" PRIu32 " -- ----- -----", i); @@ -2850,10 +2850,10 @@ static void method_test_PSS_return( fwts_log_info_verbatum(fw, " %3d %7" PRIu64 " %8" PRIu64 " %5" PRIu64 " %5" PRIu64, i, - pstate->Package.Elements[0].Integer.Value, - pstate->Package.Elements[1].Integer.Value, - pstate->Package.Elements[2].Integer.Value, - pstate->Package.Elements[3].Integer.Value); + (long unsigned int)pstate->Package.Elements[0].Integer.Value, + (long unsigned int)pstate->Package.Elements[1].Integer.Value, + (long unsigned int)pstate->Package.Elements[2].Integer.Value, + (long unsigned int)pstate->Package.Elements[3].Integer.Value); } else { fwts_log_info_verbatum(fw, " %3d ---- ----- -- -- (invalid)", i); @@ -3004,7 +3004,7 @@ static void method_test_TSD_return( " element 0 (NumEntries) " "was expected to have value 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[0].Integer.Value); + (long unsigned int)pkg->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3017,7 +3017,7 @@ static void method_test_TSD_return( "was expected to have value 1, instead it " "was 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[1].Integer.Value); + (long unsigned int)pkg->Package.Elements[1].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3033,7 +3033,7 @@ static void method_test_TSD_return( "0xfd (SW_ANY) or 0xfe (HW_ALL), instead it " "was 0x%" PRIx64 ".", name, i, - pkg->Package.Elements[3].Integer.Value); + (long unsigned int)pkg->Package.Elements[3].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3140,7 +3140,7 @@ static void method_test_TSS_return( "was expected to have value 1..100, instead " "was %" PRIu64 ".", name, i, - pkg->Package.Elements[0].Integer.Value); + (long unsigned int)pkg->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3159,11 +3159,11 @@ static void method_test_TSS_return( fwts_log_info_verbatum(fw, " %3d %3" PRIu64 "%% %7" PRIu64 " %7" PRIu64 " %2.2" PRIx64 " %2.2" PRIx64, i, - pkg->Package.Elements[0].Integer.Value, - pkg->Package.Elements[1].Integer.Value, - pkg->Package.Elements[2].Integer.Value, - pkg->Package.Elements[3].Integer.Value, - pkg->Package.Elements[4].Integer.Value); + (long unsigned int)pkg->Package.Elements[0].Integer.Value, + (long unsigned int)pkg->Package.Elements[1].Integer.Value, + (long unsigned int)pkg->Package.Elements[2].Integer.Value, + (long unsigned int)pkg->Package.Elements[3].Integer.Value, + (long unsigned int)pkg->Package.Elements[4].Integer.Value); } else { fwts_log_info_verbatum(fw, " %3d ---- ----- ----- -- -- (invalid)", i); @@ -3243,7 +3243,7 @@ static void method_test_GCP_return( "%s returned %" PRId64 ", should be between 0 and 15, " "one or more of the reserved bits 4..31 seem " "to be set.", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); } else method_passed_sane_uint64(fw, name, obj->Integer.Value); @@ -3308,7 +3308,7 @@ static void method_test_GWS_return( "%s returned %" PRIu64 ", should be between 0 and 3, " "one or more of the reserved bits 2..31 seem " "to be set.", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); } else method_passed_sane_uint64(fw, name, obj->Integer.Value); @@ -3400,13 +3400,13 @@ static void method_test_SBS_return( switch (obj->Integer.Value) { case 0 ... 4: fwts_passed(fw, "%s correctly returned value %" PRIu64 " %s", - name, obj->Integer.Value, + name, (long unsigned int)obj->Integer.Value, sbs_info[obj->Integer.Value]); break; default: fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_SBSReturn", "%s returned %" PRIu64 ", should be between 0 and 4.", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); fwts_advice(fw, "Smart Battery %s is incorrectly informing " @@ -3485,7 +3485,7 @@ static void method_test_BIF_return( "Method_BIFBadUnits", "%s: Expected Power Unit (Element 0) to be " "0 (mWh) or 1 (mAh), got 0x%8.8" PRIx64 ".", - name, obj->Package.Elements[0].Integer.Value); + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3522,7 +3522,7 @@ static void method_test_BIF_return( "%s: Expected Battery Technology Unit " "(Element 3) to be 0 (Primary) or 1 " "(Secondary), got 0x%8.8" PRIx64 ".", - name, obj->Package.Elements[3].Integer.Value); + name, (long unsigned int)obj->Package.Elements[3].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3630,7 +3630,7 @@ static void method_test_BIX_return( "%s: Expected %s (Element 1) to be " "0 (mWh) or 1 (mAh), got 0x%8.8" PRIx64 ".", name, elements[1].name, - obj->Package.Elements[1].Integer.Value); + (long unsigned int)obj->Package.Elements[1].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3670,7 +3670,7 @@ static void method_test_BIX_return( "(Element 4) to be 0 (Primary) or 1 " "(Secondary), got 0x%8.8" PRIx64 ".", name, elements[4].name, - obj->Package.Elements[4].Integer.Value); + (long unsigned int)obj->Package.Elements[4].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3786,7 +3786,7 @@ static void method_test_BST_return( "Method_BSTBadState", "%s: Expected Battery State (Element 0) to " "be 0..7, got 0x%8.8" PRIx64 ".", - name, obj->Package.Elements[0].Integer.Value); + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3797,7 +3797,7 @@ static void method_test_BST_return( "%s: Battery State (Element 0) is " "indicating both charging and discharginng " "which is not allowed. Got value 0x%8.8" PRIx64 ".", - name, obj->Package.Elements[0].Integer.Value); + name, (long unsigned int)obj->Package.Elements[0].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -3943,7 +3943,7 @@ static void method_test_PSR_return( "Method_PSRZeroOrOne", "%s returned 0x%8.8" PRIx64 ", expected 0 " "(offline) or 1 (online)", - name, obj->Integer.Value); + name, (long unsigned int)obj->Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); } else method_passed_sane_uint64(fw, name, obj->Integer.Value); @@ -4117,7 +4117,7 @@ static void method_test_THERM_return( "%s correctly returned sane looking " "value 0x%8.8" PRIx64 " (%5.1f degrees K)", method, - obj->Integer.Value, + (long unsigned int)obj->Integer.Value, (float)((uint64_t)obj->Integer.Value) / 10.0); } else { fwts_failed(fw, LOG_LEVEL_MEDIUM, @@ -4126,7 +4126,7 @@ static void method_test_THERM_return( "0 degrees C: 0x%8.8" PRIx64 " (%5.1f " "degrees K)", method, - obj->Integer.Value, + (long unsigned int)obj->Integer.Value, (float)((uint64_t)obj->Integer.Value) / 10.0); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); fwts_advice(fw, @@ -4596,8 +4596,8 @@ static void method_test_BCL_return( " power (%" PRIu64 ") is less than " "brightness level when on " "battery power (%" PRIu64 ").", - obj->Package.Elements[0].Integer.Value, - obj->Package.Elements[1].Integer.Value); + (long unsigned int)obj->Package.Elements[0].Integer.Value, + (long unsigned int)obj->Package.Elements[1].Integer.Value); fwts_tag_failed(fw, FWTS_TAG_ACPI_METHOD_RETURN); failed = true; } @@ -4611,8 +4611,8 @@ static void method_test_BCL_return( "than brightness level %" PRIu64 " (index %d" PRIu32 "), should " "be in ascending order.", - obj->Package.Elements[i].Integer.Value, i, - obj->Package.Elements[i+1].Integer.Value, i+1); + (long unsigned int)obj->Package.Elements[i].Integer.Value, i, + (long unsigned int)obj->Package.Elements[i+1].Integer.Value, i+1); ascending_levels = true; failed = true; } @@ -4629,14 +4629,14 @@ static void method_test_BCL_return( } fwts_log_info(fw, "Brightness levels for %s:" ,name); - fwts_log_info_verbatum(fw, " Level on full power : %" PRIu64, obj->Package.Elements[0].Integer.Value); - fwts_log_info_verbatum(fw, " Level on battery power: %" PRIu64, obj->Package.Elements[1].Integer.Value); + fwts_log_info_verbatum(fw, " Level on full power : %" PRIu64, (long unsigned int)obj->Package.Elements[0].Integer.Value); + fwts_log_info_verbatum(fw, " Level on battery power: %" PRIu64, (long unsigned int)obj->Package.Elements[1].Integer.Value); for (i = 2; i < obj->Package.Count; i++) { char tmp[12]; snprintf(tmp, sizeof(tmp), "%s%" PRIu64, i == 2 ? "" : ", ", - obj->Package.Elements[i].Integer.Value); + (long unsigned int)obj->Package.Elements[i].Integer.Value); str = fwts_realloc_strcat(str, tmp); if (!str) break;