From patchwork Mon Jul 12 21:55:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12372387 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,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 72B08C07E99 for ; Mon, 12 Jul 2021 22:01:11 +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 375CF61178 for ; Mon, 12 Jul 2021 22:01:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 375CF61178 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m33zC-0000yu-Cg for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 18:01:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33tv-0000aI-Lo for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:43 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]:33348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tr-0006ql-FG for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:43 -0400 Received: by mail-pj1-x1036.google.com with SMTP id v18-20020a17090ac912b0290173b9578f1cso724882pjt.0 for ; Mon, 12 Jul 2021 14:55:39 -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=iyvaGMC6h5HLiIret8Mp3ndf9xYPQ8o8+AuZQESpOgY=; b=DPzFqEs3acNKDr6SkjYmqgBFsYTVS0IIUku+NMS1BmLR1ubh6PIyzP7+iRLVbaVz20 Lu7UNPOR2CDo4U4EHY5FBRzADuLJSETQGEfG0yRL/F/MrEplB/gEQIQvWNLBMhhl0X/1 cbhAvA0tohXqtl9pVu93EaOuTFiqaq2WAJHwIPBDg4ryRrYV6HI9/I0328K3dmgQsSRX 9SVFroCie0HDtvMDS3d7te5cS7ZIPu8LYLw+ECHcnAz6dx8rghLVrvfwBD6vmB3yw4UC JlGb3fepux2qdgi/COYJZRUZ/OHclzFjOK1W5C39j3ZrhLowpX1hRC4USyroBwPxpy8H D5hg== 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=iyvaGMC6h5HLiIret8Mp3ndf9xYPQ8o8+AuZQESpOgY=; b=CObi3oui0uMxseKPTTTbOLeTvh1iFkXXvW3ufZ5EAiphjxpioG7Puz79160+xWOI92 a/hEq1vIMesq04tVbDCjE/0l4yadGYPDtxbm9HpEHJ+PEkUUa2zpOIC0SIRVO2s16lyr aqKcIlcwUBA9chKAUvBq3bbnfo46505wCgArjPDHUh3h/5B9ZALDHqcUhh054Jl+lkCm VVZl4wIJC1l4+IQSjnw6Cj4Z6DgBU13YmncJ/w2Xa7Cx1DmPhY+iM6jHwRzC8sN06oNi 2pngVsVs8aB3L4pCkd1B7lQ5Qx9iuEA1b4rbP4jK58a1iC4RpC4KuNhyPQ918mQrdUou fWXw== X-Gm-Message-State: AOAM532U9arA88jP0TxKBWzpcCs6qludvwLF1qAvhqs2mRdCak1LAPzp zPixNIfhUI0E4Y9tyNDaNZ5FCbwfv9CpOA== X-Google-Smtp-Source: ABdhPJwLZ1AGRUEt91hy+D+14Wci8tqlZFgEAeAUkFggVgc4bXOn+qhKQ2ZZFDJYolXhHwlfWJyhjg== X-Received: by 2002:a17:90a:8403:: with SMTP id j3mr1008965pjn.212.1626126937990; Mon, 12 Jul 2021 14:55:37 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 01/11] nbd/server: Remove unused variable Date: Mon, 12 Jul 2021 14:55:25 -0700 Message-Id: <20210712215535.1471256-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-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: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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=unavailable 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] Cc: qemu-block@nongnu.org Cc: Eric Blake Cc: Vladimir Sementsov-Ogievskiy Signed-off-by: Richard Henderson --- nbd/server.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index b60ebc3ab6..721349ec00 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -973,7 +973,6 @@ static int nbd_negotiate_meta_queries(NBDClient *client, { int ret; g_autofree char *export_name = NULL; - g_autofree bool *bitmaps = NULL; NBDExportMetaContexts local_meta = {0}; uint32_t nb_queries; size_t i; @@ -1007,9 +1006,6 @@ static int nbd_negotiate_meta_queries(NBDClient *client, "export '%s' not present", sane_name); } meta->bitmaps = g_new0(bool, meta->exp->nr_export_bitmaps); - if (client->opt == NBD_OPT_LIST_META_CONTEXT) { - bitmaps = meta->bitmaps; - } ret = nbd_opt_read(client, &nb_queries, sizeof(nb_queries), false, errp); if (ret <= 0) { From patchwork Mon Jul 12 21:55:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12372379 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,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 0189EC07E99 for ; Mon, 12 Jul 2021 21:57:41 +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 7F4D661178 for ; Mon, 12 Jul 2021 21:57:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F4D661178 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m33vn-0003cu-Hn for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 17:57:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33tx-0000ef-5o for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:45 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:40863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33ts-0006rR-17 for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:44 -0400 Received: by mail-pg1-x52d.google.com with SMTP id k20so12753076pgg.7 for ; Mon, 12 Jul 2021 14:55:39 -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=n7azBHG1Zdt3CLAZ/Yfkcusz8F8rGG4wxLGpc9H30Hs=; b=bHdT5PyuJuFouAn1ILNmqVFroA5wUfabYvvtb9QZM0WCe4mG87PAeBEPbIXA1NqSoB ySmjAMQeVmqsFYkaE9XMTr7GyaSfI1gU6li11+Wczt0Hnx7HkXo8STFtImlNWsECNLyn 07lPK/EWlMXy7rKlcG6VHlj7tyo/qnSW2tKA4bD0ZP5xG5E6pgA0ph9o1ZI5uHMNtgmA c+/W3rp6sO7meTI9JzRUlZX6ydW4kkc/f84fsUHU7YVyawFvqYHWil/vbC+q7BB5g4Dw IBNDfLZEoQjOW9Skj0juOa9OVt2PvF6vorQJyaX+xaMJpfwFb8ldOiPlQyasVQuXSWws eD1g== 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=n7azBHG1Zdt3CLAZ/Yfkcusz8F8rGG4wxLGpc9H30Hs=; b=rnGQwoviVU+0oKXlCq/IF3s8Czea9JFu1BBFpcT+r08LnzIhEdwAlLdJw2YhDfIT1O +YtMOoDJB6WnLkuCYG2lRSGIv63v7WrHOIcCF3O8fS69LydPHN7XUbEy0pjCzjZFj6in w4N/thZ/4hSYgmAYRIqFmQJ3CJs6S0A7/F2qiOJGNg8KSnBrP8pjlm0R96ZbLLaxhtZ9 moagMM4O/BO6x7v7GNXSuwGmHllF6gLPNWjeFBFbT/4gaCfByzFsVj41+gUMEbsxYH7f 0sAeMgtfpLUZ3TctS2M9EThO4bY4FqBy/B6CQ8W4szCVQWkeYfJyRiv+WHMApcJJGTEm zEtw== X-Gm-Message-State: AOAM533aS2RxaKDoEW//tUaXtG6NxMF0cPooEeuoE/ceDYp/UD/1h2it DKT0v+e4TG+/cGDWvhgXaW8lJtRK6gBLxw== X-Google-Smtp-Source: ABdhPJwVJ83KbTdjwvWIm4r4ksQXRTv0JzyZkGf2RqYD7OwA9bDl61+qnatntvgujeFU93Ms3gDSGA== X-Received: by 2002:a62:3344:0:b029:28c:6f0f:cb90 with SMTP id z65-20020a6233440000b029028c6f0fcb90mr1294429pfz.58.1626126938562; Mon, 12 Jul 2021 14:55:38 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 02/11] accel/tcg: Remove unused variable in cpu_exec Date: Mon, 12 Jul 2021 14:55:26 -0700 Message-Id: <20210712215535.1471256-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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: accel/tcg/cpu-exec.c:783:15: error: variable 'cc' set but not used \ [-Werror,-Wunused-but-set-variable] Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- accel/tcg/cpu-exec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index e22bcb99f7..a8d8cea586 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -780,7 +780,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 }; @@ -819,14 +818,12 @@ int cpu_exec(CPUState *cpu) * 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. */ g_assert(cpu == current_cpu); - g_assert(cc == CPU_GET_CLASS(cpu)); #endif #ifndef CONFIG_SOFTMMU From patchwork Mon Jul 12 21:55: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: 12372403 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,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 8AF30C07E99 for ; Mon, 12 Jul 2021 22:03:27 +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 1B791611C1 for ; Mon, 12 Jul 2021 22:03:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B791611C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m341O-0004gv-9u for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 18:03:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33tv-0000ac-PN for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:43 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:52956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33ts-0006rY-RI for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:43 -0400 Received: by mail-pj1-x102a.google.com with SMTP id bt15so5844225pjb.2 for ; Mon, 12 Jul 2021 14:55: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=V4NDEP6+OPN3RZuxFlIMW6dNi+3smAct890DuJEN23o=; b=QPmfAvbabUtgs8i44opkL8TVTPxkjd+6w/WNlclRMTNopwLELhWfrIQnTh1nYeJObF V4R7GLhDRbBpA72gjlYNen8xeSV0TN+u0s9mD6PIAbBbwYqMxf5Zb2vs25DcBqmteK+a FxWM1XzLrJ4Lo1zesZO3YuRbRn16BEveJQ0IHstqgc3V+lLhBT6KgOL8HTQeG0TeLSUO iZbrtW7AonexFnLAjAhmzhDdxNjVidDBnIE30Y6cmCBSDXC4n2d41ijoBR8Jz7TR4MBT xVUYOh9OL6/PAZE0gcflVozCc30fOY9OUUcUReXYOsjT7cGHzdMJRlPpQIy6Uu8jb22P ZCeg== 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=V4NDEP6+OPN3RZuxFlIMW6dNi+3smAct890DuJEN23o=; b=D2GjO8FayQ/7956L1rgmmeigzvPnaPPYoPP6j4sXQPwjfPyy+FxZ4JZkkLy36tGAwH uo4L+3ZuWeJFMEGngeF3X0D+0Xw8+zEXEROM12i242JQUcytlukDk7oyeFwvoU8GPJk4 pNhWBu9gFEWzT+i2ufkxBvLPUew8ipWu4C1FYYb/tCqrITKHGIiJfAJsr8hm5tlOsfYt BvYHuzSFRqsnnjxOQ3fMVvfzuLnbhcsmBZwz5eWEwRgXQkq9dJFkjONWj+29rWRlZdbh 2cQO7V7+VnddDys04ujp3+xRFkOZa0JHdNbs3EUQsPAIL5eer/e0IVXtxCDdpqDfyIxH 0I8w== X-Gm-Message-State: AOAM531vVTQQWrC6ByhPIibXqwP1YznNK+9vGPNkGtoj9AcWMHyQUZBw YUWD9KOpKY+rad9V3aGFT7+SGKL2tWdLvw== X-Google-Smtp-Source: ABdhPJyJCPeu7EbTaSZQmQiaBixk13lotszPbyHr9eZlrXiafZQR+q/D066hT1OUq+Jlh/WsafBbdw== X-Received: by 2002:a17:90a:a087:: with SMTP id r7mr16124415pjp.84.1626126939211; Mon, 12 Jul 2021 14:55:39 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 03/11] util/selfmap: Discard mapping on error Date: Mon, 12 Jul 2021 14:55:27 -0700 Message-Id: <20210712215535.1471256-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-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: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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 --- util/selfmap.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/util/selfmap.c b/util/selfmap.c index 2ec99dfdda..0178c2ff8b 100644 --- a/util/selfmap.c +++ b/util/selfmap.c @@ -23,29 +23,33 @@ 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); } - map_info = g_slist_prepend(map_info, e); } g_strfreev(fields); From patchwork Mon Jul 12 21:55: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: 12372381 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,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 7A4F4C07E99 for ; Mon, 12 Jul 2021 21:57: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 327596115B for ; Mon, 12 Jul 2021 21:57:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 327596115B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m33vr-0003q7-Ay for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 17:57:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33tv-0000aA-Jn for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:43 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:38791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tt-0006rv-Df for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:43 -0400 Received: by mail-pg1-x532.google.com with SMTP id h4so19728607pgp.5 for ; Mon, 12 Jul 2021 14:55: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=h4VDfQcFJ7YgMKSWd754t3G1Gz4yG0zsxrrNOOR5Dw8=; b=fb793n8maWYopelOndZlhmLQd6fdjBsVcayxajgZEqV/r11fnTNExQgx58eFQGrs7Q X+zL8fEpvuJa5SuVZ2Y+34GpG/XHtSXbze5LqP171zdkT+wTwQY6XpnDi8nMu8QFTHpf wOJeQ8QmAsJHIEMqN2DkkWmeowgZeaJuEF2Z78mszDjaCa49P1uV8EgnlwjlEghXdKBM zf2B/tOBkEaLUY9zUE5t3etRHHytV5UJtA/KddHgM914ccTVVce5mBDn+kO9l/FyC5xC CItf3tOlzW5UfoXA3OvgANJkqRDJTLMteLaB1wc0QLZtMctWv6Ue7qB3OBLltasOM/eL /XOA== 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=h4VDfQcFJ7YgMKSWd754t3G1Gz4yG0zsxrrNOOR5Dw8=; b=ZTrF0GTtMKyjMuWR2QC66gvFw1dsUmC1IRd0bgrPxWlWY6TXKEalItUqooabGs/pFH Tsmgc6ozilZ+lsaOBJoFp+fVNuie4npz0eO3TVio1icc2SoroM4N1OHzqh3Mi9rAFoIG 4Eug7T1XtjDffo1wl62jiik8pPUmoU/4iSebvEDuDV7UCkokgvdBCdWEiubRHKoXDiWf 5NMbUqxxkmskxvBAr5MPv04AjyDMHHKSsYjqd6Q3SepEWeQ1gALpfO1o0dLoSLxyeUGS 58ABO6O5DKVkZhmjD7cs4kFgWts+k5fw41+iyYfC0DOq3lIYExxbjqdK/dke6QzSqpQd Qo2g== X-Gm-Message-State: AOAM530FEcU0bT3BkpBkOe3329wOmSD7Zu8SAV92OLqRXeHPGPxj+tTf jrWZRo2sdRbuMu5DPUzyVOukWUwW1apa8g== X-Google-Smtp-Source: ABdhPJx3bwvtnKqMldj6frjSX5qNcie4FunuAoESfl9Ge7Z+ZNznFYiMWoHXDVGJcGTcGWN9VpX3Bw== X-Received: by 2002:a05:6a00:1411:b029:302:d9d6:651d with SMTP id l17-20020a056a001411b0290302d9d6651dmr1294472pfu.56.1626126939806; Mon, 12 Jul 2021 14:55:39 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 04/11] net/checksum: Remove unused variable in net_checksum_add_iov Date: Mon, 12 Jul 2021 14:55:28 -0700 Message-Id: <20210712215535.1471256-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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: Jason Wang 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] Cc: Jason Wang 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 12 21:55: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: 12372375 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,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 14D16C07E9C for ; Mon, 12 Jul 2021 21:57:38 +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 ADC076115B for ; Mon, 12 Jul 2021 21:57:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ADC076115B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m33vk-0003SU-Ef for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 17:57:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33tw-0000dI-GI for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:44 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:35452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tt-0006sO-Qs for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:44 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d12so17722599pfj.2 for ; Mon, 12 Jul 2021 14:55: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=Za/XDlquE+Ox0yxp6XpECa7y8aOcWlCnk1g4JpHt+1M=; b=MsF0nG47M5aqYhAXnwIfjTxh2smNxksulcQ9aWTt7JACmfc/bKi1KqxujZceocHgJx i9XItTJbPehDzLilUM6OiP7S4VUu2agC9Eyd4GpFv+YIwwen/LkU5uxXNz2Mw0903vSA JOaqpkaTapG+hDJSMr+r9CbNCxsxoN7Frt8FF3p3Ik5lP9kKCbgTuUOSi1zlsxqQZ7RA vNc1/VhGrSYlgn08z1c56zKf8/aKjZzmXu0ZF94TtwJNOcfOhNmPhB4A1LsNN3GR6TjS RUOtBsJDvulmYZPrnrLhqZuoqonkr79ysGXIBZ0TF5hQkSmZ9YWFuLwyJViFI5b8uJvN T/Lw== 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=Za/XDlquE+Ox0yxp6XpECa7y8aOcWlCnk1g4JpHt+1M=; b=c2EW7QiLMhBUoUkcwIOi3Uu99jCKQRk4PaQOscTxbU5en4kNTU/9OwLZHzp0FjufUO 3qx1+Rsvt+KmnWJ4/4NMVrv22fWiM3BXshnfZtZjigcJISkQfXa5mwweSgV/paFdNxgv 6octU4PmA1fhkhGPNDWz7WfCagsSWJG1ux46v6CapxOsaRqrpBOwVcF9cNOywsBX8Ehh l8wi0LZxd91V/sYIsisA0kt/SN+p2C6adFHGSU9vZSEOj/cSDCQS0GsgU0/LW9MKOEjR DiY9aFLiJaCND3mK6BeHiW+DrdS/YWiw2yuYSQYtvY6pJwSFyl9OU3eItH5Um+ZMVa+9 ZTog== X-Gm-Message-State: AOAM5304lOHzX859ncY+/EW7xs8mswh/EUuKTPJeBYa0wgeoLMTO34+3 fIGei9aEeOqibVSYXXUJ+pDvUcUUEMBUlg== X-Google-Smtp-Source: ABdhPJyFYrK2UHqlYQ5N4eH/QrvI9zlyNA4AnCcoabDkV0LB45oRNyVQAdfLFfE8gfgQ6HNPf1KznA== X-Received: by 2002:a62:1d8b:0:b029:329:ff4a:91f with SMTP id d133-20020a621d8b0000b0290329ff4a091fmr1288786pfd.9.1626126940412; Mon, 12 Jul 2021 14:55:40 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 05/11] hw/audio/adlib: Remove unused variable in adlib_callback Date: Mon, 12 Jul 2021 14:55:29 -0700 Message-Id: <20210712215535.1471256-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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: Gerd Hoffmann 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] Cc: Gerd Hoffmann Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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 12 21:55:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12372407 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,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 C2BE1C07E99 for ; Mon, 12 Jul 2021 22:05:46 +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 4976D611C0 for ; Mon, 12 Jul 2021 22:05:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4976D611C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m343d-0007Z7-F7 for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 18:05:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33tx-0000ea-1l for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:45 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:42649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tu-0006t3-96 for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:44 -0400 Received: by mail-pj1-x102a.google.com with SMTP id i16-20020a17090acf90b02901736d9d2218so842279pju.1 for ; Mon, 12 Jul 2021 14:55: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=7XETLGHbzSx1DKTz4qiEULjf7r49YPKh/uFQ3WSm96o=; b=aFRau+l+IQuB//pmHt5hO7GeCYO3oqJ1azjwDPsr8FPMP+lVeBZ9uoBFC3R49eEuEo BJOsqCxd7vWf3aYAdzO9e4qEeAAKCHBeUWdOZsa8rjO6sKtSpj4b6W4ZU6Tv8fWETbHA +DX9Gt7D9iRt0+QpeFL5m+7i5v7d54WzSEGXLPYzw1RfciGTjRkQtdnoqZYK1q3vrQfq eszGcng4eq9N8ilep9OOjedlRwQcun2Q4SfGoaSMEafJALeEvllwF6Js62NR3n/pzAgV /L0C+fV2PuGvzWQEIfLBY/QwSg4XljxM3z3SqfkQO6MJVxNgkGNX38oAeboB4r3WSrHm wmkQ== 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=7XETLGHbzSx1DKTz4qiEULjf7r49YPKh/uFQ3WSm96o=; b=ABiSHkF+aaIsXcJzJ1d+PP+U5x+M2G14wa6Re5zRvgvj8VWVe1YBqkiH/dcnb7LrWF ov2pBz3dAki4qfIZr65nSJPNoZeK/pgZioLNY29oYmwhJDQPlPnlrSuT2b3gEfezXr7U VrLhQv917EpDnBakxdEAbO/SIBrF0iHuJOghHXai3UEbX+h/koQutqOmvtMKcm2tSvsc ugHnk9KL6bWTAOoqrVJAgfX98qvVb4/TKREArgiIFaKA60VGbmJ2ksBoHnnmKLSV5FE6 JrUu1pXDLT/W690sM+Ze+XE4Mv0mLhPJWnqcEaIdLdc/QrrCiww31hGDCvn+ws4GDxTz vLfQ== X-Gm-Message-State: AOAM530Q5+pO5mq27/5NszukvTMc4LkLH4Xp1QWnr+EBVssN38t70SaQ Lt0rnAZCX4svLBm3EZBGXLdQPKLiQQlIIg== X-Google-Smtp-Source: ABdhPJz2Bo9jIPm1EXaWuYT5Gar3Tv+/dEymg4ycTbDyNUPIgGBQV8o3LeQlQiMApVJJHNxk75uucw== X-Received: by 2002:a17:90a:e2c5:: with SMTP id fr5mr1042981pjb.34.1626126941048; Mon, 12 Jul 2021 14:55:41 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 06/11] hw/ppc/spapr_events: Remove unused variable from check_exception Date: Mon, 12 Jul 2021 14:55:30 -0700 Message-Id: <20210712215535.1471256-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-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: qemu-ppc@nongnu.org, Greg Kurz , 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] Cc: qemu-ppc@nongnu.org Cc: Greg Kurz Cc: David Gibson Signed-off-by: Richard Henderson Acked-by: David Gibson --- 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 12 21:55:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12372383 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,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 84D40C07E99 for ; Mon, 12 Jul 2021 22:00:43 +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 4409E601FC for ; Mon, 12 Jul 2021 22:00:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4409E601FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m33yg-0000F1-7e for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 18:00:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33tx-0000g7-Lf for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:45 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:44661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tu-0006tp-Uk for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:45 -0400 Received: by mail-pf1-x42b.google.com with SMTP id p36so7974291pfw.11 for ; Mon, 12 Jul 2021 14:55:42 -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=JMPNzuHLuXcksvxhjV6/BruPnEZ2eQfGcDwFCQcmMW8=; b=qmGdI2JvjRNQABt/JaYFsMbGSbqvuksNULSBLhOTpvBUSgMZTXqXw4sP3slWMCV8vY 7VUIc6ZQSWQk2NZmDorboJ/QaukJ9VO5jmbb4t7Skgyb7PJYtN5N62NjjSEJuFWg7Kni DliauPpCIoAKyhK8o+Enu/Is36zefE+Rx9jU12tP/5VO1KTMQmzXU8ep4CBt+aFkNVnF kSfjbmPB8uRMi2cB/Li5qt0zHUSSgmL+vipWfqbwRxtjnkj2BP2f3Na+UdNYmbCrbs9o D4ATAS5SE6XJ2CW1ETLRsqslb+SdoTXMHIob6XeA+5RYXSwQd+wVEnS4md2rlwFOCYsk FTpQ== 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=JMPNzuHLuXcksvxhjV6/BruPnEZ2eQfGcDwFCQcmMW8=; b=IWa/yflhGDQI0J7eK/BctxrKltaAgfUkEHBnoJysLs4EgDkFRNCYHzTBHqttpuXmqc EO8jJvh468QfveXf9WpyFIEdKHcBKmWlf7ReYJkXhLKReTcM7TTHDMrznyW4uZKlXcGl /e8SaxvPCBd5Sn4/TV/bBDnunfdkBKCIEZ8mCem+X/zajfcO+g46AZGWOfVPb3L8z/NE nAnjXwqTNqSo9Sa7TSBLEdy7Qa309t+OqNvRbo53euR8DGXUDbtYHpCej8HXNyNKtSxr bwvPEfzEOZvvLGxO3/YXo7QzI2MEhfhahS7m+YlJru0WnnEu7ccWF+/DYz+RS64sQmke KrQA== X-Gm-Message-State: AOAM5339B/iOe6fmta24epaqmhv6oB6i+g7d0gkdyApwdTaHjJ91z1Vf /x51u5wB3mvBcenGmkZdn8nrPVhogOWWfA== X-Google-Smtp-Source: ABdhPJzsD9HTW5fTGiYdLGc+8+vMPgmnuHkWoAtcLu6rQTQKFyQBU2b7by7I4O6puND4ZqpLGvH+8w== X-Received: by 2002:a62:e90f:0:b029:307:8154:9ff7 with SMTP id j15-20020a62e90f0000b029030781549ff7mr1079842pfh.79.1626126941647; Mon, 12 Jul 2021 14:55:41 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 07/11] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write Date: Mon, 12 Jul 2021 14:55:31 -0700 Message-Id: <20210712215535.1471256-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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: qemu-ppc@nongnu.org, Greg Kurz , 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'. Cc: qemu-ppc@nongnu.org Cc: Greg Kurz Cc: David Gibson Signed-off-by: Richard Henderson Acked-by: David Gibson --- 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 12 21:55:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12372401 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,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 B4743C07E99 for ; Mon, 12 Jul 2021 22:02: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 6278B611C1 for ; Mon, 12 Jul 2021 22:02:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6278B611C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m340w-0004Ay-Gu for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 18:02:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33ty-0000hb-BN for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:46 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:43773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tv-0006u7-D2 for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:46 -0400 Received: by mail-pf1-x42f.google.com with SMTP id a127so17679288pfa.10 for ; Mon, 12 Jul 2021 14:55:42 -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=98hXjA4uSUkP3B9/WqgmYEJVY206bbsiqYmueSYFIP8=; b=A5XxD2ZlTroVbml+CU5XK4A8VhlUBbeMGrH1M3bFs2BBQ16nsA/0PzI7KsIUBgdiy+ 7zBW98ZemlXuEvpaTWZXpv/zx1KsS+xt+N7xTOKo79YOy/KWfkKPUGWDQHzrdg6j3zsI /C9MXey4d7zJGsBs+qMWmCcKYGt6pk2FiPt9faPHlz+I69AeNPZhYDauHPs4NLRK/UoZ GxA6YuBtwQk4AuaTEzJFBoojJvn220UN+8tYfdet5ll24iqpyQxbxH4Rh9IPIMp+MkP7 Eibgt6eOXgZ6mOU9Hgz5LVamFs2wmdQAfSVXg6llWzsE7UUIUf6WswOeFlCS4HNhK70w S6Yg== 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=98hXjA4uSUkP3B9/WqgmYEJVY206bbsiqYmueSYFIP8=; b=e2xFhb6CEIP5U60za4TN81TUrPH08ES9/8grIwIh87J4t8rOXUe/cMBimmhcazxVvo c1qOcyvJrE8QmIXHSBIHLhTngfCL2/zrqLtaBSb2zc+NHej/26S/B5gp6JgIIlpr+5jK lSyRCJa4wV5jZEIFB8o6omqOiIL0QVxkuLNoFWvF9P0yBKqv2ytQHea5v0wxsGvRszB0 oV3FO8DO/8koG1r0pcg5/CEHlV/5NouWKuAZm/m+5kblUu13I0LYjSQrjlA11bBvRoBV QF6zCpu6so8sv1I03lPVWOyRYg4vMso2ypjVLvK+S6uNgMIWJO/Sl5fMGKVV0+I9YaVM CWpw== X-Gm-Message-State: AOAM531GCboyfE2EpBAjh2xQwvK/OscL7ipQ8LUC9Zly/JXfyRDRzK23 ikGzaYV39h8/MvtxmZaPCTmRFshj5o0IOA== X-Google-Smtp-Source: ABdhPJz/PeScgqyHHTC6zJGd7QPNrrrvuPzKQ3T3RFAKNIdQSWUgb4UgYftxW7qmWIbhL19lcV7mEA== X-Received: by 2002:aa7:828f:0:b029:200:6e27:8c8f with SMTP id s15-20020aa7828f0000b02902006e278c8fmr1318855pfm.44.1626126942220; Mon, 12 Jul 2021 14:55:42 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 08/11] linux-user/syscall: Remove unused variable from execve Date: Mon, 12 Jul 2021 14:55:32 -0700 Message-Id: <20210712215535.1471256-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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] Cc: Laurent Vivier Signed-off-by: Richard Henderson Acked-by: Laurent Vivier --- linux-user/syscall.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2e826206d2..c27debba8c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8500,7 +8500,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; @@ -8532,7 +8531,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; @@ -8544,7 +8542,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 12 21:55:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12372385 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,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 F1009C07E99 for ; Mon, 12 Jul 2021 22:00: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 BD30461178 for ; Mon, 12 Jul 2021 22:00:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD30461178 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m33yz-0000Xr-OE for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 18:00:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33ty-0000i1-Ff for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:46 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:41960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tw-0006uL-8j for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:46 -0400 Received: by mail-pl1-x62d.google.com with SMTP id z2so7086358plg.8 for ; Mon, 12 Jul 2021 14:55:43 -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=/XbZAZAFUZutJ4SOP5C+rLYYfepTHI4gi5UAVTl5lRY=; b=raCqmEuSHTRoBEv3+JgQg9ZfYYg5oj4Fd8guID8cmYXV25P9/Im+VLjX6J4UfULWoY 3tCiqNy5h6fGV0rGVddRsUbt2XFzMqhtmOHVH64YCvL4x9lsXCPqD0/MvRmLIHfs7tIL zEecQjZBml8jx+5B2EeDoxQXrjXgNHHsT9KAwcy0SS/Uh22lRr5bx5pVJeC94amK/bnm CIg8rWYH+tGu08qyrHIWmADP8z8wBP7u7pAW+OS7EJLCZP3AiUvJ4SqyJYdBDc73/qRs 38Bd14mvr956X8Lypts5MLR6mqh1J0stHvWZiztbSQIcC8e2riC52Si4Sw44XMslTdGD tAoQ== 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=/XbZAZAFUZutJ4SOP5C+rLYYfepTHI4gi5UAVTl5lRY=; b=XN3fEaefra2tdPIrXPAUeD+Y8NIfxcIsyp22+kJqoXWz1/lLWszuUwW+vVhraFMvs4 MrFvv7j1fbkVUk9Lt4Jugm9Ayv41boUR+8TnCEzjcKtJ9DDO3MUE5GfpfEzhSvsSAtLw RwQ/gEYTqUggcZvajztTQ9KORpVrOFM/F4dtIB898AO5PORncvYK2Xbzuvyr+gtkgZKx ZYdbsL5tHPoA0V2dcc0RhiSdVnrJMsazC3F0hcgHI9VlIV9PVulEmsczUrrTtB2Ec4Tk 67nzVbp+KvSVzxijYTL7II9HI8Xk+aEviV/eHbQ3pIeI0F/NW8pbVCoT9Nd/EpFNWbz1 UmKA== X-Gm-Message-State: AOAM532u3veS7zcfcU0KVAtAvbWCOQFG8RJDu+FvuSQZo6LmZZ8mTGvT /tOWlceQEnTOge3hjOFkRL6mFuhw5sORrg== X-Google-Smtp-Source: ABdhPJzZSudLo3nbcfrapkBCa/yWGuU5nC4fbswLzT+gzQL1cNk2gRjk7mpqu6yyqjMMIUdYiF32XA== X-Received: by 2002:a17:90a:5889:: with SMTP id j9mr979309pji.234.1626126942828; Mon, 12 Jul 2021 14:55:42 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 09/11] tests/unit: Remove unused variable from test_io Date: Mon, 12 Jul 2021 14:55:33 -0700 Message-Id: <20210712215535.1471256-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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: tests/unit/test-iov.c:161:26: error: variable 't' set but not used \ [-Werror,-Wunused-but-set-variable] Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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; From patchwork Mon Jul 12 21:55:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12372405 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,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 D49D7C07E99 for ; Mon, 12 Jul 2021 22:05:03 +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 8F0D3601FC for ; Mon, 12 Jul 2021 22:05:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F0D3601FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:50938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m342w-00074z-MR for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 18:05:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33tz-0000kv-7U for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:47 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:38750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tw-0006vA-OE for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:46 -0400 Received: by mail-pj1-x102e.google.com with SMTP id me13-20020a17090b17cdb0290173bac8b9c9so143788pjb.3 for ; Mon, 12 Jul 2021 14:55:44 -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=m7emFn9ZXxGGMcBZFosB1EnmF9R96t2zGLMZbzq44mc=; b=rxNTD/co5NHhu5YAUrO/4/3Q6zmq5wj1krlkzCno+nne0/ipSHG0K/ycuc0vCcEg22 /yvZwjVZQo36lgaJiYiuy7opmBQMwI9a/2KK43qbqVsiehBLNdseNKpSoC3neWC6vErJ bFGB+sb2l30hqigiXYBHpnAya6yWoQwsejs2EFNb5Cj3npC32sE5n4+xu7MCx+ol4h1c boNSoY31FvdpeWY/YJXvNUhUuUDowrIE+EDsOUFrt/xJOalgaheaVBXWggRRK820oH1B eWa84HO8OC7vdMUtAq89eZzkc77iuu3l7Ake8hYt6VF5V2kt2FtEgiXslbfL4qgXAZ9d 8bOA== 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=m7emFn9ZXxGGMcBZFosB1EnmF9R96t2zGLMZbzq44mc=; b=g0e1QodO9uK6Ifrw5Rc+derBFLScwWg58xn537BhRjGRjsUs7JzVt/1VfUwFHk1HJ6 Gj6YHOLsNv7cmldpyZyW49m2ujDEzOVHEiEnPtJG145YWxswgG7ULNjpqkO5dGsCFKXl k0HOPsfie2EJ10DfIUuqVL7b+rrbj5DCuAVzaQjQ+cKjVHVl1dCCwVx6C04oQ6CsIXWp zo6/rqEpP1sHHfX9TZtAG/+2H8rN9DKJI6sLi/47ERWMBCn7uLm4HYIrTSHAsGIKkq6s mvbl/1EEspISz1kcWMITOvlomzISM2d4JX1/1+y0MR1fO4u1vcKoQGmhNy3kbBz44NWZ 7AOQ== X-Gm-Message-State: AOAM530XLwESUKNpqI4YXhFVBsSNYzIeCiF29CiU+mxFRDhQ454qj4ov eRSTQuSZlLJioKUGpjC/z9RNpcf/38xrPQ== X-Google-Smtp-Source: ABdhPJwwA1OwQyav8nbzLjQ6EtTdx4cENSVCGtCT9AwKP0dcdOsPYWXwbcNQNRekar9rHSqbtRWAVQ== X-Received: by 2002:a17:90a:1de3:: with SMTP id v90mr934918pjv.219.1626126943457; Mon, 12 Jul 2021 14:55:43 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 10/11] tcg/ppc: Replace TCG_TARGET_CALL_DARWIN with _CALL_DARWIN Date: Mon, 12 Jul 2021 14:55:34 -0700 Message-Id: <20210712215535.1471256-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-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: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" If __APPLE__, ensure that _CALL_DARWIN is set, then remove our local TCG_TARGET_CALL_DARWIN. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index e0f4665213..2202ce017e 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -25,8 +25,8 @@ #include "elf.h" #include "../tcg-pool.c.inc" -#if defined _CALL_DARWIN || defined __APPLE__ -#define TCG_TARGET_CALL_DARWIN +#if !defined _CALL_DARWIN && defined __APPLE__ +#define _CALL_DARWIN 1 #endif #ifdef _CALL_SYSV # define TCG_TARGET_CALL_ALIGN_ARGS 1 @@ -169,7 +169,7 @@ static const int tcg_target_call_oarg_regs[] = { }; static const int tcg_target_callee_save_regs[] = { -#ifdef TCG_TARGET_CALL_DARWIN +#ifdef _CALL_DARWIN TCG_REG_R11, #endif TCG_REG_R14, @@ -2372,7 +2372,7 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int count) # define LINK_AREA_SIZE (6 * SZR) # define LR_OFFSET (1 * SZR) # define TCG_TARGET_CALL_STACK_OFFSET (LINK_AREA_SIZE + 8 * SZR) -#elif defined(TCG_TARGET_CALL_DARWIN) +#elif defined(_CALL_DARWIN) # define LINK_AREA_SIZE (6 * SZR) # define LR_OFFSET (2 * SZR) #elif TCG_TARGET_REG_BITS == 64 From patchwork Mon Jul 12 21:55:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 12372409 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,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 55CBBC07E9C for ; Mon, 12 Jul 2021 22:07:37 +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 21A36611C1 for ; Mon, 12 Jul 2021 22:07:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21A36611C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m345Q-0002CN-Bu for qemu-devel@archiver.kernel.org; Mon, 12 Jul 2021 18:07:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m33u0-0000pt-Uy for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:49 -0400 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]:39908) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m33tx-0006vO-E7 for qemu-devel@nongnu.org; Mon, 12 Jul 2021 17:55:48 -0400 Received: by mail-pg1-x52b.google.com with SMTP id a2so19733511pgi.6 for ; Mon, 12 Jul 2021 14:55: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=0lgwAN4JLa+eJyUWPeSpGCyCJ0/V+S2YWU/Kqpi1gBQ=; b=jSeeyBOO6E1wn6rLvdqyssZgCsyTAk6ZQMxdqWqJmQteU98MAxr5t9kgWkDGqPuza/ 9llyvUrs/Zp2s3pBP++0Sc5qqt77w3qo5Gfk7AAYD/MY2ma39xeHjLbBP7E7vf+69g31 nFYgY3Xpxh/eOWIGezyiKcQ8NxDr/me7cssZxyYSFI92VPF6XxNdoW4LPVepxi0JJcWa +c7ffaYBvJm0InMl2Qo5PAnuyBUXv+6I8A6VolEiwXH28MZW30GW4zeSdOVPWCaGUNjd UMUNs0iPGPy7MKSwYDiQnYkiBCjyGqsI+XtjWqGwI6WX6P6IYIKkXKCjsIAdIwRqeCzx 6qqQ== 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=0lgwAN4JLa+eJyUWPeSpGCyCJ0/V+S2YWU/Kqpi1gBQ=; b=rZ113owFtb4pUjv+tpj5QeKMUO0maiGVzD5sws52e1QLMrWyMF698VzWRckyXDJWEt fcTeeZoZdUipjy+sjfRaHDlBlWg9jVgUhyjFx0FXXvvl+XfH3WQVjJDRYBqX69Ae9DKI LsMp+2ce5SqMRmFQGXtXG/A7zHe0OXaDLMi0J5Bssi3Vo7UYjdTVKZ/ksFK2CswBvXtw dWpX0DfZ3ZfTcisOCxY26xzei10ZU4aQa9dWuE6Ujf7E0FbTUXJ99H5VPH57E9A33YMY vtF6E0SY5GGgPdYe4TrcgOvn98z0i6VIq1s+osaVilcrdTeVfzpYmUXeX5tL/VwX9cYg V7jw== X-Gm-Message-State: AOAM532J+5Q0yH5TB9Ima5hBgWT8ctlwwER4gDMFK7vWc0ZV0yMrOzLd SsjfqNCS0ljEWDgIpUb7MNlaUhRpEwOVpA== X-Google-Smtp-Source: ABdhPJzTKKJJq+iDZjuFN/rST22OxgxAb6thaMQGN6cvTvsDWkA3Kve/23oBsxjC98UySGzLgo8ysg== X-Received: by 2002:a05:6a00:1805:b029:328:4602:4dbb with SMTP id y5-20020a056a001805b029032846024dbbmr1074161pfa.45.1626126944025; Mon, 12 Jul 2021 14:55:44 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id d2sm376932pjo.50.2021.07.12.14.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 14:55:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 11/11] tcg/ppc: Ensure _CALL_SYSV is set for 32-bit ELF Date: Mon, 12 Jul 2021 14:55:35 -0700 Message-Id: <20210712215535.1471256-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210712215535.1471256-1-richard.henderson@linaro.org> References: <20210712215535.1471256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52b; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52b.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: Brad Smith Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Clang only sets _CALL_ELF for ppc64, and nothing at all to specify the ABI for ppc32. Make a good guess based on other symbols. Reported-by: Brad Smith Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 2202ce017e..5e1fac914a 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -25,9 +25,24 @@ #include "elf.h" #include "../tcg-pool.c.inc" -#if !defined _CALL_DARWIN && defined __APPLE__ -#define _CALL_DARWIN 1 -#endif +/* + * Standardize on the _CALL_FOO symbols used by GCC: + * Apple XCode does not define _CALL_DARWIN. + * Clang defines _CALL_ELF (64-bit) but not _CALL_SYSV (32-bit). + */ +#if !defined(_CALL_SYSV) && \ + !defined(_CALL_DARWIN) && \ + !defined(_CALL_AIX) && \ + !defined(_CALL_ELF) +# if defined(__APPLE__) +# define _CALL_DARWIN +# elif defined(__ELF__) && TCG_TARGET_REG_BITS == 32 +# define _CALL_SYSV +# else +# error "Unknown ABI" +# endif +#endif + #ifdef _CALL_SYSV # define TCG_TARGET_CALL_ALIGN_ARGS 1 #endif