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: 12400849 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3578EC4338F for ; Mon, 26 Jul 2021 21:48:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C94CA60240 for ; Mon, 26 Jul 2021 21:48:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C94CA60240 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:45958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88SZ-0004Pi-Vu for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:48:28 -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-Google-Smtp-Source: ABdhPJxFn+mINky9/7FohTDZ9Dcu5c9yLDShJeJR2+nZ5SgpqWSBB38HQJfvPnclNLD9EbJSTqXpDA== 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+qemu-devel=archiver.kernel.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(-) 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: 12400853 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAD3FC4338F for ; Mon, 26 Jul 2021 21:50:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A74A460F9B for ; Mon, 26 Jul 2021 21:50:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A74A460F9B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:52116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88UF-0008Uh-Rn for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:50:11 -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-Google-Smtp-Source: ABdhPJyRxgdustE5umvJM9/ZytUFXbP2beNZNmyxooOV1JKJNMHKmB/q4weEr8Qhg85XCBszgEEL5A== 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+qemu-devel=archiver.kernel.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(-) 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: 12400851 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE5B0C432BE for ; Mon, 26 Jul 2021 21:48:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5735560240 for ; Mon, 26 Jul 2021 21:48:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5735560240 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:46138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Sb-0004Wr-IR for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:48:29 -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-Google-Smtp-Source: ABdhPJzw4IJYLWw35dzjgnEUA+h+Nmf9v5fmtvds42RqgwGmx+ZMyc9o2xZOXC90JHNtFESld7uMAg== 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_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.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(-) 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: 12400857 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24747C432BE for ; Mon, 26 Jul 2021 21:50:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2E3260F9B for ; Mon, 26 Jul 2021 21:50:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D2E3260F9B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:52528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88UL-0000KA-0r for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:50:17 -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-Google-Smtp-Source: ABdhPJwu8L7ZXdwej902Qekx1hbRRtUMmxkIeF8Kz6pZRltKGg1J8YpOdj6Sc7CEW0o6JXI2zVUEpw== 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+qemu-devel=archiver.kernel.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(-) 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: 12400855 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E29AC4338F for ; Mon, 26 Jul 2021 21:50:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4C8A560F9B for ; Mon, 26 Jul 2021 21:50:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4C8A560F9B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:52392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88UJ-0000E6-El for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:50:15 -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-Google-Smtp-Source: ABdhPJzQ6rj6QKePNIN/+OlKbwioEE/vn/yEdVdkJ2jzOiANOQMn9XwQm7y0F+SlXI7WBbPADriZTw== 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+qemu-devel=archiver.kernel.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(-) 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: 12400863 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C7A4C4338F for ; Mon, 26 Jul 2021 21:53:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF8AF60F37 for ; Mon, 26 Jul 2021 21:53:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EF8AF60F37 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:60958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88X4-00067L-Sj for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:53:06 -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-Google-Smtp-Source: ABdhPJx4BuR8hDhcs7m+68yBJ/ROdtX7z86F++7+5FuySTMod+8viTiX98I4ODhPhKUUWg4xn6Q4yQ== 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+qemu-devel=archiver.kernel.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(-) 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: 12400859 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73A7DC4338F for ; Mon, 26 Jul 2021 21:52:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3B0E360F37 for ; Mon, 26 Jul 2021 21:52:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3B0E360F37 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:58544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88W7-0004Rp-7S for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:52:07 -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-Google-Smtp-Source: ABdhPJzCrZgN1Xa+N83ZO/KT8ZDt1Gce+nuQ9OHhizNbj79aoPus7wRSwIzOCPF492EzCV8lur8gdg== 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+qemu-devel=archiver.kernel.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(-) 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: 12400869 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CC25C4338F for ; Mon, 26 Jul 2021 21:54:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 489F760F59 for ; Mon, 26 Jul 2021 21:54:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 489F760F59 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:38964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88YQ-0001uN-G0 for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:54:30 -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-Google-Smtp-Source: ABdhPJz9JbY7l+UPXpi1UhR4RBsRHmtOA+kslfBAPIv0GIqEAqilKc3UjPWPydNeKlJ6eELyyow83Q== 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+qemu-devel=archiver.kernel.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(-) 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: 12400861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 518E1C432BE for ; Mon, 26 Jul 2021 21:52:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DF2C60F37 for ; Mon, 26 Jul 2021 21:52:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1DF2C60F37 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:58694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88W9-0004YP-Am for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:52:09 -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-Google-Smtp-Source: ABdhPJz1wCnNaQy3920I3MnMkCw4Zn0zz+o84AWShn8DX87BequA631MT9hcp65v1VX0uTckzaGPUA== 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+qemu-devel=archiver.kernel.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(-) 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: 12400865 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B997C4338F for ; Mon, 26 Jul 2021 21:54:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB54860F37 for ; Mon, 26 Jul 2021 21:54:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BB54860F37 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:36566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Xv-0000G5-Rd for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:53:59 -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-Google-Smtp-Source: ABdhPJxHjl9E5q76X891gnbCzkVnx934OrOpbEIAPsQF7hPYxC5egYLEIza19UUZPIEp4HID0oNpKg== 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+qemu-devel=archiver.kernel.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(-) 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: 12400873 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C974C4338F for ; Mon, 26 Jul 2021 21:55:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D637060F59 for ; Mon, 26 Jul 2021 21:55:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D637060F59 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:43606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Zg-00058l-1R for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:55:48 -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-Google-Smtp-Source: ABdhPJwCUcNdHxpw7Ug0lYBChWbtat45Bx6fdePPZL9oKUU2VpySlIWC1wLAJXfOv269BUY1lqYMAw== 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+qemu-devel=archiver.kernel.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(-) 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: 12400867 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52370C432BE for ; Mon, 26 Jul 2021 21:54:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FF5160F59 for ; Mon, 26 Jul 2021 21:54:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0FF5160F59 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:36642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m88Xx-0000JK-7t for qemu-devel@archiver.kernel.org; Mon, 26 Jul 2021 17:54:01 -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-Google-Smtp-Source: ABdhPJyHFDUpzhZTBFT/1oUcewccLwtjeK9tYqb60Z+KJfgps4Gxq96OJv1Jyk1DFaBNz/LIJ3TVlQ== 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+qemu-devel=archiver.kernel.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(-) 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;