From patchwork Fri Jan 23 18:20:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 43689 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 26BED218DB for ; Fri, 23 Jan 2015 18:20:50 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id gm9sf5122954lab.0 for ; Fri, 23 Jan 2015 10:20:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Eblycb5Fuu8OvP0rUJ8S9lHazYPus3CL3IU17r5mcP0=; b=EDSzsqFaGafoX0Gg7sy2cmp5eXcYlM0uHOyQrFo4pyNOcWyZe/MpZOSrO5mbhRkX6U NczAoaGyA3hz+a2AyhVaypp+l/aJbiIO/1WdQqGT/bQzpW5997oYKckvoQbE2nR7davf Z0WiBRmnwYvBpX7isHh+4pdD/6VfqnDOXDZNLzodV4PpBMLNqwcRFbPTtLDbc1+mjxpS Razh8OtEcaNiB4vNQiTS88hORA2qQYsAKJmmrPsmDSBWfhmK58lMH/73a/reLLqqfYHx nLXwDKvrQSR+10mNmMGDJIq82A9KEoTb0MABFIfNCxCixI1qWutFv2CCFkJPQ+uZBdcr 1ZVQ== X-Gm-Message-State: ALoCoQlMw/cCfjkRUR3hMZdzcRh78S5vGWBZihV28kPWAo+FBFEMrOlOjvnJRhndboGmWZVDxucn X-Received: by 10.180.105.97 with SMTP id gl1mr483259wib.7.1422037248929; Fri, 23 Jan 2015 10:20:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.229 with SMTP id e5ls253115laa.105.gmail; Fri, 23 Jan 2015 10:20:48 -0800 (PST) X-Received: by 10.152.27.130 with SMTP id t2mr8706844lag.28.1422037248773; Fri, 23 Jan 2015 10:20:48 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id p9si2033351lap.51.2015.01.23.10.20.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 10:20:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id b6so8406699lbj.11 for ; Fri, 23 Jan 2015 10:20:48 -0800 (PST) X-Received: by 10.112.131.1 with SMTP id oi1mr8760343lbb.2.1422037248537; Fri, 23 Jan 2015 10:20:48 -0800 (PST) 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.112.9.200 with SMTP id c8csp344122lbb; Fri, 23 Jan 2015 10:20:47 -0800 (PST) X-Received: by 10.66.192.106 with SMTP id hf10mr13463256pac.90.1422037235669; Fri, 23 Jan 2015 10:20:35 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id fk6si2545814pab.196.2015.01.23.10.20.33 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 23 Jan 2015 10:20:35 -0800 (PST) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1YEiqK-0001Pg-Pv; Fri, 23 Jan 2015 18:20:28 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Greg Bellows , =?UTF-8?q?Alex=20Benn=C3=A9e?= , "Edgar E. Iglesias" , Andrew Jones Subject: [PATCH 11/11] target-arm: Fix brace style in reindented code Date: Fri, 23 Jan 2015 18:20:28 +0000 Message-Id: <1422037228-5363-12-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1422037228-5363-1-git-send-email-peter.maydell@linaro.org> References: <1422037228-5363-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) 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: , This patch fixes the brace style in the code reindented in the previous commit. Signed-off-by: Peter Maydell --- target-arm/helper.c | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 3a23af8..cc80829 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -4643,18 +4643,20 @@ static inline int check_ap(CPUARMState *env, ARMMMUIdx mmu_idx, return PAGE_READ | PAGE_WRITE; } - if (access_type == 1) + if (access_type == 1) { prot_ro = 0; - else + } else { prot_ro = PAGE_READ; + } switch (ap) { case 0: if (arm_feature(env, ARM_FEATURE_V7)) { return 0; } - if (access_type == 1) + if (access_type == 1) { return 0; + } switch (regime_sctlr(env, mmu_idx) & (SCTLR_S | SCTLR_R)) { case SCTLR_S: return is_user ? 0 : PAGE_READ; @@ -4666,10 +4668,11 @@ static inline int check_ap(CPUARMState *env, ARMMMUIdx mmu_idx, case 1: return is_user ? 0 : PAGE_READ | PAGE_WRITE; case 2: - if (is_user) + if (is_user) { return prot_ro; - else + } else { return PAGE_READ | PAGE_WRITE; + } case 3: return PAGE_READ | PAGE_WRITE; case 4: /* Reserved. */ @@ -4679,8 +4682,9 @@ static inline int check_ap(CPUARMState *env, ARMMMUIdx mmu_idx, case 6: return prot_ro; case 7: - if (!arm_feature (env, ARM_FEATURE_V6K)) + if (!arm_feature(env, ARM_FEATURE_V6K)) { return 0; + } return prot_ro; default: abort(); @@ -5191,17 +5195,20 @@ static int get_phys_addr_mpu(CPUARMState *env, uint32_t address, *phys_ptr = address; for (n = 7; n >= 0; n--) { base = env->cp15.c6_region[n]; - if ((base & 1) == 0) + if ((base & 1) == 0) { continue; + } mask = 1 << ((base >> 1) & 0x1f); /* Keep this shift separate from the above to avoid an (undefined) << 32. */ mask = (mask << 1) - 1; - if (((base ^ address) & ~mask) == 0) + if (((base ^ address) & ~mask) == 0) { break; + } } - if (n < 0) + if (n < 0) { return 2; + } if (access_type == 2) { mask = env->cp15.pmsav5_insn_ap; @@ -5213,21 +5220,24 @@ static int get_phys_addr_mpu(CPUARMState *env, uint32_t address, case 0: return 1; case 1: - if (is_user) - return 1; + if (is_user) { + return 1; + } *prot = PAGE_READ | PAGE_WRITE; break; case 2: *prot = PAGE_READ; - if (!is_user) + if (!is_user) { *prot |= PAGE_WRITE; + } break; case 3: *prot = PAGE_READ | PAGE_WRITE; break; case 5: - if (is_user) + if (is_user) { return 1; + } *prot = PAGE_READ; break; case 6: