From patchwork Wed Jun 28 14:58:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9814737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 95F1260365 for ; Wed, 28 Jun 2017 15:39:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 867B71FFAE for ; Wed, 28 Jun 2017 15:39:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AC2C251F4; Wed, 28 Jun 2017 15:39:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0E19A1FFAE for ; Wed, 28 Jun 2017 15:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=nUCdLpt5RYuDgtYsYHDfFEDrThNmP2IMFBOSSsxmbpw=; b=iYI fljW+s8m1Xi1B9SwOI2t73fO3QDCO/rf6dS+mUqir5jRpOS/Jdx1xg8ic2N+9XcfYIu9fxgK0Q3Dj KGCqoL1pnXi+sIKoeo65rXwh5IiOeEXRbKDZGu57J8594GaLxMAZ4DKYk2fLLtBq/1c06SowtziHX dJuIwO/rnRpmfbWHfIGlvwgK98fXurc2xuTgcips9PeoeTek2EoRpDmYQF+Ox7Updhre7mhzBW1FO tQXLk1UdJ22BVHpcq5h63D3JN2NKSfgt8bxsJylMiV2fGPcIly9EYReQ1K+6xIxeWtG6t9QZbour5 BsuY9jWYA7HZXSdZlgT7VEV+AwoaL+g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQF4G-00057R-41; Wed, 28 Jun 2017 15:39:48 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQEQI-0004sy-Ro for linux-arm-kernel@lists.infradead.org; Wed, 28 Jun 2017 14:58:33 +0000 Received: by mail-wm0-x243.google.com with SMTP id p204so7191177wmg.1 for ; Wed, 28 Jun 2017 07:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=BmIpCB/qgNwDIbWc1fFKtmhMxpoPU8uxLu5xdbyiBWM=; b=lo/M8wZ4EIbWT+gyGpwHsdRBhdxMmTcrXb8NcXY/dFRWRxN0s3wCqHKiIagY3E4j+b ln6vPWJDekGuKU9tpFqfniHvgijnwpkGjGG6ETLSZHe6nJynGyaxOiAf07vfZMgz+lxx P3cMfiBe6XN3kpVU2RsMkfF+rlHRezIOi+706FYWnHVj8CRdJdDKN4oOGSKhtBqx2HDV 3LgiLl+4X3MfODhAhnRgpBRjfXW9HuADtrF8wr9rVFuIaEUm9aH72yZMe7LUulafWltu trthLFF2YM/cBlHWzDvAO92j3JTQ19a+ooZcPRyoKo0MPdG/XeqBq/e3K+dXtT4zOIXK kfeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BmIpCB/qgNwDIbWc1fFKtmhMxpoPU8uxLu5xdbyiBWM=; b=Da0jTZEPPyCtovIbIs7IpKpWcS/hmNZkHk8WB2sBLompO31B0jzLLoDdTAP9LB4zM+ ur4y51opyk+zlCt4KgIQNHeKdU/d1wYFt78dysAnX4CPc9IMhxZQ5fLpLBJddJ4s3t6r iYE4MmILMUX37Y7XvQqxVB6nncnBN9pMfY28aLCFSyCTWpG2UcNIKByT0sgU4EAssoNl vcHlsKMJgWUWSyQi75v/S8eucY/YTBHAHKpY/ARj3By1bFKlrxaiO4Hyy0GbGZKH4KAv Vq41s1w3R7hWllSgKW3FTs6owO0ctVs6ci3MqrjGH1w/MnsZvsBd2meKDkvldxgcuLts 1JEQ== X-Gm-Message-State: AKS2vOzB8d4xBNomLvOHo0pgPr61XKPUwaL1/SqIriVDJDDUOg7d0E97 RQmx4yH9fDF4gw== X-Received: by 10.80.165.104 with SMTP id z37mr8023259edb.60.1498661889142; Wed, 28 Jun 2017 07:58:09 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:837:f300:dc41:f6b3:4608:d7c8]) by smtp.gmail.com with ESMTPSA id j56sm2107802eda.58.2017.06.28.07.58.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jun 2017 07:58:08 -0700 (PDT) From: Luc Van Oostenryck To: Will Deacon Subject: [PATCH] arm64: fix endianness annotation in acpi_parking_protocol.c Date: Wed, 28 Jun 2017 16:58:07 +0200 Message-Id: <20170628145807.24631-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170628_075831_442667_6703EAA6 X-CRM114-Status: GOOD ( 12.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Catalin Marinas , Laura Abbott , Luc Van Oostenryck , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Here both variables 'cpu_id' and 'entry_point' are read via read[lq]_relaxed(), from a little-endian annotated pointer and then used as a native endian value. This is correct since the read[lq]() family of function internally do a little-to-native endian conversion. But in this case, it is wrong to declare these variable as little-endian since there are native ones. Fix this by changing the declaration of these variables as 'u32' or 'u64' instead of '__le32' / '__le64'. Signed-off-by: Luc Van Oostenryck --- arch/arm64/kernel/acpi_parking_protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/acpi_parking_protocol.c b/arch/arm64/kernel/acpi_parking_protocol.c index f35e80aad..98a20e587 100644 --- a/arch/arm64/kernel/acpi_parking_protocol.c +++ b/arch/arm64/kernel/acpi_parking_protocol.c @@ -71,7 +71,7 @@ static int acpi_parking_protocol_cpu_boot(unsigned int cpu) { struct cpu_mailbox_entry *cpu_entry = &cpu_mailbox_entries[cpu]; struct parking_protocol_mailbox __iomem *mailbox; - __le32 cpu_id; + u32 cpu_id; /* * Map mailbox memory with attribute device nGnRE (ie ioremap - @@ -123,7 +123,7 @@ static void acpi_parking_protocol_cpu_postboot(void) int cpu = smp_processor_id(); struct cpu_mailbox_entry *cpu_entry = &cpu_mailbox_entries[cpu]; struct parking_protocol_mailbox __iomem *mailbox = cpu_entry->mailbox; - __le64 entry_point; + u64 entry_point; entry_point = readq_relaxed(&mailbox->entry_point); /*