From patchwork Mon Jul 26 21:47:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485865 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4015462ejc; Mon, 26 Jul 2021 14:48:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZbCxkspWgsx6MIChKCqABjnOQ+PJ6FQ48TuCKcs/r51eKbueEIdfidQfV0n3hzxBbIFId X-Received: by 2002:a05:6214:501d:: with SMTP id jo29mr2101025qvb.43.1627336092931; Mon, 26 Jul 2021 14:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336092; cv=none; d=google.com; s=arc-20160816; b=EB9grTco0KAJpfto/X47qdxzFi5XKeIds2n7hnL7v0TwLy5cvG7xjhdNvi4LxC4Ju6 o924tKSoSTvnfvPsP4KmLH/3TE+2YWMrAm4e9lQ3IkjLdZdyt+Aq+Apt/oSVWV1xdpTo gZFUH7Rkkxae5F5UJDK+zoyf98t3UARu4fPGW5yZFFFeP+M9Ds/VCGot2JIgIx3aG7vZ 1I6j4zM+J7DujfHqz5dkYk1Y/wzxtvN/JAebCLmrrxDKQ34U6Fi0T38vy5vtAT8Aziym vJVrIr5hDRg1ox9404MIoP/H86IsLHHG2hwLDaE0f3BSCYckg00vvN2+j6hKu0GJHMGL Lnhw== 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=seot653Ng9+5CYOwzmZozwtUeX2yMDtfyc+Kr3qYmEI=; b=Wn4jP/vZfa1olVe/LUIdmgXZJAfa0hgnhG6zSoMPjHmVitCcOTbnvubCEJXdmXEcBD pViWFidyXj2cRqdEtJpRy8+TK0VSPuufYKOMj+df8ERCfr+Vl4ib/JnMPadwd+bxdvwJ vQ4CqKz9HGwP5KLyhcuGIxl1cYFqoW1a+iAZBbwo6g1On9k1OpFCwkFtdGy25wdQT7hf +v4YLsCwDM4vQYz+HoUVYoXR86Zpnj8Gn7032iXK80vaZsEmjqg86oAyZPzCI8XxOPFc biWeJNiZCOBTCNp3ZvUu8P18S59+4zOnSXXjwZbboQlnXNr8/zHWNntEhHXWSIqr079P ujJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jEL055Hz; 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 r10si557612qtn.316.2021.07.26.14.48.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:48:12 -0700 (PDT) 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=jEL055Hz; 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]:42938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88SK-0002PO-9z for patch@linaro.org; Mon, 26 Jul 2021 17:48:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Rl-0002Lx-Kg for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:37 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]:36632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Rj-000655-Cw for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:37 -0400 Received: by mail-pj1-x1035.google.com with SMTP id ds11-20020a17090b08cbb0290172f971883bso1016578pjb.1 for ; Mon, 26 Jul 2021 14:47:35 -0700 (PDT) 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=seot653Ng9+5CYOwzmZozwtUeX2yMDtfyc+Kr3qYmEI=; b=jEL055HzoTzc+JltEs90SVn6YBKfLkYZBMD6i7iwy1v9gCWtUcYjRh94mBdHySaHlf M37o8I7RqFSzrMgaKtgF6u+e8MSBxzRgfhcNFl4OwuSXupM87RBnEcPscRZobIQIEf+P AL5DzQOgDPqTZYZBwJPYeiuJcRBnHBky5rBf2tK5xzQxf/7nUwz0raP9RdDbnoTm1GZO o5ajOfG1hT/6N8zPtRA+LtHBDbJHioace64buNpr0nNt8AZUrF8JX6Iv4VfEQw9K9Y7h AedQK/pTbR7SSO6mtpoJRxVYKG3Pd0QIOeqQPXBS1ZZTCTwGI71emBUkuAB2PS+4r8ml OWjg== 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=seot653Ng9+5CYOwzmZozwtUeX2yMDtfyc+Kr3qYmEI=; b=TgK9/m/QPd2mQHL25CJw4J9BbQ5WrVTtCzuxF4LjgJ6QmqXi3wnDVJuIK30zps1tiG O+K733tOnegCHZS3fBvtJkVPf0wP+K+ztevk7w3S9TGI0s4aRjVDE8tpH8TLaLYtBu6W gjolwTpzuG5Jq6xTeT/y1C3rAhjabedjV161LqaEKos92wx3lIDIDUcF8T9gProG1zBV LlB5hHg/TUg4D/6DVCk3KmgtHCkHbX9YbwUvZBdTWofxqapxtbV6sFLYfs7uNnTFd6Ii Dk8yzp3i3Y8YGErJFbmIYPUVnCn9aci/j+zv5Q0HRq2GINp/+XdMkGUucyHpc7JyJOsV howw== X-Gm-Message-State: AOAM531oW7Y9V7MW4Oi0oOOrrYWytmzR+0I0DpuwTEy5aHXMyBccAcSg 8YS+8blMDa6XQWB1bGa1B4+KhEHKqHyOiA== X-Received: by 2002:a17:90b:3905:: with SMTP id ob5mr4901734pjb.211.1627336054108; Mon, 26 Jul 2021 14:47:34 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 01/12] accel/tcg: Don't use CF_COUNT_MASK as the max value of icount_decr.u16.low Date: Mon, 26 Jul 2021 11:47:18 -1000 Message-Id: <20210726214729.2062862-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell In cpu_loop_exec_tb() we were bounding the number of insns we might try to execute in a TB using CF_COUNT_MASK. This is incorrect, because we can validly put up to 0xffff into icount_decr.u16.low. In particular, since commit 78ff82bb1b67c0d7 reduced CF_COUNT_MASK to 511 this meant that we would incorrectly only try to execute 511 instructions in a 512-instruction TB, which could result in QEMU hanging when in icount mode. Use the actual maximum value, which is 0xffff. (This brings this code in to line with the similar logic in icount_prepare_for_run() in tcg-accel-ops-icount.c.) Fixes: 78ff82bb1b67c0d7 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Resolves: https://gitlab.com/qemu-project/qemu/-/issues/499 Message-Id: <20210725174405.24568-2-peter.maydell@linaro.org> Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index fc895cf51e..6e8dc29119 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -834,7 +834,7 @@ static inline void cpu_loop_exec_tb(CPUState *cpu, TranslationBlock *tb, /* Ensure global icount has gone forward */ icount_update(cpu); /* Refill decrementer and continue execution. */ - insns_left = MIN(CF_COUNT_MASK, cpu->icount_budget); + insns_left = MIN(0xffff, cpu->icount_budget); cpu_neg(cpu)->icount_decr.u16.low = insns_left; cpu->icount_extra = cpu->icount_budget - insns_left; From patchwork Mon Jul 26 21:47:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485867 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4016096ejc; Mon, 26 Jul 2021 14:49:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyQeKHBUlB+IjPdPCvngD/UH4FNGp1Fmau/ZufqGv+mPdwQPc32RMP/L+4dM38Hnia+0Yu X-Received: by 2002:a02:cc4e:: with SMTP id i14mr18409956jaq.125.1627336162094; Mon, 26 Jul 2021 14:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336162; cv=none; d=google.com; s=arc-20160816; b=g8t8IanqnhOurrBHEjs2JQsRmc+oaNPpf+ZYk1CWssP8MwIJXFmTCN4IU3wY51mYIx tZZvsEVwMthGLjPS8ZdbSI1PiSKAEpsjgSM0CnX/kOSH3229HBNXkBMILYt6zGKLUlDI Qz4lhPrl5IAwBJgA7UHb5aKdsQ4T6pfc9Sbs818EK8tn4+9BwEdS70dW9PVR06w9BkYT k0Gc2oE9ShCrDSfBoteEZFISQMxypH7au9m+ybD93GkgII/v1JSdIHGKxwawL12QHfWZ HKOeLT9J7MBdYxr4cM3bAxyYHhpf4IjzM8QqVaXs95R/9wHWeeAXnVknEiB763RBN2hR +5LA== 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=dczMECoCZ2fE11SIUOsBRrLY8h7p8j2HpmwPdyA/v6o=; b=iU2YeDw0+KmV+KlGCGxwMCKZCQkUrdiF5WCQNwlojIeieMYXK814unM4/oicfQia2p exDhR9XwTGCHEiNJ0BIomeGizHOjS5YIStbkfPZPDOfymkYO0FsdoN2psReIyrlH1WJG Lx+jJomAAc2UwBgMQ20eoo96quWFmxhAIO6Ag+GzkJzPPCY8MesZ/mbvaRI7W5ALrVOK Pv6IcQaagWgW3+C1m8HZ8NkzvWI9rw1BqpPOM5bC+0gMSLVqk0Uh+xxqKmKxB11t2S4/ DUrUMpVh6gZSGINxuvZZ8qxe2VJdSAJGpSDEe9+yGoSUsWcR13dQSqlEpZ2J7PjWH+fp ZcQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wggx+YzD; 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 v17si1184233ilo.17.2021.07.26.14.49.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:49:22 -0700 (PDT) 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=Wggx+YzD; 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]:49074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88TR-0006Uo-DK for patch@linaro.org; Mon, 26 Jul 2021 17:49:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Rm-0002Mf-1a for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:38 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:33390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Rk-00065h-H6 for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:37 -0400 Received: by mail-pj1-x102e.google.com with SMTP id gv20-20020a17090b11d4b0290173b9578f1cso1120136pjb.0 for ; Mon, 26 Jul 2021 14:47:36 -0700 (PDT) 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=dczMECoCZ2fE11SIUOsBRrLY8h7p8j2HpmwPdyA/v6o=; b=Wggx+YzDxrfg/4O9cLnBAxj+Rgk/ng+sse/jf9XIUIxtvJnZsgjMEk4RkZWlLSzNdh +k38iNFGyLnB6Jg4Huvx8WHvvLMxQkivZuh7NsMRDwFH4vqnuaNtGmH1/cDgrAbSP74s Ta3ZDRLUjs2lG08OghVE/2mOpwRWPgzSfnmIAEAsEBLp2wN2xX8eB2/NyGmCel1i9fon QpABpg1tXDMYArPmz8wVKdWNK5veSIWnDQcvdenfaEBnOmxRvx6sFVLSqmo50s9U73Br MZo1o1989pnxDXmqBSSVJg+d46uSwz41zkdpU+JLNcBa0qLJ+RI/UWp5itmBiL6joZoP iVEg== 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=dczMECoCZ2fE11SIUOsBRrLY8h7p8j2HpmwPdyA/v6o=; b=YacIJ+VIKs3VoxJ1Cx5cwG/EoKxgNqJCEk3o65o5qO/8ATlbOTpWdklJTgkFgoNwOC /jtdG2nz14dwdwtUyLprtWA//9/TPspRO7CGjm25YdZjk0XLiF8h14a3W312MHrqWkmw D/XVMBJ0lRknQGZOkSwuAu5MXyP3B0WQI9MTjVWLs8eoKTi1OVmKA3HpXGisfLx253d3 TS5EEk4la6zmyAax1rrdyXHEJTR1kCbctG/k6lrLNwFRFktmv4pdR3141MRk6tW4eyJw It1ykZRkWAr2DeAjcLpHDZt0ilYpnzgXgn0BRP3fAtJw0Evwz7rzHF7mcvdGvMyA0A4c Ieow== X-Gm-Message-State: AOAM530+/QhEU07bAaDTfQCG0rd/BoEQFp/aVAkftHDSWTEX92JSjQux QZRTRQqK8yUbtRgqWKACw+LgNf6EcatY4g== X-Received: by 2002:a17:902:7c81:b029:12b:6ac2:3ad9 with SMTP id y1-20020a1709027c81b029012b6ac23ad9mr15843971pll.76.1627336055122; Mon, 26 Jul 2021 14:47:35 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 02/12] accel/tcg: Remove unnecessary check on icount_extra in cpu_loop_exec_tb() Date: Mon, 26 Jul 2021 11:47:19 -1000 Message-Id: <20210726214729.2062862-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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" From: Peter Maydell In cpu_loop_exec_tb(), we decide whether to look for a TB with exactly insns_left instructions in it using the condition (!cpu->icount_extra && insns_left > 0 && insns_left < tb->icount) The check for icount_extra == 0 is unnecessary, because we just set insns_left = MIN(0xffff, cpu->icount_budget); icount_extra = icount_budget - insns_left; and so icount_extra can only be non-zero if icount_budget > 0xffff and insns_left == 0xffff. But in that case insns_left >= tb->icount because 0xffff is much larger than TCG_MAX_INSNS, so the condition will be false anyway. Remove the unnecessary check, and instead assert: * that we are only going to execute a partial TB here if the icount budget has run out (ie icount_extra == 0) * that the number of insns we're going to execute does fit into the CF_COUNT_MASK Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20210725174405.24568-3-peter.maydell@linaro.org> Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 6e8dc29119..5aa42fbff3 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -843,7 +843,9 @@ static inline void cpu_loop_exec_tb(CPUState *cpu, TranslationBlock *tb, * execute we need to ensure we find/generate a TB with exactly * insns_left instructions in it. */ - if (!cpu->icount_extra && insns_left > 0 && insns_left < tb->icount) { + if (insns_left > 0 && insns_left < tb->icount) { + assert(insns_left <= CF_COUNT_MASK); + assert(cpu->icount_extra == 0); cpu->cflags_next_tb = (tb->cflags & ~CF_COUNT_MASK) | insns_left; } #endif From patchwork Mon Jul 26 21:47:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485866 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4015475ejc; Mon, 26 Jul 2021 14:48:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLfhyM3Wy4GWDTLSTsRZo86Aou16hZJyi54bjH87YX4tgFXR+NdmgbIQ1NV6uv1ih3SHa+ X-Received: by 2002:a92:d152:: with SMTP id t18mr14105202ilg.34.1627336094751; Mon, 26 Jul 2021 14:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336094; cv=none; d=google.com; s=arc-20160816; b=wuj6GZnJbYuI/WreL2thVE5HSDiNm0/tWLrUVzDHFcPx/0IDw7awzmrTcqZ3L80JDC wznp2Ko/8lVbxYJdaWahcPPymZHwbWc+o9gt3wafRt7//9nFyM68tD6GxXxgzsFm+nUb krqV9SW1rEByt4TU96+yGhQAHHWS91xkAKuvcfkpDvWlxMfFXIQe3csPGW4BguormC7v ZmVVS6igD32FWjr8cZdtHUutfPu9aM948cDJ58Y8m/0Kc0KqTCTukTfFtpsf9HqAL6fl x4bjBsgxYL8GRK3/BohtiXpSBlyIILq+WPpYYBYbmyAWFhFfgDWOSIXjrtBuH1fC98aN NinQ== 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=zdI8+8nFNnxTYtRyQ8td0fUaRpYVtNk1B3zMGvwjcGA=; b=kkOJ+yl94ny2nAA7n7UYstJMETP4sTOVv9erD0vOwZmJWwV6yxOZ5yC0sV67ZrXlej S70M0en8Hx6v/oOUY0He6qBW95TkEjgzU146Fn31Y8YG0T++Hj5Un5OL/ZhRNrHiuNzA gqhgqadwi8IaDKOmsXpQ9TqbpbZNNN01kFu5CykSq/+VPbugpKFxRMLWS68xl86XA5YI 1nICT0x8xBgKpfVAHT7xNJuQd6NVKxPfgbKsc7YyloNVtm1J54nyWRA3GWVWGWhLzbgE RSis2HSPS3kzhLC7xJvtVEI5HGPzfexh4MoOix5pzFaIZ/H/GNf/dpdGBB3/OZrVfR4F lXHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mlC4dz9d; 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 v8si1099796jas.68.2021.07.26.14.48.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:48:14 -0700 (PDT) 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=mlC4dz9d; 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]:43070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88SM-0002UE-4E for patch@linaro.org; Mon, 26 Jul 2021 17:48:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Rn-0002P1-6W for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:39 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:36626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Rl-00066e-LM for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:38 -0400 Received: by mail-pj1-x102e.google.com with SMTP id ds11-20020a17090b08cbb0290172f971883bso1016802pjb.1 for ; Mon, 26 Jul 2021 14:47:37 -0700 (PDT) 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=zdI8+8nFNnxTYtRyQ8td0fUaRpYVtNk1B3zMGvwjcGA=; b=mlC4dz9dm5HBlcHuhh9jzfeJWxr1RKvDeSXrOF9F/ztICm5geh7LDty/NIBLaHOsnH 6DUUd3YDzPZwwhmTYXRGWNKO7/W8wLUZ/qHTKMPM88+GDPS0WXGySelmaKY4H3HtMxzs wgDo5kAOAUgGUIpCPISkkjIg2TrSsNF7d4RZ5m9h3wQRtFz0sskc1gYjssz2XBukpdZP 9xlnD2OOXZ1LeYCNSV76hsxHEogzdJflGx/MV8xYCA+uGPzwVIZmzBRa7gtqTkv9bYiR Kxsm4bSujwm2aTCDGE3fCnmSVanbYI7XH9Ua9JgisQUS+D3J/WL2LalMl3XYmRMSL8Qa JWgg== 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=zdI8+8nFNnxTYtRyQ8td0fUaRpYVtNk1B3zMGvwjcGA=; b=oAqjJwB14ujdD8RGpvc/MlBtm3Yo7sdhDjYYPTrkaDZ/wMEIXAsjym+QdLNcrW0aiz mhdiDU1T6Xo/vxMISqLQqYrkeWt444Ozej1yPMqJHo3vJabD2Y+oUPUIeCWdsif6hy7Z oPUWpu11at29kQDtkLDQXWt5ixwHh6u9iN9LEXAUcEV+vehXnacQLUSIrQ0YE/vvyCqJ QOprSGP1pn/dako21/s0nfQErkXIJ/D0yqB+Glyt5KCz0lrUXH3xQfqtysGWK/39fs5R aH6iN2RVtKl1TIzBHQn2J8SYLlobduC7lJfwH5anMYxshODD5muC08O+bTAmpSAoGtSl BqrQ== X-Gm-Message-State: AOAM531FrCTpSZ0kcUKv7YryVCWGG5BKeo5LCGWgiqSBd49EuWx80TXn BFbUfaW93nchOvjTBmdVROVJtJFIQfkacw== X-Received: by 2002:a17:902:e851:b029:12b:c50a:1ebc with SMTP id t17-20020a170902e851b029012bc50a1ebcmr13947312plg.84.1627336056466; Mon, 26 Jul 2021 14:47:36 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 03/12] bitops.h: revert db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation") Date: Mon, 26 Jul 2021 11:47:20 -1000 Message-Id: <20210726214729.2062862-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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, Mark Cave-Ayland , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland Commit db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation") introduced a bitrev8() function to reverse the bit ordering required for storing the MAC address in the q800 PROM. This function is not required since QEMU implements its own revbit8() function which does exactly the same thing. Remove the extraneous bitrev8() function and switch its only caller in hw/m68k/q800.c to use revbit8() instead. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20210725110557.3007-1-mark.cave-ayland@ilande.co.uk> Signed-off-by: Richard Henderson --- include/qemu/bitops.h | 22 ---------------------- hw/m68k/q800.c | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) -- 2.25.1 diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 110c56e099..03213ce952 100644 --- a/include/qemu/bitops.h +++ b/include/qemu/bitops.h @@ -618,26 +618,4 @@ static inline uint64_t half_unshuffle64(uint64_t x) return x; } -/** - * bitrev8: - * @x: 8-bit value to be reversed - * - * Given an input value with bits:: - * - * ABCDEFGH - * - * return the value with its bits reversed from left to right:: - * - * HGFEDCBA - * - * Returns: the bit-reversed value. - */ -static inline uint8_t bitrev8(uint8_t x) -{ - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = (x >> 4) | (x << 4) ; - return x; -} - #endif diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 6817c8b5d1..ac0a13060b 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -334,7 +334,7 @@ static void q800_init(MachineState *machine) prom = memory_region_get_ram_ptr(dp8393x_prom); checksum = 0; for (i = 0; i < 6; i++) { - prom[i] = bitrev8(nd_table[0].macaddr.a[i]); + prom[i] = revbit8(nd_table[0].macaddr.a[i]); checksum ^= prom[i]; } prom[7] = 0xff - checksum; From patchwork Mon Jul 26 21:47:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485869 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4016431ejc; Mon, 26 Jul 2021 14:49:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsZotd1NynGFCQDnXi3vBY+L+t8OvJ9HaMzg/iZg0KllI/TfoAq0TNNuTHSfJdzmJzL7pL X-Received: by 2002:a6b:3bc3:: with SMTP id i186mr16130739ioa.64.1627336199629; Mon, 26 Jul 2021 14:49:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336199; cv=none; d=google.com; s=arc-20160816; b=S9s30uMP4TWKl19RH8YN8HVelT2zNYdhRjjJC17hfyaNQhpa8wibjgSfU7yDuAdvJy WexrILSE8XVTiwPnqxMfwJHPNay+dEvj2pCaWZq0GCYZDP8s4wIIFADTbRa+eDQis/m5 6+HfysQmQQJ9LAUEUtwquNAqPPSSBvui1H85rdozydAOy0HxDEpTsmKAICok6atQEQZ2 O9+MU9IUkE8txlo7QU6rLtr10bLmB8UDmM6e79ih9esO9Qs0wRoMF06BzjOSyTV94Hs0 yYUyqW7eiZfhTRM5sjiXpBu/FsdoR2fp4vcMD2+zjP5C27VWJmsLg802+sWTnk5/rPx3 tWCg== 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=0tlojEqymtJJ88WhLXCc2lj6xJ1RmfHWdzsWqjyqPLM=; b=VhXS+zB63IXcPuvsvbh4zm4BUlt4ndl8Z3O5SIfs8TwBi6zi+J6MUUIY3WwVnq8e7u IsQbHJZFrYLaiART+P4r4HojfYb7l7Wx9ZBXbH0e9V5kjmUKQe1mP54TsE++oEmsCYRS pnopGPBL0QBzhoon21lSYBzuK1keAkUjXdThjh7XRC4jcQPRg0hIOLMLVBu7TK5/XBbH x732HRwm2EiVkzjTBimW6sZzNZT0BPeiAO8wtfiuh67GZOuqDJ4PlMibm82r1ZvJNi2m Yu3EVXQKm/YuzbRD+HF3hlHK/cVNbmFsTl/sqMHqIvoe4Qsk4F1eGnBQq8V4hY6Y0e74 6DfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bjQKOf8y; 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=fail (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 k3si1184786iog.8.2021.07.26.14.49.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:49:59 -0700 (PDT) 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=fail header.i=@linaro.org header.s=google header.b=bjQKOf8y; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88U2-0006mI-Vt for patch@linaro.org; Mon, 26 Jul 2021 17:49:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Ro-0002Sa-My for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:40 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:46647) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Rn-000685-6C for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:40 -0400 Received: by mail-pj1-x1036.google.com with SMTP id g23-20020a17090a5797b02901765d605e14so1978234pji.5 for ; Mon, 26 Jul 2021 14:47:38 -0700 (PDT) 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=0tlojEqymtJJ88WhLXCc2lj6xJ1RmfHWdzsWqjyqPLM=; b=bjQKOf8yQohKavSuOFGF52GOdzpoFrwsx/J2NUtSneRBHYkGiWjwiQGiR/bxmhD+iP JOSCuSIv9bkKHmEFSikWAi2BJW/Blo/uvQaMgY+IZus3VYqGW1e9jFIOHZWfYypNqyA6 g8xMVEQvhCZI/HmYGwLdqZRVGbbH9Kn/APQnU5Jh9plkFhPtgL1/BOa8AZ9Fyzc9enFT T0o49naHFQSg7Kici3Ql9tHiRnwCOCPjUk12gnmNZKgXts5m7i0RJfLaH8cYh4IDe1Cb S56k0AjsSzsqKo0dS6Td3gR6xymZPurNNCZgayXdGThTqEaSmrdbPgAiFYXcMGwJ6dDw EEhg== 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=0tlojEqymtJJ88WhLXCc2lj6xJ1RmfHWdzsWqjyqPLM=; b=cHOHTID/hkTG5vMaNaMHVIDBttU+gjbMNTCac7U+BAuvmFZLVAQSN91nryrGgWhrVC yROKWJRtW33wAAxiI1wkVzTHxKrPDp+mm6fQDMhMsdTFL//vp1tdv/oCo7wOr86Ql8tJ 8bcvgkoImHUJOqJrh/sMCFUZInOQe+gS29wg2Ndg2V3ysEWK7jPEaTGViyAKjDmf/0aj KoxxnTUgsIFoz+R/nnHZ6ZmpcaeyHt7PpaHq2r6Ins4hofIQ4Dvef5o4+34FNDmjyiuV nWoL69eGB5kePjzfUjifTGKOMCphtJ8dUbqtKkt2h1u27sZFGh1McMOssMDjWYKEYoQu O7Qg== X-Gm-Message-State: AOAM531C6EV/QOQ4dn2arP7gVy8sKvzsnpbsvv482qDz2ptJo0mkYzIo 6Cu6h9y0vnHTcc2e9jvTAGWsLxsrybo3Tw== X-Received: by 2002:a17:902:d90b:b029:11b:f58c:f3d6 with SMTP id c11-20020a170902d90bb029011bf58cf3d6mr15986920plz.42.1627336057894; Mon, 26 Jul 2021 14:47:37 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 04/12] nbd/server: Mark variable unused in nbd_negotiate_meta_queries Date: Mon, 26 Jul 2021 11:47:21 -1000 Message-Id: <20210726214729.2062862-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.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, Vladimir Sementsov-Ogievskiy , Eric Blake Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: nbd/server.c:976:22: error: variable 'bitmaps' set but not used \ [-Werror,-Wunused-but-set-variable] which is incorrect; see //bugs.llvm.org/show_bug.cgi?id=3888. Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Richard Henderson --- nbd/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/nbd/server.c b/nbd/server.c index b60ebc3ab6..3927f7789d 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -973,7 +973,8 @@ static int nbd_negotiate_meta_queries(NBDClient *client, { int ret; g_autofree char *export_name = NULL; - g_autofree bool *bitmaps = NULL; + /* Mark unused to work around https://bugs.llvm.org/show_bug.cgi?id=3888 */ + g_autofree G_GNUC_UNUSED bool *bitmaps = NULL; NBDExportMetaContexts local_meta = {0}; uint32_t nb_queries; size_t i; From patchwork Mon Jul 26 21:47:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485868 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4016417ejc; Mon, 26 Jul 2021 14:49:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx00sTWhW2ZQmrpbmL8G0NDPN/FQ4+h08YNFk5O65mX4Wxvii9wssYM/Lke2+IMIzHD/a6z X-Received: by 2002:a05:6638:1907:: with SMTP id p7mr18549781jal.93.1627336198211; Mon, 26 Jul 2021 14:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336198; cv=none; d=google.com; s=arc-20160816; b=OyhYkvzJPciFYNMx0CaH9/N7VIzw6dhG5Kvv63YBCbVec+52E0ze4in0+c2xJSqUuJ pC2qzWlofRqihxakMSDBBXWWDMQFf+acg5M24vJdSHDWkRSIxKCnqdUDtIqmA7h9QbDA kc+J2CAlBwjrm9FpJM/PG8OWUR8mF4KRpOAk6cJc0VBBl0Wvszd4siDXn5INPhMGbO4C d02LC7ZhgHEwkwDQZM3pZRddUuOEFdhCVodYErE7XlU+Jy3Kmz+cRWfddnx3wdT6cdbn +cujdul7Q09fo1SOEG14jsmHx3GYJ7250+ZAQnzfmFSP8CukIn5UDtRPbJWi0VmsSpjy qKag== 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=TPMzfyzPxQws2QFaU9LwgJDz9bd8a19l0TLsA22Vwpo=; b=fLKGvARLXN+jJbCPPVwRP2g0HXW5RuCLttKXz1p1aY6Qt1YVZ2yU5/vxxTQ+yS0rXM 5LN46DjsDXA91Jd8gjBKMAFVXErCXT2zaDP4uzE16fGYZLjOGmVnEap/AuBD1qRSys1D KmE+u+PKeW6uL6h+wC5xxtRR7f3KhyvkMZvWXFupZxbqHR6ZIOojm5NJPjwY/9XFnzjr eZXTcFTVmP1EAql6REJwwk9M7TPC6K0e+nt9fwjX+JF+6LluP3QkouhwlY9vleIHRA+A BC1v8KW6nZrdxH1XiRzszbu72DZU4hjZKwrhZMpQLKGVKD2GM7XQ7DFtMd3ZkyDbLyXS wZTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zdogzrz2; 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 d13si1164792iod.50.2021.07.26.14.49.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:49:58 -0700 (PDT) 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=zdogzrz2; 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]:49400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88U1-0006i2-H9 for patch@linaro.org; Mon, 26 Jul 2021 17:49:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Rq-0002Ww-0m for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:42 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:54051) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Ro-00068p-CJ for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:41 -0400 Received: by mail-pj1-x1030.google.com with SMTP id j1so14828988pjv.3 for ; Mon, 26 Jul 2021 14:47:40 -0700 (PDT) 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=TPMzfyzPxQws2QFaU9LwgJDz9bd8a19l0TLsA22Vwpo=; b=zdogzrz2B1KexJnWRCoc7qHkTb7o1ZIXaTs6AtAhmzkLnOaIztIrRNU86keHgWCjoL 3Ka3A3FsHufm7ptF2Z/Un0kR99972CQ5VwxJHpOo1oxRbKZGk18ICGYGG6Mdlvg4/dge /84aSZqlL2TCVopGAnQQAEKjsW4K0A67qfgI3Kgzk/pi0qQMcWyWVZXTRXq8kLqEy6ih 3StSTxA1niy7NKL+dKoqok5lvNrggH46kWvePPzbz7b2WmXJn/CEkORNyvr4Z7BdtwKh Xo2hsOww73aaiAuaXW+Wh/BykgZqtlQvQAx/GQfKQBSpB1+ME33V7Y2Rwv/mF3Zj8VjN fBkA== 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=TPMzfyzPxQws2QFaU9LwgJDz9bd8a19l0TLsA22Vwpo=; b=JjlTJeWlSLGPTrH6fyUoY5IAGo/RevINjlsvBjnWunhE9BR82QSqsWLYpjeW0+9LnB gPSBl+GukCIiXsFmvlC75iGzUeKeRHAfvtVaGw2E4+s38ui/n+RuVx3JZpSJeLf2kyCF A4rQtkfaE3nfUb5REhb7zYY8xSOEtPRkyT8XzGh+PG+Ue3ZL0X5lncddvKBoI4VqL/+X aNKZSKtasoAfkZu5I4am631fo8xJRWl6CV3UzkpLNKraKSULodyRykMdBD32Fv+XQEty 9rZhktsrEijFA3i1SwGKWop6vkqbdLRwkl/dLd/DkFwWQjcfbNiCZXbvHR/pr+d+KN4F 2DJA== X-Gm-Message-State: AOAM530Xaw25lrrTClsDVpjHXcLpzC1jB3WlABrV4BSF00tzRz32zM1m nXZtUqfRv/uI/H8z7Mkbv8bMxk+tQ3pyOw== X-Received: by 2002:a17:902:ed95:b029:ee:aa46:547a with SMTP id e21-20020a170902ed95b02900eeaa46547amr16043130plj.27.1627336059113; Mon, 26 Jul 2021 14:47:39 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 05/12] accel/tcg: Remove unused variable in cpu_exec Date: Mon, 26 Jul 2021 11:47:22 -1000 Message-Id: <20210726214729.2062862-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: accel/tcg/cpu-exec.c:783:15: error: variable 'cc' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) -- 2.25.1 diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5aa42fbff3..e5c0ccd1a2 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -855,7 +855,6 @@ static inline void cpu_loop_exec_tb(CPUState *cpu, TranslationBlock *tb, int cpu_exec(CPUState *cpu) { - CPUClass *cc = CPU_GET_CLASS(cpu); int ret; SyncClocks sc = { 0 }; @@ -889,19 +888,14 @@ int cpu_exec(CPUState *cpu) * that we support, but is still unfixed in clang: * https://bugs.llvm.org/show_bug.cgi?id=21183 * - * Reload essential local variables here for those compilers. + * Reload an essential local variable here for those compilers. * Newer versions of gcc would complain about this code (-Wclobbered), * so we only perform the workaround for clang. */ cpu = current_cpu; - cc = CPU_GET_CLASS(cpu); #else - /* - * Non-buggy compilers preserve these locals; assert that - * they have the correct value. - */ + /* Non-buggy compilers preserve this; assert the correct value. */ g_assert(cpu == current_cpu); - g_assert(cc == CPU_GET_CLASS(cpu)); #endif #ifndef CONFIG_SOFTMMU From patchwork Mon Jul 26 21:47:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485872 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4018188ejc; Mon, 26 Jul 2021 14:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSyJDu5+r74oxL7EULJaynhR8ct4wgEVbxyOTVbJtfRnb/oXRF700WsCv6ci9xEkter2MB X-Received: by 2002:a05:6e02:525:: with SMTP id h5mr14198969ils.205.1627336363836; Mon, 26 Jul 2021 14:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336363; cv=none; d=google.com; s=arc-20160816; b=MwclexhopnddjQ0bqo7qm8qCfotAwPM20Xk4nfyWu1AWkuxLHpbx2+z+3GZ8dj1QbQ PTIeuCXgGGgdlx63PV3VU8wL3qu+Sl6vAdLIChdB5zCaDGxJN6pz+e7SdHTHJ1ltBB1s U2kdwQrYai1KXonY2B0vsCcxFdkpXeSEMJVt3fcE1RXEJpNoeBuZ30gU2apPl9PX/wX8 2IBULJNIwkoytj+7EpC/cRvOQcCaGQJml/ltECbpam/oTaRWeZO/PFOhw2KqtkKWH2QS iinJQmjiPGE1GBgryrwBT2iUbZmihnkJxIoDxWXlY1e/KEQogwuZlKZF1mYp/eJ2iTbB Oe3w== 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=2uhTllRAcP5EDg9V5XkEgroJIfh+vzkvbNymihDVIEY=; b=zwPb1h7a4h5W1ZTN72e3WQwZh9T/FgT9xZPaY7E8twda3+crpDLvdPabZppefJbav2 OVRbod8BrkQq7ExOX8OPDxn0HcrSG9TnrXNMdDSlDWHAfaNEylqcvFjhnbb1eeiaq5jh euOZk4A4yVWqBgFSSf2v985mUXgTS2H5kuFfMDl5+IGS8H/1JWg+EPFmc+AjhFTIl+6U KjR63Pal9fyHNLTdzngEC5cX7KRAO8+JxeizqrCRbtmpCaAIxrWCsxyw81oixWligoHP HbqXThc4/kfD3Ec+fiqWBCAcbAlD0qWcExrI2RSEcfLrwDvtYVmkCFAcCYO2LF9yxjyM nCCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N0re2mOS; 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 h2si1138113ils.86.2021.07.26.14.52.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:52:43 -0700 (PDT) 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=N0re2mOS; 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]:58014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Wh-00045f-2k for patch@linaro.org; Mon, 26 Jul 2021 17:52:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Rr-0002c4-Bh for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:43 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:51121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Rp-0006A6-It for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:43 -0400 Received: by mail-pj1-x102b.google.com with SMTP id l19so14938106pjz.0 for ; Mon, 26 Jul 2021 14:47:41 -0700 (PDT) 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=2uhTllRAcP5EDg9V5XkEgroJIfh+vzkvbNymihDVIEY=; b=N0re2mOSQr/b8huLbqi/4FmYzrjnWexfhUiEGCra0UMWJ9k6zJ2E/DWOO2oc5sBIO8 jRc7NFBvqpI19JIL0IBvK4ZbayHVspdyEoJGu2WFxp+k4A+axT5qnb+y3foxl6F+ZDof DmsrFSJZyd5iyjywudiT8NktbovrvNXh/0mt3XAsh8kjfCxEXzaKF+4/2db/53ap+NM7 Dsig0NWO0dh2WkFGtJ/7QOvvHL5PjskOnMi+DhhLig9vbHHzo8Hwf2oh+DOFpmZx6YL7 NOrQHLyzGYLaM0ol4hP20f0ccI4H3Wk6LuIOruh5s7i2/Gt34fP0ZoGrvgbmAMiSFmw5 b7tg== 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=2uhTllRAcP5EDg9V5XkEgroJIfh+vzkvbNymihDVIEY=; b=IJlfCGXwhEUGLg+1Sj/iPH7KurxEXAinxnOzZvDoj9Xxka7c6pIxcrNwNdBX5sOVee NG2DmmapInfLWpZMe+1lEWFsRXjbdSZmU6/Uh36vRY4Jknqy3BC45YGZMOKFz3o7IJEb gwGqfvT+gd8iGhVlOXunPO2SZyl7m1UGl4jbtTc34DSAPahsWpfTLm+wDiEirieM9W58 sq+CNRuf0xQBKaGe2StIDQGsflADqI7vl1KTNgkcYsaZaAgkkWZesz29UXaz2cAbH1jX MS0PAM94l9UA3FUIOLmpiwuFTx3q8nQ2zz0YX7PfPxZEZxwAdI1tPH6rwMMTIZtBoGB0 HUhg== X-Gm-Message-State: AOAM532m9t5x7kfikHUohbuw75Ky0ymDbcjEp7h53lMLM7aDW9/SmbHv TcGOHsGkAUwbIslL3IUHHh6PTtBWNaoPdQ== X-Received: by 2002:a17:902:6b82:b029:120:3404:ce99 with SMTP id p2-20020a1709026b82b02901203404ce99mr15863822plk.49.1627336060337; Mon, 26 Jul 2021 14:47:40 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 06/12] util/selfmap: Discard mapping on error Date: Mon, 26 Jul 2021 11:47:23 -1000 Message-Id: <20210726214729.2062862-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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, =?utf-8?q?Alex_Benn=C3=A9e?= , Eric Blake Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: util/selfmap.c:26:21: error: variable 'errors' set but not used \ [-Werror,-Wunused-but-set-variable] Quite right of course, but there's no reason not to check errors. First, incrementing errors is incorrect, because qemu_strtoul returns an errno not a count -- just or them together so that we have a non-zero value at the end. Second, if we have an error, do not add the struct to the list, but free it instead. Cc: Alex Bennée Reviewed-by: Eric Blake Signed-off-by: Richard Henderson --- util/selfmap.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) -- 2.25.1 diff --git a/util/selfmap.c b/util/selfmap.c index 2ec99dfdda..2c14f019ce 100644 --- a/util/selfmap.c +++ b/util/selfmap.c @@ -23,29 +23,34 @@ GSList *read_self_maps(void) gchar **fields = g_strsplit(lines[i], " ", 6); if (g_strv_length(fields) > 4) { MapInfo *e = g_new0(MapInfo, 1); - int errors; + int errors = 0; const char *end; - errors = qemu_strtoul(fields[0], &end, 16, &e->start); - errors += qemu_strtoul(end + 1, NULL, 16, &e->end); + errors |= qemu_strtoul(fields[0], &end, 16, &e->start); + errors |= qemu_strtoul(end + 1, NULL, 16, &e->end); e->is_read = fields[1][0] == 'r'; e->is_write = fields[1][1] == 'w'; e->is_exec = fields[1][2] == 'x'; e->is_priv = fields[1][3] == 'p'; - errors += qemu_strtoul(fields[2], NULL, 16, &e->offset); + errors |= qemu_strtoul(fields[2], NULL, 16, &e->offset); e->dev = g_strdup(fields[3]); - errors += qemu_strtou64(fields[4], NULL, 10, &e->inode); + errors |= qemu_strtou64(fields[4], NULL, 10, &e->inode); - /* - * The last field may have leading spaces which we - * need to strip. - */ - if (g_strv_length(fields) == 6) { - e->path = g_strdup(g_strchug(fields[5])); + if (!errors) { + /* + * The last field may have leading spaces which we + * need to strip. + */ + if (g_strv_length(fields) == 6) { + e->path = g_strdup(g_strchug(fields[5])); + } + map_info = g_slist_prepend(map_info, e); + } else { + g_free(e->dev); + g_free(e); } - map_info = g_slist_prepend(map_info, e); } g_strfreev(fields); From patchwork Mon Jul 26 21:47:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485870 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4017424ejc; Mon, 26 Jul 2021 14:51:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUJ/8FW80D6N2nlzeQupZcAuRQyD/ow5JMqFPQ+vqNje6ezCnpngNGHhMmNODjc2L7jP4q X-Received: by 2002:a05:6e02:1110:: with SMTP id u16mr14738343ilk.141.1627336297151; Mon, 26 Jul 2021 14:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336297; cv=none; d=google.com; s=arc-20160816; b=hsLvUKh9Itk+HljmTAKk0Tr6ocVOWPKeXcrprciUfyUkwbhxcvZhYDQNeePN2XeEj4 SJZZq0v316JG9jc0OqXdpURPSez+Vq6yLaKibTQsQG/4RvL+ZJBS05JvhUljNjDI0l8l 2DZdPCRUbQ9ORNstKuiSWGAfop1vLSVS+Cq3J6S25Kjx7SKDUX5oLP/yi2wnsHEmthOT yZzdQHgahM9F6QOleihVBH5PPfdp0SjKcw79kqjfK4Y/IoCKu34xuprWIka08tpYBEkX SRRDvgNFfABpkXekauXFixkGQPPl5Gy4qA6OMVD8GTQkj2fOeL3EX6yUyi0jxysi6bMe kLuw== 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=EeP1+NrmJvGDfY8+Y89RDlhc26oiM2pn4/yKW7SqsKg=; b=ZfiNUPNmCEOZM9U19SHZWltR74Ls0xkWEZqMgr878zwktGYsfSsWp6pAaMJsBVV+BS Z+H4VRUEjSX6ThNDi6bilap5a3xjAP6LNc4PRjYK+QkfU/qOrQ5MK8DnC4J7gqi0Wb6E qbV98epSmfiskC5M8QZ5byTO5pQ74WigW7fU9A4SB5LDcZ6nrpNimsVFiFVsnhtB8mzP R5P+EC+TtmGfOmFgPBmbl/U7qTil9FvYVXyUE316WPvcKZ0NODmE0VXMAr6W6XABva13 mbW98ZvRPeBG2obL39OPcZGuqu8EIv1rU/HO2LelTp2SFVpUy5es/p938p+Yivrgdv/+ jhvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aMaRyYxz; 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 x29si1052198jap.52.2021.07.26.14.51.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:51:37 -0700 (PDT) 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=aMaRyYxz; 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]:55568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Vc-0002Sb-IF for patch@linaro.org; Mon, 26 Jul 2021 17:51:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Rt-0002jI-Fo for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:45 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:36624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Rs-0006BW-2J for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:45 -0400 Received: by mail-pj1-x102b.google.com with SMTP id ds11-20020a17090b08cbb0290172f971883bso1017147pjb.1 for ; Mon, 26 Jul 2021 14:47:43 -0700 (PDT) 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=EeP1+NrmJvGDfY8+Y89RDlhc26oiM2pn4/yKW7SqsKg=; b=aMaRyYxzhm1oiOqfZXwQ7aow/rGTYPLBMsmKyr8cNerOoZExGbKwdOcRKRGNtzdgnp /V5EJ9deI2d3tSProLfYLJ4tV9FO4/5lYLgtbnj8pEa8Tgkddv28gUXy0hwuzTXvkUWu 6HFxVCYEh7JjG2KssmZOKvwrZkfmCo5Q6reMjxwkCgqOPiNTVjzC5YoLlbsrSk8jtB3K cli8JrSy8sk4blzM/jeugSM/Z46xABEre80Vw30Sgl6QaZdM330hlIOc6pxIYK8Df2Fn Nin+y3os6hTlDtFm/HlcRaVt8wiT/xeo6wTm+3AqQVBrXdAOMrBErvphALF5RvX2owpW iARw== 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=EeP1+NrmJvGDfY8+Y89RDlhc26oiM2pn4/yKW7SqsKg=; b=ri07RZCyUwqLT2RBzYg9SJcMElk6OyMkQauxM4yIvzgUwD4yJDUi0IUW8BlOwDQcDS Abky3PrwIvil/3pXFro4VDeMY1qJ5657vHPDixQ3ka/jmqVyFmDVynGyjAz5Uucw6hk2 wzU7XZ7HdkCA21baVngoWRIQEB/JX4NGpcmHEPdVZyOU81dpxbW/gRd3knETuz6bgJE5 Hx45wg/IqVCqZb9Wvfa/lpxkKfG3svgaqkFMJdtBr5R3lr6HhE45K3oBhS/AsfVGwm7J yKUJ72101g7LZRKwMlB8iXlFvHy1AYYRI23bGbOIhvNSTuWqCfRJwoemm2pYpLFgGZ3C SXmg== X-Gm-Message-State: AOAM5307hvcgTGeSeMh2kAr/6yhL+JXg/7lnRpj4dJ3LeINOyrm/oy40 tKn5npELnDapDTKoQ4watufl3Npp+hjOWA== X-Received: by 2002:a63:f00d:: with SMTP id k13mr20662523pgh.260.1627336061453; Mon, 26 Jul 2021 14:47:41 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 07/12] net/checksum: Remove unused variable in net_checksum_add_iov Date: Mon, 26 Jul 2021 11:47:24 -1000 Message-Id: <20210726214729.2062862-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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, Eric Blake Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: ../qemu/net/checksum.c:189:23: error: variable 'buf_off' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Eric Blake Signed-off-by: Richard Henderson --- net/checksum.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.25.1 diff --git a/net/checksum.c b/net/checksum.c index 70f4eaeb3a..68245fd748 100644 --- a/net/checksum.c +++ b/net/checksum.c @@ -186,12 +186,11 @@ uint32_t net_checksum_add_iov(const struct iovec *iov, const unsigned int iov_cnt, uint32_t iov_off, uint32_t size, uint32_t csum_offset) { - size_t iovec_off, buf_off; + size_t iovec_off; unsigned int i; uint32_t res = 0; iovec_off = 0; - buf_off = 0; for (i = 0; i < iov_cnt && size; i++) { if (iov_off < (iovec_off + iov[i].iov_len)) { size_t len = MIN((iovec_off + iov[i].iov_len) - iov_off , size); @@ -200,7 +199,6 @@ net_checksum_add_iov(const struct iovec *iov, const unsigned int iov_cnt, res += net_checksum_add_cont(len, chunk_buf, csum_offset); csum_offset += len; - buf_off += len; iov_off += len; size -= len; } From patchwork Mon Jul 26 21:47:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485875 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4018891ejc; Mon, 26 Jul 2021 14:54:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbIpUxojbOWwBlPj52I8jn/adHST2vmkHzEV0CwzYUV2aZ3QwbBmCrNkQiTFUnZOng/zOd X-Received: by 2002:a05:6e02:13d3:: with SMTP id v19mr14858356ilj.167.1627336453464; Mon, 26 Jul 2021 14:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336453; cv=none; d=google.com; s=arc-20160816; b=IK4Mu7vnVba0VHH357ov4Wj9FSKbCx8+zMekWW6nPH75QKE7cqS0Kjql8RB8M7w0au +8Dm2w73CRtLDHDUe6t1nOazPL2hZwUU04nO2I5ikhwXjoQvDjt4cpx9gbzniTihfuA4 yal/+VYqv5ln1yTx8jcUmmicsL8kGrqeP4DSu1WeiGRD/U3XakkIy0HrBjqexM6hPHNA xuLcA3ZncPWr5v551Wj+BuKuVC5u9whc70Z+j4Dxf4O6C7eDX0ekKypL7dpJiHHMnASu UcmKd0SoY6I3fbcJvKonH32dqDiUGBpaIvgQnfVi4vmIVrBr04QMjhFEh+Y7o64+Jgqk zWiA== 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=hBw/k/z1d1LuXlQIfNytxkYVglrkLJic6NwTbw5pZ6k=; b=MRHXbpoDrXrTz+G5MCJmdPOjJiTgEVukI6VShG4CPk1koPDfTkMCy5gGEKBhXb8z38 DNLBTRRrI1liX4IaB756SWeMyO0sTTFmy07yZ8pAClbSF90x/oRtwJ4tFC7vky8e8q59 13x3NRwCrSiWY/WVaZMTcZ/A36Q8Um0KF3RD8wp7PBEUCttkTonACUtRGFThZavEZPwd kK6qi7SDyZFNQrcFbNB6rL/SJIwxJPwrpLeRj0ftIhhHBVGid631AkBMijg2lSFVRsK9 kbI9DbIXZN3yrtdNR7hlGv+78JMGJJL6+mXbLrlNevjfPHqsKeefGQLV3vQZAkm850+A wYcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l33IWsMQ; 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 w3si1040423ilv.30.2021.07.26.14.54.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:54:13 -0700 (PDT) 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=l33IWsMQ; 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]:36014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Y8-0008Ks-Qn for patch@linaro.org; Mon, 26 Jul 2021 17:54:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Ru-0002oN-PU for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:46 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:43870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Rt-0006CA-CB for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:46 -0400 Received: by mail-pj1-x102a.google.com with SMTP id m2-20020a17090a71c2b0290175cf22899cso1996005pjs.2 for ; Mon, 26 Jul 2021 14:47:44 -0700 (PDT) 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=hBw/k/z1d1LuXlQIfNytxkYVglrkLJic6NwTbw5pZ6k=; b=l33IWsMQPbf86P04iYHNsp+qAgfxZphHHggKUMScjDzq1krMgmNj15Vdrg9+o5NgDm 5TyFP7r6zI4F6RSdupyqKcAgpyHP/qAcjH74cDZU+TjEPMRVcwSk9lH7eEq0HzAI8qXZ Jcn0BUTTSGLJttviUsfG0OwLdM/VYYUZZnaer52xj7y7UUFfG/f/bBMSgZQCBA+bTKex KiesKJpMDi8ujIgiO5Iiw4WT0HqHGX3oRbCvcM1o9AfTiaBWMXXtrALcIOUor4IhMySa SCR53DfbI3C2qODUuTlG1CHC9hsTUKk1gD0S3eKJcNT7bQhwKB7gDZ1snw7T6vxYJkG8 jnvA== 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=hBw/k/z1d1LuXlQIfNytxkYVglrkLJic6NwTbw5pZ6k=; b=mhBFaZM//MJ4s0U5giNbOk8aV1OC1aznrWVLCMInmihgZBzRbR8gLco/f5zlhJZLK6 2xR21Z4B+Ul37fcV7jJgUcCSxpxtisaDxYhk/RCrqowgff9Xsg8B7i7kATaXdR2FiJ/s c78qhdG9FQrRICzfkNdn6T9AJDxPhGh1G3LUjQOLrh9W7yP5PD0d1vmMK9Cr6zJZXUdG EfZSfOMD9OEgO0c3hT3t+qW7tBHhTnN3sp+gU4fk2vnhQeJIyB4M9caVOR5UfMK0ECdq 5RH1wUK0QfijuJIa4Jj8pgGoyA8n0bX7IiolDfQJGMFWjjZuM74Kv6NinoxBBPcO11V7 +0Ww== X-Gm-Message-State: AOAM533xOD1u3ys3kZ5Le48FP93OJqLqO/IH7QihTGUNbY3GJdOZ+aZk /Zl1Dk4cuG0QiFPAjteZQLu/Y0lIxAXxmg== X-Received: by 2002:a17:902:eb52:b029:129:bc24:ce5e with SMTP id i18-20020a170902eb52b0290129bc24ce5emr15754029pli.67.1627336064191; Mon, 26 Jul 2021 14:47:44 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 08/12] hw/audio/adlib: Remove unused variable in adlib_callback Date: Mon, 26 Jul 2021 11:47:25 -1000 Message-Id: <20210726214729.2062862-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: hw/audio/adlib.c:189:18: error: variable 'net' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/audio/adlib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.25.1 diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c index 42d50d2fdc..5f979b1487 100644 --- a/hw/audio/adlib.c +++ b/hw/audio/adlib.c @@ -186,7 +186,7 @@ static int write_audio (AdlibState *s, int samples) static void adlib_callback (void *opaque, int free) { AdlibState *s = opaque; - int samples, net = 0, to_play, written; + int samples, to_play, written; samples = free >> SHIFT; if (!(s->active && s->enabled) || !samples) { @@ -219,7 +219,6 @@ static void adlib_callback (void *opaque, int free) written = write_audio (s, samples); if (written) { - net += written; samples -= written; s->pos = (s->pos + written) % s->samples; } From patchwork Mon Jul 26 21:47:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485871 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4017489ejc; Mon, 26 Jul 2021 14:51:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpk1a0WC5YW52VcPPs2QnCQ0WDYMgZx3u3sZpsErBPkYkVkd2FgZ6AhpD9Na0151gNdDtU X-Received: by 2002:a92:cf0c:: with SMTP id c12mr14361586ilo.56.1627336303261; Mon, 26 Jul 2021 14:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336303; cv=none; d=google.com; s=arc-20160816; b=kNtkfavapBKfR9CvGPbln+h5zB3R0d1eB3fgUOwkPKrz3X9l5dcSNPmRV14Lq8ED/Q KHcI1gwpM/ahceRsTvYWaFg2nHeAA10ojIC/MiKyYpspQGqkQPWsoIN4mRMN2Yx6QtNT zYf8PVNWj4m9xrhXYZCEzvsDmPVT6Ou6xCyg9Fji0Uz1mv93rBd8MaaswLrl/bF2ystO wSDdIU4I/q3xbG8TcqBPDC851frJtW1xhRn/qA6IMiSea+sXC+D3domUde32k2dQwzlN UjiO+NkvVXDEFeF/MTUsnyY2UZ4qHOy3fNyseG5a9bgFLq21zQgFEvWItatq5O46bEz5 0Fmg== 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=Ly+uNiRWWBds9bI73JKaYiysd+Nki6elWV6GA/Pshqw=; b=msOy4QZmtR+q0l+IicIcxtk4rHRWPDRhoQJORrbBZnsGDp34dFfle6DHiuMslU0fw8 6c1lPIplPAoZJ0QzkNz5KqcKEza9BWhosNOVGAS5P4dTz7L2lAQyP0UCm4NisawmPlP9 D8/y5wmJhH3V34mkpRgBPawsl5nCsoYVARdqm3mGX/7qgP3sSoSVkeKI5GnreuzJB6DY e2lo9+JqmdDBm9r5yTdMoXvfcdNFu1kBMbno+Al/pIPn9wS/yANgyj93E+5SZeHV8r0d 4L1RNjYNQoy9IJwvstlhYVNjOuHSb2cM/76ARlPmOQgh8l0HigGqbUldsnMpsF/FfTxO aFgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r5cx1J3m; 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 j30si1104075ila.56.2021.07.26.14.51.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:51:43 -0700 (PDT) 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=r5cx1J3m; 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]:55730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Vi-0002Z4-Kk for patch@linaro.org; Mon, 26 Jul 2021 17:51:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Rw-0002su-1w for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:48 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]:39803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Ru-0006Cn-Km for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:47 -0400 Received: by mail-pl1-x631.google.com with SMTP id e5so11370505pld.6 for ; Mon, 26 Jul 2021 14:47:46 -0700 (PDT) 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=Ly+uNiRWWBds9bI73JKaYiysd+Nki6elWV6GA/Pshqw=; b=r5cx1J3mp+jBYTIZvAiBsgVsw5G7L4whJs8K6m66OtXZKrSPE8DMuLRtVhJemgPBKT iPc81R55ilYBdwSWHTbFcDFqIfyg2iH7AVvhbxxcvyIK7Qpkg96hoWbf9sMK7VjAoWq/ 2TD/zhlV3pI8HrV2VIJ/U8UFzmtMiXOuomoMYES2N0YouqYkEqX5vXG/R9eKRLRWEwCv SvXddAskL/a4iktBCwq67GZtHwvhsgO09vpjBRI9ZkHzp9pGAvyfhpbGUZj2YjY4v/tT LTuah9aWB1E84V0hWaLrj8M6PnFF7BEz9piprBGf9CnBEaIpVlfhP9Dm/ZYI1ocSNG1P XXnw== 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=Ly+uNiRWWBds9bI73JKaYiysd+Nki6elWV6GA/Pshqw=; b=mGHy2VSX5NcgPHtl587Z4hZcXj6xawv0R38dG1QmqIJlypkhwZ0EsQrU5LeD37CDPh xoniVr5qkXLJPZ5ibBVc/X78KEHWW0Avy6aFJLaE/gBa/xl0Mk16ZSJloY44bQQsrIU1 QtH9NiY1j791IQBHzO4+kmjpujjj0rUAfmikMKMYxdvzLGsYkKxXeRzB3WP43njF/GUM 5dYhHiYbJsMNY8PsskmczPykfVlv3+cO5mXaIQTwg9upEfe+i0k1iu08Wpjx3J0ZkAkG G8qTLy68B81qE7Vh8xbe0oFk46XRWQuv4F540rfHi08141GjweP2Wwx96wkB47lIoB/W ykVw== X-Gm-Message-State: AOAM532T6ByJGnxfDf/pnCjr929lNElGzMKzOliHT4Frxh7y0HlVl/GM 3PoFGZRPi7CiwmspXA9aYuDiqcouF/eFCA== X-Received: by 2002:a17:902:a50f:b029:11a:b033:e158 with SMTP id s15-20020a170902a50fb029011ab033e158mr16321203plq.26.1627336065364; Mon, 26 Jul 2021 14:47:45 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 09/12] hw/ppc/spapr_events: Remove unused variable from check_exception Date: Mon, 26 Jul 2021 11:47:26 -1000 Message-Id: <20210726214729.2062862-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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, David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: hw/ppc/spapr_events.c:937:14: error: variable 'xinfo' set but not used \ [-Werror,-Wunused-but-set-variable] Acked-by: David Gibson Signed-off-by: Richard Henderson --- hw/ppc/spapr_events.c | 5 ----- 1 file changed, 5 deletions(-) -- 2.25.1 diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c index 0cfc19be19..23e2e2fff1 100644 --- a/hw/ppc/spapr_events.c +++ b/hw/ppc/spapr_events.c @@ -934,7 +934,6 @@ static void check_exception(PowerPCCPU *cpu, SpaprMachineState *spapr, uint32_t nret, target_ulong rets) { uint32_t mask, buf, len, event_len; - uint64_t xinfo; SpaprEventLogEntry *event; struct rtas_error_log header; int i; @@ -944,13 +943,9 @@ static void check_exception(PowerPCCPU *cpu, SpaprMachineState *spapr, return; } - xinfo = rtas_ld(args, 1); mask = rtas_ld(args, 2); buf = rtas_ld(args, 4); len = rtas_ld(args, 5); - if (nargs == 7) { - xinfo |= (uint64_t)rtas_ld(args, 6) << 32; - } event = rtas_event_log_dequeue(spapr, mask); if (!event) { From patchwork Mon Jul 26 21:47:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485873 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4018663ejc; Mon, 26 Jul 2021 14:53:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1cuxc24rp+/iOmyT8aHGFgzdhqcenRr5aOlhVRLo7nZn+gUUc1Kg0VAlJP6MSAM8pNOEc X-Received: by 2002:a92:dcc5:: with SMTP id b5mr14823013ilr.234.1627336425405; Mon, 26 Jul 2021 14:53:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336425; cv=none; d=google.com; s=arc-20160816; b=0My++4UXBn4tT06A4WBRjj9RbGEZSvr/lUJwyQDWMPQ/I+x/J+FDpey2l15L4adpga VTzzS1S4Pxxd/391cyDE8jzxbwdzOAD8E+8f4R6FxurMfjKUJuYf5j0XxgBS1x/mgsAi ux/hYVjMo5F8j90sFObGGbpmUaYJ1wHcUMLEc8R4tfC55ssDG/yl6TxmqKVbIsUTi/mJ g5iRAgqUZsey2TOf+l5498f87udZLAZnBOArdmOPYluhCSlTiuVW1HhtPy9fFny1W08S 9xgh97Yj/9mQB7Q03i675Sco+mfpJgnzP844ZdZaFL3lnnYjS/oVRQ5C941sDzkPes5t 35fA== 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=ulypwX8cmbI95lC2kA6TSEHH51l/u0q3kJ3MExHdI5k=; b=Akoq/Pr1WCef3o0pts6lFSJ5ruy3CHNIYvgdeWEVg7fFLriE3oExKsYYDcfcZ0ISR3 XSZ7LaBwW5LnL2tT0JqokWBk2h3l0sbRjK1jPAGUn+9OluCfNQBMFhl8lCkBc69iq/ip q0li9W7AgzqD8rQ59HZeG0kR80rrsSfD39KTC1U1Ckk6cWxFV3XIwiHGwQnOB4B7olzk Dkr+ONQlaKPo4zo/sGZYeH32OD4UeMb33kGOUChYCU6Z/3EMANga/vpFoF5sL07vn4Aw +iBybffGC5PTxvUb+S7cJJJZLdClNYzcn7h3FMdYLLife2oYPu5Ek+vTkBqA/3pM+v/6 dBUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ODbDqhlc; 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=fail (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 n13si1182862ioj.25.2021.07.26.14.53.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:53:45 -0700 (PDT) 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=fail header.i=@linaro.org header.s=google header.b=ODbDqhlc; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Xg-0006ip-P9 for patch@linaro.org; Mon, 26 Jul 2021 17:53:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Rx-0002z7-SB for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:49 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:41674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Rw-0006EO-C3 for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:49 -0400 Received: by mail-pl1-x62c.google.com with SMTP id e14so13367286plh.8 for ; Mon, 26 Jul 2021 14:47:47 -0700 (PDT) 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=ulypwX8cmbI95lC2kA6TSEHH51l/u0q3kJ3MExHdI5k=; b=ODbDqhlcGV2tde0bIQEaH61FUBSHxyE30ZGBDmt5HKWZUkxAPstVBBmTVeE228fKe7 XgI8wwVVwafqYXqZF4LEIMx13SkZZohEXyDFt470L3fC8AZPjqINITgTC+/bkxKHi6jj jY7OgySI8sEesbdTz0a2UdAtIbxkBu/jK8lFfJUWbwei6MDe7D3HYkxYiMd1ayEQgf2W PSIymWAjPuyohzvRpuiBF3JbaontSaQyhVv8e/3WuvXjGyo2RcQppv2XUitlS+KSCCiw vYjPGNWSdOqW9+MkY7nQBr53JSWoiPRyy1A96vbCb5+iNZlhRrevrDeW+uANmMD7z3E2 9l1g== 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=ulypwX8cmbI95lC2kA6TSEHH51l/u0q3kJ3MExHdI5k=; b=BP+fwPdPx432DEjM3GiSqyTBQC8GxCuUdoTf5IibVkes8g16NsBjQAom+afvSWMeqG flTI3jdcwUbXAjg9kONF/09+lKDo7lnpFAtXpaCAWECi6ebjoWSyLMSB1vfeUcQs2xmH 3W8X0j5Jl+5wz4zD9BT6NyNlpDc1yQNqjovPx7DCLgoV4Y/V/UqPadxNM5WfuYhSEnye zA+TtRn2pftM4XuDjVBvBCrdJB57RU5+Yix895bMvg5UoYVohjG6+jTcJUSwHe+DjKQt Z6/4FttyLb/jd4URfZRcRZvYNpWt8L8yltNkkTn59DMWd3dknSp81Pl+1W2EDV0UPYfQ DjHw== X-Gm-Message-State: AOAM530PgI0AL2jylhzKtEE+dnUFVR1xLTYL09XhCRZ8m1u9L+dHyP3g r9qwrydPkpSMcqp+oGUc6fV8Bk9ELdwo3w== X-Received: by 2002:a17:902:7b83:b029:12c:2758:1d2d with SMTP id w3-20020a1709027b83b029012c27581d2dmr5395567pll.80.1627336067052; Mon, 26 Jul 2021 14:47:47 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 10/12] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write Date: Mon, 26 Jul 2021 11:47:27 -1000 Message-Id: <20210726214729.2062862-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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, =?utf-8?q?C=C3=A9dric_Le_Goater?= , David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: hw/pci-host/pnv_phb4.c:375:18: error: variable 'v' set but not used \ [-Werror,-Wunused-but-set-variable] It's pretty clear that we meant to write back 'v' after all that computation and not 'val'. Acked-by: David Gibson Acked-by: Benjamin Herrenschmidt Reviewed-by: Cédric Le Goater Signed-off-by: Richard Henderson --- hw/pci-host/pnv_phb4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1 diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index 54f57c660a..5c375a9f28 100644 --- a/hw/pci-host/pnv_phb4.c +++ b/hw/pci-host/pnv_phb4.c @@ -392,7 +392,7 @@ static void pnv_phb4_ioda_write(PnvPHB4 *phb, uint64_t val) v &= 0xffffffffffff0000ull; v |= 0x000000000000cfffull & val; } - *tptr = val; + *tptr = v; break; } case IODA3_TBL_MBT: From patchwork Mon Jul 26 21:47:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485876 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4019660ejc; Mon, 26 Jul 2021 14:55:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxaFMbwPmjZzMMLnlD4j1j597gbvW4a5A72vpsLFyh/wGRN7epbvkhtIYmGVani1wgzcYm X-Received: by 2002:ac8:7645:: with SMTP id i5mr16588828qtr.133.1627336534236; Mon, 26 Jul 2021 14:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336534; cv=none; d=google.com; s=arc-20160816; b=0lTrKYvOI4ZHIbgJ65CmKzbK5DYYtm3QhLU+hDkZOGkRmbRZjqf4K5p7YfU72LF4L3 gY6t5UtSIRObj3bHJkj/tYY6+UqCf2igavFI8JWvsGjdUpJutYu30WXfwkSXsfIAJBrG npctPKWNgq8netWwWxyAxjbXUk5m5l031iH+8YIOD6bOAXfI6xbfnXGVS7s+pZ4gUvxA BXs9oi8TV8OYz29yoQplhU69MMFw0GLgBBQf2dl6+nKeAHun/9A14c/8nBITpSwvkPF6 YuH3ysTsA5qZcJGBlbjRujXNluLksDboQ/6xMJf6Ld28Ag1nfnwqIGsrQ7QeAmv+HSay rbRg== 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=zE5MTjUi9y133mTU7/pQadmSuW4/bah/7+NERAt/57k=; b=FOqBjbkBRsBjZIeBy1ROMdBu5Vj1KZOsyUT1TmAYZegLFLgZ8D8OrlWz9Oq/XGU/0R APqsM4TNX0Xuvw5+jiMnWg3ecHsn3iMwfLHbTW22mgrPNVqyz1BTb1UDC33500E3I/kK +PWUrL1jT3XwfetUJJo8qoYaLjyoEcxCQJgUbUNhjZqU3Mpu0mr8Cvi0Ju8d0+0dcaag 1kSiY1vBpXkZVQDLRvjsytPkRiO7qfEdld5R2DrCGhnckEfUH14vnxOZHMDRdtsEdMIX PvpzbJXSBIMqQPQRLmQ2wJCqv3o2bpRY+PsVCsdMkzvFLGXF9QsNQKtcSO6Zcd0A14J7 dE0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BRRjiv7p; 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 a22si671341qtm.382.2021.07.26.14.55.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:55:34 -0700 (PDT) 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=BRRjiv7p; 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]:41554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88ZR-0003fe-JZ for patch@linaro.org; Mon, 26 Jul 2021 17:55:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88Rz-000352-2s for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:51 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:42527) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Rx-0006Eq-JV for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:50 -0400 Received: by mail-pl1-x635.google.com with SMTP id i1so13316999plr.9 for ; Mon, 26 Jul 2021 14:47:49 -0700 (PDT) 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=zE5MTjUi9y133mTU7/pQadmSuW4/bah/7+NERAt/57k=; b=BRRjiv7pk7GPWjHrAyE3DXGpIvhv79wj255B2Msl9Z7SIFulCboKlgSrjpQiEparrn 8HL/S/yUkls5N7W7QeGZAvgKMHD7GEaQu99X3tHRV4WVQj5ZY5vMnnOlt3UkTl5Db4KZ VVWj6I+6EBrK1cErN9/3qyiNYQG6td4jk6wYuaTtRvmUImiAjBJLdKPWjvXTgPuWAbet WJMXkAVOn2Nvzz0ZzNHGQeSs0V9YYLJP0r2Gi4FjIfoT0gz4ubdgdOPF/JlU8sQMyoVC KNsDceCwKUxi5ySMBzWnsEFiUthvH8II+eitTaVZ7vMYu8eaKCqWHkenwiDGit1ZIszC X4Rw== 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=zE5MTjUi9y133mTU7/pQadmSuW4/bah/7+NERAt/57k=; b=D90fxqcrhB+jvgTUCMlGDlSsdbm/Wl5yVs/9Qnwy/O+rkaFIO4LetRjgpdtOv38Xqr W5b/cGLHLzR9GcNuRneIJtO97Nn6buchc/TcPWLvo8L0JovqPYqyA3leZeb+vZEZETAa Se0M1aaAtMJZRsfTseIn8Mm41F9K8+PRm3QhjmBYIipFyxilEQKY6kf1eDOGhtFHCvb3 rLDiC8yf94HnYoXtn1Zd1+rqr8iY1l5NJRb8zZooL9Twj1ozhW4gjqwwBmC8WWU9R2wP nYn2cOEvK1t/0hyV5YZs3cUE/0MXpMB1DY3mhXn1AyqcDv5Dcz/6JuPhleKP0MPPWxaG IYUQ== X-Gm-Message-State: AOAM530S6d5GvEU3DniLteZSgCkqj0aYQR+QXGcytqVRUlcWE/IsNQ5H 9YgmqkkUjB6lPPXw3djo6Z7XnfsGavQGcQ== X-Received: by 2002:a17:902:cec7:b029:12a:ece5:6abf with SMTP id d7-20020a170902cec7b029012aece56abfmr15973690plg.50.1627336068237; Mon, 26 Jul 2021 14:47:48 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 11/12] linux-user/syscall: Remove unused variable from execve Date: Mon, 26 Jul 2021 11:47:28 -1000 Message-Id: <20210726214729.2062862-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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, Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: linux-user/syscall.c:8503:17: error: variable 'total_size' set but not used \ [-Werror,-Wunused-but-set-variable] Acked-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/syscall.c | 3 --- 1 file changed, 3 deletions(-) -- 2.25.1 diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 376629c689..ccd3892b2d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8364,7 +8364,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, abi_ulong guest_envp; abi_ulong addr; char **q; - int total_size = 0; argc = 0; guest_argp = arg2; @@ -8396,7 +8395,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, break; if (!(*q = lock_user_string(addr))) goto execve_efault; - total_size += strlen(*q) + 1; } *q = NULL; @@ -8408,7 +8406,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, break; if (!(*q = lock_user_string(addr))) goto execve_efault; - total_size += strlen(*q) + 1; } *q = NULL; From patchwork Mon Jul 26 21:47:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 485874 Delivered-To: patch@linaro.org Received: by 2002:a17:907:d92:0:0:0:0 with SMTP id go18csp4018673ejc; Mon, 26 Jul 2021 14:53:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ2QqLSsAnROL6jExhdzfNcfbA/STRcGibW88GVJUQQHLKlRvf3qX1hEVQ4+JwtDw/LbfH X-Received: by 2002:a6b:e70f:: with SMTP id b15mr16934655ioh.67.1627336426372; Mon, 26 Jul 2021 14:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627336426; cv=none; d=google.com; s=arc-20160816; b=iAXPtgwDt8YBZCem44amMKthTZzH4o1xyvNekgQyyR8zVoX4FyPgCSi4ECo7SprK5y zP+c5GkfqOY/CAtRblRNhro190iiwTvpmw7I1B8qEg0Y4+qQsuS+OvwL+EKBDyT/y12P OuUiEcahNzgKzvk+9SgTPy1RYJLY0C9EKwlu2Lud9ayODTeG6CCb7PgOgaNvS0+m9MDP czu8Q0iYLYxIUkg6Zz54DJLU2bxVuMcbFMabenVSpfMJdfvb0rm08pNu4D/dTGjzj7Bd T5eq+Dmwfwff0IrlC/bYi0G7TqMnCvOdPRfPVaEZkj7SLgN6L6jKFoshTVoBcyfhwJCH E3pA== 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=QxBjgCMLIKAw85vE8mpb69QJsoP7x3luF33C4fQ6fGY=; b=dQG+khzwAbl7pr4oC4iZg8fNNTGQMrpSI25FoHOrMd4u3He9oBrKQCtYzgedfQezHD a5kTvrZ/+ozUBWU6d/RoUEUKK/VbffZCXMnwPhjHKW+oFDj4vi5JjiiQ1yJO1e4vSHlm Y9oHdvzKHxCrxVxdPgMX2MdLUnaTOf5CojN3QhzPPpWjIM9kHPKeSWG5jxxE5FqVgTqd iTLH6HsUpVEOL4NtSNYi2UEMLOF3Lwck13H9hikWHZ6ZxlapY6npFeJlvbqPK/mdaZ9e donCEOj+YWTql78R9iOG6nJuh9hB56HkFAah/U3ylW0W0OeBZGD4JsJy2BR88aGISixW hiOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tw0GFODH; 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 h10si1177205ile.139.2021.07.26.14.53.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jul 2021 14:53:46 -0700 (PDT) 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=tw0GFODH; 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]:33732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Xh-0006nf-NW for patch@linaro.org; Mon, 26 Jul 2021 17:53:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m88S0-00039s-8W for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:52 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:34430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m88Ry-0006Fx-Pb for qemu-devel@nongnu.org; Mon, 26 Jul 2021 17:47:51 -0400 Received: by mail-pj1-x1033.google.com with SMTP id b1-20020a17090a8001b029017700de3903so1084650pjn.1 for ; Mon, 26 Jul 2021 14:47:50 -0700 (PDT) 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=QxBjgCMLIKAw85vE8mpb69QJsoP7x3luF33C4fQ6fGY=; b=tw0GFODHjjeT/CubWiaPClxZa9EegPJxFDwyEjPeUxAAf8YICDKMyBZp95OcZ7d6Kf d30tMCl5UcUIKmLOFT9ImokFLSAF5qQ1LRrJEgCF+XIqJXzUJ3olEOdRLHRoNIQljgYE xmQ9YYNLe8kbFsJ/QHsdJPfNzcpCnGrLfNA/vNeBcEbQI/IgFjTOfp2DwBSYiPalZJCh NR5+h/+zNPyp27hcSvNuXNfys5nNY+EnSqb48PYMQS1d+GaNp+RsaifneqJYPw41rV/X 2ksD7IEKBGRqqyhFchEKAPCa71+MexMianq0VXT8V4x7gHbUw1urLanhlZyDoXXyOH+5 JB0A== 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=QxBjgCMLIKAw85vE8mpb69QJsoP7x3luF33C4fQ6fGY=; b=amUlJDBCLyIqRNBHWCamEMDZ5VDo3gHDLMg+uMolv5HH5qloZIq8iH4/cvB6+G3O28 aYz8m1dd/06KMEXirV3/qcQ4/YQYcLta+tWz+kIIu/p3nz0GkFFLDbZcc+xEWbuG+s3M GOTON1uSZBsTw+Pe6HfsvzPuNJziFEfv/sp17mCFEjK6ohrWgUPf2NtVHSAOlDZXH7wQ YhzxYOi+fUCerEUQ0+0c7nLPgWAu5boe9fsI+opvSuJk4B52hqZ+wOUhIGBxgRH3vGGV 2EC0jzwshJJ60b0oFRGGACzA1uDZarSLKKj0i1U9f9yFSL+CtGxGbr0tNEz7DRvOlK4k IxcA== X-Gm-Message-State: AOAM533PsWqoM/C2ds4P/0KnjHpFl02d/JZskw5LNjqft4MCjj3B6WT5 ScmZLkEP4XyzFPDlzAVaSHlhWAGw55U3iQ== X-Received: by 2002:a17:903:2445:b029:12b:9d0e:6b97 with SMTP id l5-20020a1709032445b029012b9d0e6b97mr16170274pls.84.1627336069486; Mon, 26 Jul 2021 14:47:49 -0700 (PDT) Received: from cloudburst.home (2603-800c-3202-ffa7-497b-6ae4-953c-7ad1.res6.spectrum.com. [2603:800c:3202:ffa7:497b:6ae4:953c:7ad1]) by smtp.gmail.com with ESMTPSA id e8sm997679pfm.218.2021.07.26.14.47.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 14:47:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-6.1 12/12] tests/unit: Remove unused variable from test_io Date: Mon, 26 Jul 2021 11:47:29 -1000 Message-Id: <20210726214729.2062862-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210726214729.2062862-1-richard.henderson@linaro.org> References: <20210726214729.2062862-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1033.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, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" >From clang-13: tests/unit/test-iov.c:161:26: error: variable 't' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tests/unit/test-iov.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.25.1 diff --git a/tests/unit/test-iov.c b/tests/unit/test-iov.c index 9c415e2f1f..5371066fb6 100644 --- a/tests/unit/test-iov.c +++ b/tests/unit/test-iov.c @@ -158,7 +158,7 @@ static void test_io(void) int sv[2]; int r; - unsigned i, j, k, s, t; + unsigned i, j, k, s; fd_set fds; unsigned niov; struct iovec *iov, *siov; @@ -182,7 +182,6 @@ static void test_io(void) FD_ZERO(&fds); - t = 0; if (fork() == 0) { /* writer */ @@ -201,7 +200,6 @@ static void test_io(void) g_assert(memcmp(iov, siov, sizeof(*iov)*niov) == 0); if (r >= 0) { k += r; - t += r; usleep(g_test_rand_int_range(0, 30)); } else if (errno == EAGAIN) { select(sv[1]+1, NULL, &fds, NULL, NULL); @@ -238,7 +236,6 @@ static void test_io(void) g_assert(memcmp(iov, siov, sizeof(*iov)*niov) == 0); if (r > 0) { k += r; - t += r; } else if (!r) { if (s) { break;