From patchwork Fri Feb 12 18:48:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 381861 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp3186626jah; Fri, 12 Feb 2021 11:06:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/oQgMuRWTNdc1cGdus+8hDcw7mlMeADqTJ8n96OE5DCLczYLbzM/ooZB+qHVmRyGkoft6 X-Received: by 2002:a25:57d6:: with SMTP id l205mr5584126ybb.363.1613156775967; Fri, 12 Feb 2021 11:06:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613156775; cv=none; d=google.com; s=arc-20160816; b=ozYNbhbTqgWjxI3UfkZjt0lItfaZ6iQIJo/6fQ2vbtRcO9OFJI70AqJcyeD+c8+9xc CgIcXdAqIyE0mk+dBobGpm5R58Jcr37/lUoFuDSa5SCw6HS51Cp5WWREAV+aCEwguHv+ eIc8X2maQmq8H/KxercAvJCERdn7P8rFbhQTBpQ+wowK8ckfU/BMI+fEyJnlpgbSI6Rv BqlGHdHivoJQiyso28QXGxYaS68/4oWC216BBcKxdk+BPAOINl8ixf+9WKRTnYCkW0pp KByFGLebGXkZciw5R7S8lFeZIX/Qr3YF430sAkMP6u7V9xybxib2EidtNF7bUg/8hDtM gTiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=xhhF4cnD2bQGGauP5wAsskp8GPwXgWKUSZeMzfZve48=; b=r66I7SsI1Xq9WfCE3IwhJVXLAemSrlKLOTviGB6iUFIiXCrrWpb8Z4dPAbGMemXyaV W+Fmo3FGSbLDF2S11t6pXPjTGtWjXEstIxICvKCpjDthJgfZYlEDZ9pTDlFJfL2Xr9N/ vzmnlp6+k2rEZe4rJTaDnkrWPwxYXTP1HF/7mdEDg8LRaepYi7B7WXeHIBTTtEcxnBN8 UqqpZgHIcZ5ISH4/90VML7g5GgMV9iwBj43TpO3w5U5zPAFnvDWjZTbagTLeW2sCnp8o Ren8n9oftC4cBGxQND5PgogK360tKeo0dOO1OY9JLb5kjnpjppSWnSdEMY3aQE/+uOWU nldg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hbZByw+a; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x3si4125192ybk.172.2021.02.12.11.06.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Feb 2021 11:06:15 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hbZByw+a; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAdlf-00069v-DH for patch@linaro.org; Fri, 12 Feb 2021 14:06:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAdVK-0001Xg-6z for qemu-devel@nongnu.org; Fri, 12 Feb 2021 13:49:23 -0500 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:37156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAdVB-0007lD-4A for qemu-devel@nongnu.org; Fri, 12 Feb 2021 13:49:21 -0500 Received: by mail-pg1-x531.google.com with SMTP id z21so252980pgj.4 for ; Fri, 12 Feb 2021 10:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xhhF4cnD2bQGGauP5wAsskp8GPwXgWKUSZeMzfZve48=; b=hbZByw+aEjdrjdkAzS+n/JlDa+c+d4dS9jRIAsfwE3oCrPTgdvisCppYx4AwgPa18Z CQ/E+uJk1IHVKFbvYUfF6/c+0v+YobHg3k574aYDuSAeU+OLKW2WVW99B4wi+bc2KwPc 3Na6QhqjFF0HHCHqp6RHW9Xx+civcfIEM3LF8J5hw3e71WWXxvKqzybNkMvrnx4DYq21 rw2pvAzTN5zk/sRFpGx5WKY5qUtfcuslSHWpalOay+yNRRJ2zqumOEZRM+A5wn2PXiyS gEUgxBhTPaPdbdWo4tkvDwGEPZZyM32Zbycm2ivYiGj3E5l56iICCFRoi6t6k94hMiI7 XlVA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=xhhF4cnD2bQGGauP5wAsskp8GPwXgWKUSZeMzfZve48=; b=QrwC1enYVm+1zTSMXyYAA/vLuv3C7gN0Hj2GH7uLJRTTce47mpP81dCMcMw2qnRjdR OkLLXiSMbdwEmQcOY6/WiZjxpnYB3mMolpLzS5XIaiAFggQa08uCMvqpOWG347AVfYRX yubK9yOZM+DIxrBTQ5vBxzalT2aqGb83YTpInVlH99pC1fGaWa/JuFx/ou6JPjnU5PfL cYPrup8wsgPq4NqWChMldPZBHgP4OEMpPxpyEokLifJoniPvxBv1StDIHa2PlFzdVtpr C86X+yw6BZlCu+15pCmaqIvryepTaz84h0f6S4GdMZj7br/3z1BUfkv3Fc+4xUNY7QcN 3ioA== X-Gm-Message-State: AOAM530p4RsgprgJ76+EYbQ7N9/W53k/TeohYlbhEKM947bN5Wo4j+7Y sM0SC96Jm3+dkEpNvP7N3CLe+DeFJ/vvLw== X-Received: by 2002:a63:515:: with SMTP id 21mr4426539pgf.231.1613155751270; Fri, 12 Feb 2021 10:49:11 -0800 (PST) Received: from localhost.localdomain (174-21-150-71.tukw.qwest.net. [174.21.150.71]) by smtp.gmail.com with ESMTPSA id k5sm9427618pfi.31.2021.02.12.10.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 10:49:10 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v7 05/31] exec: Improve types for guest_addr_valid Date: Fri, 12 Feb 2021 10:48:36 -0800 Message-Id: <20210212184902.1251044-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210212184902.1251044-1-richard.henderson@linaro.org> References: <20210212184902.1251044-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Return bool not int; pass abi_ulong not 'unsigned long'. All callers use abi_ulong already, so the change in type has no effect. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 3f9063aade..5e8878ee9b 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -79,7 +79,7 @@ typedef uint64_t abi_ptr; #endif #define h2g_valid(x) guest_addr_valid((uintptr_t)(x) - guest_base) -static inline int guest_range_valid(unsigned long start, unsigned long len) +static inline bool guest_range_valid(abi_ulong start, abi_ulong len) { return len - 1 <= GUEST_ADDR_MAX && start <= GUEST_ADDR_MAX - len + 1; }