From patchwork Sun Jul 25 12:24:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12398081 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.6 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,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 2C6F2C4338F for ; Sun, 25 Jul 2021 12:25:58 +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 87A266054F for ; Sun, 25 Jul 2021 12:25:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 87A266054F 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]:38940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7dCe-000359-N1 for qemu-devel@archiver.kernel.org; Sun, 25 Jul 2021 08:25:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51466) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7dB9-0000Hk-AP for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:23 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:35630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7dB7-0003lk-RD for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:23 -0400 Received: by mail-pl1-x634.google.com with SMTP id n10so731027plc.2 for ; Sun, 25 Jul 2021 05:24:21 -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=m3B9CrnRSDOeKXxeWXGDcKxMgiwIzx47M7NAowChwks=; b=sektDWaTOg1KfikvBoZ5sssayiL6yKwrTFwKeUxY78VFhiBMRlwS/nJWw8Z7Tyx9Wc KnveDM2nMRYQI7AgxByPdXpdYNpNI/MVH9ADwg+fFA4VFXZ5EJlB232VnwSEw4vSF+j3 sA5mKxcfZqVqTOYCNZJQduumswfpZabuayRiv96XFxo2P6/iCt0ni+NOblLbFT4kBw2M weYli2ZhlZbM7MNgbGrQNkP3+0I1/bKV8zpxF+zlBnCdKLxNPK95/3UXhVlan9e6lRTh vr2Bf6x0ja+tmjaNfDyW/e83FQIC6UR2SBRVP0KDITen/0GdnKdRZCF01j1VKbPrgQB8 aTNQ== 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=m3B9CrnRSDOeKXxeWXGDcKxMgiwIzx47M7NAowChwks=; b=muHJlwUsGBheTELaiEAzbZznJ0f5xU5aiJ05KdA+PZA/bh1H1BwDdfMOikmZ3qXvAb 7wilaVhEls7+c8r67Py7veRNqr+zD+ME8LqEFtkKya0jy62QlE1TfWXiS+Cjm/m2laLd UFbTjqcV724t/K2cW4r8p0+twOcpil/0bQeN7sOwJiPM5mzJNgi9BDLHNDhyTgmg2sdu qDdi8jKjNlwr+iIUA5wtKyQCHpBl3NOyAXZnHRxQy7bsmlvm6OW8tLIYXmcktG0kBLtD mtOqc3k0RtjmWiHzulvnXfuzBmQuRQ520e9rwJzutrSDjeMnIAScYwcHVbx33KlNz3bN BxXQ== X-Gm-Message-State: AOAM530u2hTDPnJBlk/nE6tJprmYrx2iqcw/CzJr18k8GyrPL62D6HbJ yHQ15X5uBWF4Xc8LkISU+07kKRNdECrHCg== X-Google-Smtp-Source: ABdhPJwZnvq8BihUY/OWBYw/A5dxz5DqIYMKUqtNGbJWlpaH1fJ3sd11jp7NddjbUOR4Y+iXFWGeKA== X-Received: by 2002:a17:902:e84d:b029:12b:b2aa:5266 with SMTP id t13-20020a170902e84db029012bb2aa5266mr10572277plg.65.1627215860453; Sun, 25 Jul 2021 05:24:20 -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 k37sm15005093pgm.84.2021.07.25.05.24.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 05:24:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1? v2 1/9] nbd/server: Mark variable unused in nbd_negotiate_meta_queries Date: Sun, 25 Jul 2021 02:24:08 -1000 Message-Id: <20210725122416.1391332-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725122416.1391332-1-richard.henderson@linaro.org> References: <20210725122416.1391332-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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: Vladimir Sementsov-Ogievskiy , Eric Blake , qemu-block@nongnu.org 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. Cc: qemu-block@nongnu.org Cc: Eric Blake Cc: Vladimir Sementsov-Ogievskiy Signed-off-by: Richard Henderson Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- 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 Sun Jul 25 12:24:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12398083 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.8 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,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 E45D8C432BE for ; Sun, 25 Jul 2021 12:25:59 +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 92E626056B for ; Sun, 25 Jul 2021 12:25:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 92E626056B 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]:39138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7dCg-0003D0-JE for qemu-devel@archiver.kernel.org; Sun, 25 Jul 2021 08:25:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7dBA-0000Il-L7 for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:24 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:40509) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7dB8-0003lx-RV for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:24 -0400 Received: by mail-pl1-x62f.google.com with SMTP id c16so2818742plh.7 for ; Sun, 25 Jul 2021 05:24:22 -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=xtzZz/U5JKEQZUS0677OwXuHCf+mZlqk4XuZ1mS9HA8=; b=TnEvzqs2ZhBy3RuFm60C8WIKal1UhxIL5I9i43NH50fgBJ1rPrVhV506jBDPM3e8aH uyGNLqYy+R8QCRyQajbi3EHwX2wY5VU0Z9e/80f/cAWytfJubBn3juZTgkDD+2QmQbV5 ivjjkQwJNN0kuCl+ZFoZayKLsp5Erds4Ju6cQjwoIrqNsKH5qvKzxDPPamgXPJXaOsaj WWDCGUhPRzR/JBbv/U/8X59v2UjA4ViOlAmR3ULvqRU8N6NtON66UCBUrWWrYEWbD/9P IydInGx8oGfGsygnBgZt+98+kgRPsVIto/D27rjNMlZrGcKskGOVufpFA8SoJJyuSEjG ywdw== 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=xtzZz/U5JKEQZUS0677OwXuHCf+mZlqk4XuZ1mS9HA8=; b=jqq7gQ7Uhjmk8/g+sJpNHMl9ArhGDdHaFDGG9fENrNkQEeeD5p057hccEhI2xreaf0 xULmY48tUMKz9YkqO1PCsTKxla6SOQyAfVr4Bz+YRq+IDSHD5O1tZ20gLP06DyhzfrW7 bUjL49LvqS+a7vllTSYbA0I+Bpb8T7K6U3d33bH0KmX5fIPzu34UlLsYpSpiKTg9R2Z9 a4LoSLtyTllkl6NCCn3HysWHnd5yjVxSMCz81Q0vgHoLaox53sBc5W2gteQ0mOE54Nhz moBXoo9PSsG/peYcDaAkCJY39LHCIucLVtkJq0KMzcTyLVJaDQ2jK3dovS0rgWkK/D2H cgRQ== X-Gm-Message-State: AOAM531RJfU3WrV9klezUrsguO5qTFMpR5lC06t+O7QW2h2+vEsuVoUh Gkd9NuOEz77Y+/LOHoVIv+vSQ4QfdNz6cg== X-Google-Smtp-Source: ABdhPJwNFhThOI/ZqVT/G8nfhoWNjTd71R48grLzZVNucOFcCCTO+3rGvfyiOJuXqIvxOkkdMeVS8w== X-Received: by 2002:a63:4e51:: with SMTP id o17mr13783774pgl.126.1627215861465; Sun, 25 Jul 2021 05:24:21 -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 k37sm15005093pgm.84.2021.07.25.05.24.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 05:24:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1? v2 2/9] accel/tcg: Remove unused variable in cpu_exec Date: Sun, 25 Jul 2021 02:24:09 -1000 Message-Id: <20210725122416.1391332-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725122416.1391332-1-richard.henderson@linaro.org> References: <20210725122416.1391332-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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: =?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 fc895cf51e..1c6f684cb0 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -853,7 +853,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 }; @@ -887,19 +886,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 Sun Jul 25 12:24:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12398085 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.8 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,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 1B831C4338F for ; Sun, 25 Jul 2021 12:26:05 +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 D584D6069E for ; Sun, 25 Jul 2021 12:26:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D584D6069E 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]:39720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7dCl-0003ae-Sj for qemu-devel@archiver.kernel.org; Sun, 25 Jul 2021 08:26:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7dBB-0000Js-4s for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:25 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:55286) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7dB9-0003mB-NA for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:24 -0400 Received: by mail-pj1-x102e.google.com with SMTP id b6so8874981pji.4 for ; Sun, 25 Jul 2021 05:24:23 -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=2ImKU68gTkjOHyhd7vGGn5r6p+r+U80RWmIEnEGwVIY=; b=vMgNlOiOKKBtx4bfpaRzhXSs9+yydGdUv+8iPTQMHW1+nP/JIwwhbRcMparv6ASxer NQSgaHwEk2XITN0aAMhf9kbFn4TnvZh5L2k3ivUKJ7kvwzYjxIZ7bbseYxdfH734mF74 S5bBvxMhFHa7klf4/N9fyRmh8ZRZ5hFUUx3lLAHss6ZfsCBIO1dK9TS11U/0ZbcIwceq Y0uKDWZshSHPZA5JkuqE8UtpHguqnPscupOGuISl/eLfvQO2858m7M+BEMIWBKhXk6oY tJEG2470bW9pk2vEaOu/kDj8jGvTQNcsPlACUGyPmtCbGoH1zlinPjQvKC+rx2whtnHJ FYIQ== 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=2ImKU68gTkjOHyhd7vGGn5r6p+r+U80RWmIEnEGwVIY=; b=ch+FtmuUtEQQVYolXTbMfUUdh17B+tmFW7ufUjAfRrkEv8EPGe86p3kkXoxdo9hMPl ODx5YoSqk7dyCxZzicSr+8LQ2dMGexeQ7WcPHzWoYp513tfHeRHxOLwzZbiO8OoN+FPF 9NOm+T7qlnTkoD9+QCKgiBEOO+3ro63612rIVcR9zwfWdu+zKTKmiXXDKPtS7IZeOA17 tcHO75xOsx2YusZs72O3Qcq3/oshgqpSeSx7s2QmSsNE9whWr3t+rYTtGBxofWlOVheU Hz6PJoUlgX1MUary9jpDqPRoAzYAGsKejZgDiHlthVrqjW5p6/Knjb54suajiaBpfodw WspQ== X-Gm-Message-State: AOAM533+3WunnDBb2N6Ee4DgENcUyDoMl9XAo/f9bosYhmdk9Ijs+wAb oicKyVz2tYRokyE0tQlYGfxrNCYY0vmzAA== X-Google-Smtp-Source: ABdhPJwLyglhw82ryynTtiSac2RVDEoZGu9y+mat++sfr1y0tNWy9QK0YUou4KnWXBBl3Fd8RLiiiQ== X-Received: by 2002:a17:902:f542:b029:12c:6f4:ad92 with SMTP id h2-20020a170902f542b029012c06f4ad92mr3928399plf.5.1627215862461; Sun, 25 Jul 2021 05:24:22 -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 k37sm15005093pgm.84.2021.07.25.05.24.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 05:24:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1? v2 3/9] util/selfmap: Discard mapping on error Date: Sun, 25 Jul 2021 02:24:10 -1000 Message-Id: <20210725122416.1391332-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725122416.1391332-1-richard.henderson@linaro.org> References: <20210725122416.1391332-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: =?utf-8?q?Alex_Benn=C3=A9e?= 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 Signed-off-by: Richard Henderson Reviewed-by: Eric Blake --- 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 Sun Jul 25 12:24:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12398089 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.8 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,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 DD265C4320A for ; Sun, 25 Jul 2021 12:27:36 +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 97ABF6056B for ; Sun, 25 Jul 2021 12:27:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 97ABF6056B 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]:46524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7dEF-00085e-Mr for qemu-devel@archiver.kernel.org; Sun, 25 Jul 2021 08:27:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7dBC-0000NG-2H for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:26 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:37621) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7dBA-0003mv-Ic for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:25 -0400 Received: by mail-pj1-x1034.google.com with SMTP id a4-20020a17090aa504b0290176a0d2b67aso7275384pjq.2 for ; Sun, 25 Jul 2021 05:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=jKT88FJaIPG7gZArl0HUCsFrykLbgFymcE0AdSiWRRE=; b=vXcKDBWKStWTi5GZZVyCE/pbQxstLGlu90bkIZdCapznmbZRHj7iSSao0QMDzFJ/vd sMpP3fTaLASqJ6fM/lmlMgOcYOKFrkXzzonNsuTut7sd6Ba9M3YbxccBaNPvwCDCbzyn o8sG8f606bMYcIQZbbKBMhil+8GaYi5kt4CvrFCN5vp7r+P9mm7QN47K5c6T1LiY0tPY WGeKz9wHacltN6h0Vk+3kDwfswuMWwqKjSVqGQO7VMr/etxm8kMAEVpNND5qqPbTm987 Rus4I4nZhX5UvbLpxmCLG4QUw7/dNBbolrrkM6y018E4vNJzgsc6Q4tH+IihWUN99df6 wONg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jKT88FJaIPG7gZArl0HUCsFrykLbgFymcE0AdSiWRRE=; b=Y0vdU8btJZ32dJPHzIsZUuu+XABvLNf4jpbwqwfS6H5StEtyirJo22pLvrH0J/FL5G LTcibCd+E/NfNHIISQccs7soHg/fdOrlglC4Jml8mckaVhrVuwRAyZUAavxyD3wRlBYE HtpR2EVKX9d+T0Wuk3+CZZmb7BIt16OiPOH1NPmIS257OF20YDv9sujy29/Tz9zd8Dqu 4psQHthdVbD8dQlDqJRk98GMFMxxQontjFjODGBybx1ZrmzbdDMwRaSybthWWtQ9SGlb Lq7ARp3AqLjZt6qTffVOwRsTvbx0ZeipHZ0pNVODAVOeT48u8XHAeiLQIY6yoOMyP/10 2Xxg== X-Gm-Message-State: AOAM5312GHO7SFD4wk8rtTOiq1IwZrKFNmOoid/vG45OdqnE3UukugxI m8qd3Ls/LdxJxeTDNejck5ZqZCaIqSn2pQ== X-Google-Smtp-Source: ABdhPJxgFUWeUlhPt3ZoG9NkOycU/5V6yPrE5xwLl2JQy1KRr/uGpJDqBSBvk7EiUuu44w3d0r2SAg== X-Received: by 2002:a63:cc0c:: with SMTP id x12mr13337759pgf.1.1627215863384; Sun, 25 Jul 2021 05:24:23 -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 k37sm15005093pgm.84.2021.07.25.05.24.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 05:24:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1? v2 4/9] net/checksum: Remove unused variable in net_checksum_add_iov Date: Sun, 25 Jul 2021 02:24:11 -1000 Message-Id: <20210725122416.1391332-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725122416.1391332-1-richard.henderson@linaro.org> References: <20210725122416.1391332-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.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: , 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] Signed-off-by: Richard Henderson Reviewed-by: Eric Blake --- 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 Sun Jul 25 12:24:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12398087 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.8 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,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 B0E11C4338F for ; Sun, 25 Jul 2021 12:27:35 +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 6FB266056B for ; Sun, 25 Jul 2021 12:27:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6FB266056B 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]:46404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7dEE-00080v-Ih for qemu-devel@archiver.kernel.org; Sun, 25 Jul 2021 08:27:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7dBD-0000RK-21 for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:27 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:44621) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7dBB-0003nK-Ko for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:26 -0400 Received: by mail-pj1-x1034.google.com with SMTP id e2-20020a17090a4a02b029016f3020d867so10251580pjh.3 for ; Sun, 25 Jul 2021 05:24:25 -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=sJy7zBVGQg4uRG9RykxQYUTe6BHcjNm6ixAgvpXWXq/Uj1kn6Lm1aE3nq9vKRaOm5G isAJNbFDEeb9HxzFpKbuEMH98Lni478HvIpK0//Gq0l3dUDxl3GyfqinsJqmmqN6eD/U COzSLma20B2nxrPqTJujnd1upMWfUrVt2JAc7LYd02pT/BsQy+8OooBPMKwQnoE57l5T IQTE7P0XXY4+L7uVLz1pX+Mgmgoi5CoNtX2FcAvwA18LBPym7FYDQaJDu6cbc3JiIgmC VF58sC0tdb26dwzPxigACFZhluucx8pbp49CqjY7rBhrkoin+pnamum7IzoRe1m5+PtG 1V1Q== 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=FIvh5oVcc1Ozoj/pU6JNAhc/lBsKOY8hWTcm4pdO6B3+CZAIUUG9610U7CZokODKpX gLybalwmLEdNI3Nmk6ZSEff4+zjoq6Bl1lomXpJEot9i/SExCNwfHs8MAc3zvNRSigNQ bvR6ybmzcQTSPaIJtfAv13ydH9l7+J2n0jBRG4RyvOSdflrbMcNE3Ityfr551HGi2YaH i3/p+ExgXrMv+m5jPGd9nop5WkYHCQueDEwwHqkIGgBljsjbYYZq4iDnBx0hpv5+Mf2p X39brhUqMW/1mnJP5rm692ZI4gGb1Hz9imIujiRl0TTsNPAP/hccSbjlifuQVPbA4aI1 an8g== X-Gm-Message-State: AOAM5335auIiWb3xMI/tVIo/2N+JiGFz74aMlSHaGAfmx/KIQM9985m6 YULwBq0GN9XQTSyCg+RlIUlLAOEQDjW4Og== X-Google-Smtp-Source: ABdhPJw2g8Qcv04y0AX31f92X1vd9eOXHMKwqC58xgwCvBc24gcW9oce7lwgwxQLQ8hPqjoR77S50w== X-Received: by 2002:a17:902:e051:b029:12b:4f40:7c7c with SMTP id x17-20020a170902e051b029012b4f407c7cmr10695366plx.20.1627215864413; Sun, 25 Jul 2021 05:24:24 -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 k37sm15005093pgm.84.2021.07.25.05.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 05:24:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1? v2 5/9] hw/audio/adlib: Remove unused variable in adlib_callback Date: Sun, 25 Jul 2021 02:24:12 -1000 Message-Id: <20210725122416.1391332-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725122416.1391332-1-richard.henderson@linaro.org> References: <20210725122416.1391332-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.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: =?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 Sun Jul 25 12:24:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12398091 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.8 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,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 24729C4338F for ; Sun, 25 Jul 2021 12:27:44 +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 D7F3360F35 for ; Sun, 25 Jul 2021 12:27:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D7F3360F35 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]:47176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7dEM-0008WK-Uh for qemu-devel@archiver.kernel.org; Sun, 25 Jul 2021 08:27:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51566) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7dBE-0000WH-9h for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:28 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:34649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7dBC-0003nb-RX for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:28 -0400 Received: by mail-pj1-x102c.google.com with SMTP id p5-20020a17090a8685b029015d1a9a6f1aso10504553pjn.1 for ; Sun, 25 Jul 2021 05:24:26 -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=ip0LH2P42J2M8tOAjH37YMhgr+3bFIGD2fcdr8RIeEYQeIqkFP3Vu97nIG9U2gO7Q1 EkjPbZknW+BcZsq5MmhEnTi/j7KnIgkjte1wt9B+gBAQNBXzyo5Pk/azVzaRLYlvRRJG vlGXSS24r+k3PiOiuIzUFb3z8h7X+DykmWBksAgEcNzikESbCsA6eYdc5k3+dJqcST62 Tk5EE79qKQeVkNxO/FT7VGyiaAc3mvsWzESnhQU0BviLZq+cn7HlIoqb/MYLjmOnKLrO cFwImpV91ngqsj9JjBVxnSxq6xHIQoZdJtBfw72JmbaC0a3FHz8r6VBXZm5eumc0E1cx QkGw== 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=TtWkE3Pc8kiawhRd5cXHea+e5pODTgQMrfFPh6CHWnHL60Sgnb4hgfpxLaHpDlWnED 5iUTD9Sbdva7egdCpcpgBzRVRO26PtFXM7GP2+plmpPNPpL8bH1iOErmYKz8OLwCQJRi M/Xj46YAS34NtpePBj0E422h3IbhT8LYdwrMq+i/syzQDsElYwKhm6cnyFY9c4oLqXDg OeqHPwcWBhMtuSUyGP5HX1drrMLuA6kgRoCAzl3aa8Oh0/3F6ZcCoejmofkmefAM3a45 +qwHunOZGQR5TjMTtzBIftjPeyCk4YDACzU6rFbgBAw50cgoa7U08XkkXXG6iEFBThuD dl8A== X-Gm-Message-State: AOAM531bSgdUn/FHwT2Qe9mKLkrEnpV5jk4PMY3hhGVBfu7APw6J/jYa QZgp1+tOt0Nj7uOR3VjCqAU8LetVLAOAYw== X-Google-Smtp-Source: ABdhPJz7iJkM4sxUewN5L8WisUwOudKnxHYRtjmZ7aDV/jgAMEwIhr3KjMXJTJHlVYoyjIoXDR7Fbw== X-Received: by 2002:a63:550c:: with SMTP id j12mr13470278pgb.31.1627215865635; Sun, 25 Jul 2021 05:24:25 -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 k37sm15005093pgm.84.2021.07.25.05.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 05:24:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1? v2 6/9] hw/ppc/spapr_events: Remove unused variable from check_exception Date: Sun, 25 Jul 2021 02:24:13 -1000 Message-Id: <20210725122416.1391332-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725122416.1391332-1-richard.henderson@linaro.org> References: <20210725122416.1391332-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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: 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 Sun Jul 25 12:24:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12398095 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.8 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,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 C8732C4338F for ; Sun, 25 Jul 2021 12:29:04 +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 8C35C60F26 for ; Sun, 25 Jul 2021 12:29:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8C35C60F26 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]:53510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7dFf-0004H0-PW for qemu-devel@archiver.kernel.org; Sun, 25 Jul 2021 08:29:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7dBF-0000ae-99 for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:29 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:42768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7dBD-0003oG-RV for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:29 -0400 Received: by mail-pl1-x634.google.com with SMTP id i1so8387950plr.9 for ; Sun, 25 Jul 2021 05:24:27 -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=jfHnxKO+h/7J4Tm9ly0oXqhrTY2aGD6lpNPS47bAq0Y=; b=xDfJQsnk/1lpEGEfiYyzLvkPOqNVm2cDua1hLaMF9cPdQRfDfMrIGp57UYz896VVYe jZf2bGz1IkQXwohHs3y76NJsa9/QY3NOYL1Juu9uaSmBF/WRJSZYyQpG4q5K7Spkm2t9 95DxTmbf7gYDza/zw5VkVQAbQ3gseJOXrFSP5rQK9Y/wj3a1ZvklHEQgotNgSWah59I3 wpyIXeAJBvZQ4iHeWr/+3HOg3IlLNq12hOkro/ExIV+00joBCs2coR8hhJSiTDsyjCOR nA+1eOe7xre2eS0DPXfLPGD5ezdkq3mlqIovVS1Fe0IjnuD1eoZzQv0wLrSQlhAg7ppH 1uhw== 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=jfHnxKO+h/7J4Tm9ly0oXqhrTY2aGD6lpNPS47bAq0Y=; b=lzGVpiSZHs8yO6KkgTP0nPJ4a2P8U6p2ISEMXNhhRk93N01zTIfQl/ekB54dee7AYd +VI23ZgpVNKp/owEICPpvYY4AvbuT68tAZPRQFo5xUSF0H9Law4cDH2hf2j2YySOYVGg LiyVXlwNSTnLvQB8M+uppr3tPYPkDEbASatvIHkeNTAdUN92wnHrCjJdKhJ6VqW3Egi9 u/KLIRCW48FfoAcKMoB/+ADbN5uM5bJP1t97/O5on4eQn+D96GFkARN5l073SXA+gi77 eQ5634bt+UIKjbEfy7HcpA1Au/g4eBsyYSHz0BmKrylZNHW/2KnDGk4Emfh3DI+GS5kn /ZDQ== X-Gm-Message-State: AOAM5302mafx5FowcKLS13vOqA6hdaJdNokpTVE/zHR+pv8PggudxUsM lVTBPPnSG/xfPg7zW7MIZ5HU7zV3o1HNLg== X-Google-Smtp-Source: ABdhPJxVw0hUlsgO/9kcl4KntMNMdZkciqqCT2oSVKy4c0l9cbFE/fbdV+EzCzZymc8C3OwfcIOuyg== X-Received: by 2002:a63:ef4c:: with SMTP id c12mr13544003pgk.441.1627215866662; Sun, 25 Jul 2021 05:24:26 -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 k37sm15005093pgm.84.2021.07.25.05.24.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 05:24:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1? v2 7/9] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write Date: Sun, 25 Jul 2021 02:24:14 -1000 Message-Id: <20210725122416.1391332-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725122416.1391332-1-richard.henderson@linaro.org> References: <20210725122416.1391332-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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: 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 Signed-off-by: Richard Henderson Acked-by: Benjamin Herrenschmidt Reviewed-by: Cédric Le Goater --- 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 Sun Jul 25 12:24:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12398093 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.8 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,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 82D00C4338F for ; Sun, 25 Jul 2021 12:28:56 +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 4133C60E0C for ; Sun, 25 Jul 2021 12:28:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4133C60E0C 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]:52810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7dFX-0003oH-Bk for qemu-devel@archiver.kernel.org; Sun, 25 Jul 2021 08:28:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7dBG-0000fL-8Y for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:30 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:38537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7dBE-0003oZ-Sj for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:30 -0400 Received: by mail-pl1-x636.google.com with SMTP id e21so3904719pla.5 for ; Sun, 25 Jul 2021 05:24:28 -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=uQ/dHF1fncyUiNaFC5Cvg2GRealO8bbRMDMxRDICmId94PvmwllRT+XZN4u+4ig5Fi H2cDcuqNLdkhrndkcjtHFGBhky3w/TdR9RUiC1FE2LmMG0whzOtLmuZ/5Wu99aTBCoY1 9Xj8rHv6IBhge9EEzadF8RCRuZ1yo//UN3hl2oyrnTxx7Ypd6fTe9ibG9LWowTYYcsUl N+vFPPlC1CP5w+1IExUlVfBq8pFqkb2/C4Tf7TeKlVLXXmVLesQbZOvlzUKQoCZewgFF ddMd2f81YgRS+yE4nBlV7d2YHeM2E5J9q1lBr9CW69p4ERh4UwxPTAuPd2W3JdPBhv0v IK5Q== 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=cVar8wyR5e3hHpof6D3J7NKAHgv8/Ed/0xuoR2GbQoyZKk4Bqi46JcFMNE+Z3Y4zQ5 2E2xN3cnpnlFRgcxVKmf/gIsTK2VuiCdlKUnYjh1nQ4ufMQSYd0W3OWNTmvvJwf4T4P/ Jc1WuiapmEc618O80PfbSK7IsDy2eEmU39p4kmqrqfTCKhsE9VKDjr7GAOyvL+PbHV8p BUe8pmYMy6rO72KtnJbSo59c3QHJJrm/6Nlod8InQddM6mf9oOQe3WfUYESxm5lrgbZF SwrYZf7wpCol5Fi8B1c5bDfqt4u60EezW0Rrr9HjTjoEzGotIP8AC1+ZgF7xdd3IYIMI 1jHw== X-Gm-Message-State: AOAM532t3jSOhb2MUJUi7MTnbHEgAWIximgL6o8qUxpDzBn/Ovx0uugX FUurQtiXuh5CEy+z5nYESKtei90Z1k0YzA== X-Google-Smtp-Source: ABdhPJwu6Prz4x/QO+VqpdpGAiodLhud7h1cOkSJNBZqTRY+YAOERN8ClfQYcU4J1JGYkbE9jD5SPw== X-Received: by 2002:aa7:98c6:0:b029:32e:608b:7e86 with SMTP id e6-20020aa798c60000b029032e608b7e86mr12996753pfm.68.1627215867699; Sun, 25 Jul 2021 05:24:27 -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 k37sm15005093pgm.84.2021.07.25.05.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 05:24:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1? v2 8/9] linux-user/syscall: Remove unused variable from execve Date: Sun, 25 Jul 2021 02:24:15 -1000 Message-Id: <20210725122416.1391332-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725122416.1391332-1-richard.henderson@linaro.org> References: <20210725122416.1391332-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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: 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 Sun Jul 25 12:24:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12398097 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.8 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,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 C227CC4338F for ; Sun, 25 Jul 2021 12:29:26 +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 8917660E0C for ; Sun, 25 Jul 2021 12:29:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8917660E0C 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]:55288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7dG1-0005Rt-P2 for qemu-devel@archiver.kernel.org; Sun, 25 Jul 2021 08:29:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7dBH-0000mr-QP for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:31 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:33645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7dBG-0003oq-3Z for qemu-devel@nongnu.org; Sun, 25 Jul 2021 08:24:31 -0400 Received: by mail-pj1-x1030.google.com with SMTP id gv20-20020a17090b11d4b0290173b9578f1cso10516334pjb.0 for ; Sun, 25 Jul 2021 05:24:29 -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=dc8UfeWSgIKb1HefXC0VyHkMikz/9soVWErK9termVgqLKQTWcuqRk0abkp1ej8tXU BiIGlVPWMYU6lnnl0c3k8eRYVIGj4b4nySAQWv3oKR0KYDJ2adyMLCyYsqpCTj+wPoM0 ZGHYW6uADUKMDJwe6hDeG9nYp1KzNBwvl2ead4Q1GKS1xUeS6+b/2WtGu/q/MbE1CdtE tHwmRQYpL/cruBh+WzlI9/PcDb4AlQof+Vn1Lvt3GlOIV6T5G1WIg1aGuy0Ytp32n0OA SenfQPm0GGmuX1xhfAZfqLZNLb7fzXl4DfHTNU+DqXtqJ2MDYlBhAvRIOCJEaJrIpIQX R4jg== 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=bsteiTZVHbM/O7gBYIG4nc3M1mRJBxnoQSXsbXOoCOkhFCxyKGENNRLFOu0vPMHV+W PyttG8GKTLMCjBVcjV3kKfaX8h9lzTFe0iLNJkkzAJTwxoAUHyErNuVQW0IdsSIpsZPc Wo0B4M3GwT2wmDgyCSZ049/00vm5+76uejmtWtzeD6ykFU/TXlOAoUVtJmw5qvqMfJ+U QZkiL8WhU7RhT/++rPyN5JQGt9opS8cVpqtk/9ueqmf0sufFBrYhaKmJG+Jg2GL7deR7 NFA5TYT/jPbP9DO3IbEeL2pfxyfpZfMtIrbcQl/ntxOEeuyz1VW7KiUPLGw4qRMlolWp vDMQ== X-Gm-Message-State: AOAM531U/Vwtcu1tQAF+tFsdgheFnQlNu/RXPDun+jniAtrznNIGzAE9 IwbmUPx0y4n8vAWX21KQL3LFb7fChjnsGw== X-Google-Smtp-Source: ABdhPJx4qIShfWZ4SQMEVYv79mV6Jg6RFXyieubeUEUK4opYbS06vWL3EN1+6zdg6fJtWZtJRVbfzA== X-Received: by 2002:aa7:8a07:0:b029:332:958b:7f07 with SMTP id m7-20020aa78a070000b0290332958b7f07mr13174289pfa.70.1627215868820; Sun, 25 Jul 2021 05:24:28 -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 k37sm15005093pgm.84.2021.07.25.05.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 05:24:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1? v2 9/9] tests/unit: Remove unused variable from test_io Date: Sun, 25 Jul 2021 02:24:16 -1000 Message-Id: <20210725122416.1391332-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725122416.1391332-1-richard.henderson@linaro.org> References: <20210725122416.1391332-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: =?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;