From patchwork Tue Nov 10 04:18:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 542163 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2D7D014017E for ; Tue, 10 Nov 2015 15:22:33 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 09BD41A0C6A for ; Tue, 10 Nov 2015 15:22:33 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 241431A064D for ; Tue, 10 Nov 2015 15:20:46 +1100 (AEDT) Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Nov 2015 23:20:45 -0500 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 9 Nov 2015 23:20:43 -0500 X-IBM-Helo: d01dlp03.pok.ibm.com X-IBM-MailFrom: stewart@linux.vnet.ibm.com X-IBM-RcptTo: skiboot@lists.ozlabs.org Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 4CD6AC90042 for ; Mon, 9 Nov 2015 23:08:53 -0500 (EST) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAA4KgSJ54395094 for ; Tue, 10 Nov 2015 04:20:42 GMT Received: from d01av03.pok.ibm.com (localhost [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAA4Kgok021466 for ; Mon, 9 Nov 2015 23:20:42 -0500 Received: from oc8180480414.ibm.com ([9.81.198.226]) by d01av03.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id tAA4KUeU020747; Mon, 9 Nov 2015 23:20:41 -0500 Received: from ka1.ozlabs.ibm.com (localhost [127.0.0.1]) by oc8180480414.ibm.com (Postfix) with ESMTP id 043845773; Tue, 10 Nov 2015 15:20:17 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 10 Nov 2015 15:18:29 +1100 Message-Id: <1447129110-21600-36-git-send-email-stewart@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447129110-21600-1-git-send-email-stewart@linux.vnet.ibm.com> References: <1447129110-21600-1-git-send-email-stewart@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15111004-0041-0000-0000-0000024974B5 Subject: [Skiboot] [PATCH 35/36] sparse: fix be64 degrades to integer warnings in fsp-mem-err.c X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" No code changes in skiboot due to being BE hw/fsp/fsp-mem-err.c:162:44: warning: restricted beint64_t degrades to integer hw/fsp/fsp-mem-err.c:263:45: warning: restricted beint64_t degrades to integer hw/fsp/fsp-mem-err.c:266:52: warning: restricted beint64_t degrades to integer Signed-off-by: Stewart Smith --- hw/fsp/fsp-mem-err.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/fsp/fsp-mem-err.c b/hw/fsp/fsp-mem-err.c index 526afaf2ba5e..1f29a001f930 100644 --- a/hw/fsp/fsp-mem-err.c +++ b/hw/fsp/fsp-mem-err.c @@ -159,7 +159,7 @@ static bool is_resilience_event_exist(u64 paddr) list_for_each(&mem_error_list, entry, list) { merr_evt = &entry->data; if ((merr_evt->type == OPAL_MEM_ERR_TYPE_RESILIENCE) && - (merr_evt->u.resilience.physical_address_start + (be64_to_cpu(merr_evt->u.resilience.physical_address_start) == paddr)) { found = 1; break; @@ -260,10 +260,10 @@ static bool update_memory_deallocation_event(u64 paddr_start, u64 paddr_end) list_for_each(&mem_error_list, entry, list) { merr_evt = &entry->data; if ((merr_evt->type == OPAL_MEM_ERR_TYPE_DYN_DALLOC) && - (merr_evt->u.dyn_dealloc.physical_address_start + (be64_to_cpu(merr_evt->u.dyn_dealloc.physical_address_start) == paddr_start)) { found = 1; - if (merr_evt->u.dyn_dealloc.physical_address_end + if (be64_to_cpu(merr_evt->u.dyn_dealloc.physical_address_end) < paddr_end) merr_evt->u.dyn_dealloc.physical_address_end = paddr_end; @@ -353,13 +353,13 @@ static bool fsp_mem_err_msg(u32 cmd_sub_mod, struct fsp_msg *msg) * correctable/Uncorrectable/scrub UE errors with real * address of 4K memory page in which the error occurred. */ - paddr_start = *((u64 *)&msg->data.words[0]); + paddr_start = be64_to_cpu(*((__be64 *)&msg->data.words[0])); printf("Got memory resilience error message for " "paddr=0x%016llux\n", paddr_start); return handle_memory_resilience(cmd_sub_mod, paddr_start); case FSP_CMD_MEM_DYN_DEALLOC: - paddr_start = *((u64 *)&msg->data.words[0]); - paddr_end = *((u64 *)&msg->data.words[2]); + paddr_start = be64_to_cpu(*((__be64 *)&msg->data.words[0])); + paddr_end = be64_to_cpu(*((__be64 *)&msg->data.words[2])); printf("Got dynamic memory deallocation message: " "paddr_start=0x%016llux, paddr_end=0x%016llux\n", paddr_start, paddr_end);