From patchwork Fri Sep 29 08:50:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727601 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp331755wrt; Fri, 29 Sep 2023 01:51:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6ipgNZVDrNOSQebXBDJBjaGRo6SKKpReyNXO4Tf+JaFofVZHndLqAtYUjswVgfVGAnUmn X-Received: by 2002:a05:622a:1708:b0:419:5b97:2fbb with SMTP id h8-20020a05622a170800b004195b972fbbmr4630656qtk.34.1695977502634; Fri, 29 Sep 2023 01:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977502; cv=none; d=google.com; s=arc-20160816; b=x/Fbaou2AdbbFpmu5yn2FNq+O4rznE79U2QdMINNLXbaktoPJiQJ7N4NasJpdS+d3D khAUC3bxyni2rldzU2WgbsWAQD5dr++LZ/jKfz9NAITFu3U0rqPScVpnxHLuaIExvJhg o1sKVvLZmUpcEHcFzyBktqnC8Vguru5pi1G3qRQyNqX5pZ4/gMdo2PglwqK0/fLGmOjD xXm9T3QDRS33DQh2HPnjZEuOaQwccwmYHZzZ/muYkMo0DEGfa/wZf18GPjleGO9zVluu YcLa3zgSH4fAr0tiXhRWrBWEvSPIOVQA4wORmCDb5MN+zDkIH8TzQ8vLPYfg8yrgDQ2B 7lYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0BMIMSiB+DtFo+8Bx7+AdacnBshOWBPA/iIwhqoFIAc=; fh=kFeeQCZHOWMjM3PvFVR/cFiybISAQy4MaQRyjN/+tkQ=; b=st/Ii/jeAOxyc96348yMSirtuE9I0dInn5ybaU/alc8DXsRuXHykHri3NI9X1pqObT H2Gc06iJMUm+rJVWGL4EPH1HZTyxUviOOIBGBhpCq4poo969PhhSQs2+0fY4xDulx4gp mgdTyp7HZ1ytttURlXz2IO4oyzw9FWO15QR3RmlMIE+hMDbRIIFA6n3P1HURYn404kwp s4hUc1eYIwSngWf5EYXO7ZkjfSvhfckBxJEAsnrv+prNE80r4sFEjJcLT0jxG9GJJbTM hU8gp0GIlEu7l3Pn8frJo6AyFxIgvG4bP3n2PdwgYJnl72iwHO3wv5R6dYWh8MKKbxiE tatw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q0YF4oCg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r17-20020ac85c91000000b003f9ae403acasi657433qta.263.2023.09.29.01.51.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:51:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q0YF4oCg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DQ-000504-GL; Fri, 29 Sep 2023 04:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DF-0004w9-H3 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9D9-0005b9-C8 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0BMIMSiB+DtFo+8Bx7+AdacnBshOWBPA/iIwhqoFIAc=; b=Q0YF4oCglRbW80ty7Xd0bMsBYEkFgwpzCWM/gCCoH8lbn4kJSKAvSmAaSnagB4wcXChzYr X4tAEvwdDe4vat5Gy+NQxQ+agwVk8PnnScg7zAPYhalQCHkI681JmELckqHxF0k91dGexK fgfZ/Bk7nceAmXmGkfVnsmlKHCU6i0M= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-nGD1WDopN_29O-RGCB25-Q-1; Fri, 29 Sep 2023 04:50:55 -0400 X-MC-Unique: nGD1WDopN_29O-RGCB25-Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 81F3F8002B2; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FE972156A27; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 66CD521E6911; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 08/56] tcg: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:05 +0200 Message-ID: <20230929085053.2789105-9-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: tcg/tcg.c:2551:27: error: declaration shadows a local variable [-Werror,-Wshadow] MemOp op = get_memop(oi); ^ tcg/tcg.c:2437:12: note: previous declaration is here TCGOp *op; ^ accel/tcg/tb-maint.c:245:18: error: declaration shadows a local variable [-Werror,-Wshadow] for (int i = 0; i < V_L2_SIZE; i++) { ^ accel/tcg/tb-maint.c:210:9: note: previous declaration is here int i; ^ Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-2-philmd@linaro.org> Signed-off-by: Markus Armbruster --- accel/tcg/tb-maint.c | 3 +-- tcg/tcg.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 32ae8af61c..8c71cebabd 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -207,13 +207,12 @@ static PageDesc *page_find_alloc(tb_page_addr_t index, bool alloc) { PageDesc *pd; void **lp; - int i; /* Level 1. Always allocated. */ lp = l1_map + ((index >> v_l1_shift) & (v_l1_size - 1)); /* Level 2..N-1. */ - for (i = v_l2_levels; i > 0; i--) { + for (int i = v_l2_levels; i > 0; i--) { void **p = qatomic_rcu_read(lp); if (p == NULL) { diff --git a/tcg/tcg.c b/tcg/tcg.c index 604fa9bf3e..ea94d0fbff 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2549,21 +2549,21 @@ static void tcg_dump_ops(TCGContext *s, FILE *f, bool have_prefs) { const char *s_al, *s_op, *s_at; MemOpIdx oi = op->args[k++]; - MemOp op = get_memop(oi); + MemOp mop = get_memop(oi); unsigned ix = get_mmuidx(oi); - s_al = alignment_name[(op & MO_AMASK) >> MO_ASHIFT]; - s_op = ldst_name[op & (MO_BSWAP | MO_SSIZE)]; - s_at = atom_name[(op & MO_ATOM_MASK) >> MO_ATOM_SHIFT]; - op &= ~(MO_AMASK | MO_BSWAP | MO_SSIZE | MO_ATOM_MASK); + s_al = alignment_name[(mop & MO_AMASK) >> MO_ASHIFT]; + s_op = ldst_name[mop & (MO_BSWAP | MO_SSIZE)]; + s_at = atom_name[(mop & MO_ATOM_MASK) >> MO_ATOM_SHIFT]; + mop &= ~(MO_AMASK | MO_BSWAP | MO_SSIZE | MO_ATOM_MASK); /* If all fields are accounted for, print symbolically. */ - if (!op && s_al && s_op && s_at) { + if (!mop && s_al && s_op && s_at) { col += ne_fprintf(f, ",%s%s%s,%u", s_at, s_al, s_op, ix); } else { - op = get_memop(oi); - col += ne_fprintf(f, ",$0x%x,%u", op, ix); + mop = get_memop(oi); + col += ne_fprintf(f, ",$0x%x,%u", mop, ix); } i = 1; } From patchwork Fri Sep 29 08:50:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727608 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332374wrt; Fri, 29 Sep 2023 01:53:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtBZ7y2pmy8onlNRz9OwNF1JZLL1WKHVF2EwzjsVEBkQf0/1HycuvtxkebTcsOviX3j7rh X-Received: by 2002:ad4:4c0b:0:b0:65b:319b:b430 with SMTP id bz11-20020ad44c0b000000b0065b319bb430mr3701995qvb.58.1695977625817; Fri, 29 Sep 2023 01:53:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977625; cv=none; d=google.com; s=arc-20160816; b=J+cxPbVnCsQN+FrlOD3eOs9Lh0mrV7LvdvdvKEKWajZ6iunXE3MYb3RES5DQMDWtfn NHkWMA5l+uemiW3f8WNXRe3Q/bzesJCl4LQamElp0tYV1yMUQp85vt/70Rtmg4AZBtv6 C6+u6VSerK63WtEoEav5++ox3m9h75S9TZo8aaMGvZG7G73+Kd1IiDvz1C5aOseJfxR/ lQXuVGXAxy1ThYTW1ZW5YDKmIP3bX9brJPo89rZxsr4zKj9uFF/Sr1nOJeyioB/bQ1nV i6j/eOirZ08eK7lBnGvbKHf5INHAvIF2cl9C30znMe+mfa96z4zvZIKrbfe6W3GlI3Ot 55pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AMZbLYPBV1xCTpn0hbevuva2cgsCsR3rt8ss4bjxa7M=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=QK8gmvmsmDrGNUSuUbHBzJ/0LALQeaiQP7xy3ouS5EgKh4siG8twCC7nzg/RNDB5Tr U5y6N1IgdDP6//rN94wBTpWIvn2gEkI/zO9+InYjTXaE0r2p2jN7C1nS8YQqD/o81b6x 7XCD8vfxSD4X0ufd3NpQKh2tvkSdy0YuVfY7DpSWrYRXVAMvu3It+8IkPkst8iztYLKL hU4Fab8FLUfnLCtedV4jSjX7rGuZDKymwS5BZjFetKFuyi17IUbXILfyS/UQr0hNRMfL lBQFD0pmODtu+HfLnf0DCUKyyFGqIeGoWpdBhP/Gxb3+4LLG/EL11I8Lg/qw9ey7ye/W DnQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=itqpEFpB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r9-20020a0ccc09000000b0065d8fc640fasi808827qvk.607.2023.09.29.01.53.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:53:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=itqpEFpB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DY-00056m-Al; Fri, 29 Sep 2023 04:51:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DK-0004xN-SY for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DA-0005bh-L2 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AMZbLYPBV1xCTpn0hbevuva2cgsCsR3rt8ss4bjxa7M=; b=itqpEFpBbo0HPfBSgEdd7V7MplauhHztKSHAwcF8AeCFMLciC49u4NMuGIe8HUrIkKv7DN wx+rookXta3ONZOlqwdGfdx+MncGUbM6OpXNlyvPTXbXE5YYrPh6XMJGuDe74NsoBT/KnL Aaz1+pVHjVnqNGd+mb+mjya9xsAsgUY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-270-L5gqqdaWP2WDBbIr-vM03w-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: L5gqqdaWP2WDBbIr-vM03w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A48F6185A790; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6613740C6EC0; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 69AF821E6912; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 09/56] target/arm/tcg: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:06 +0200 Message-ID: <20230929085053.2789105-10-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: target/arm/tcg/translate-m-nocp.c: In function ‘gen_M_fp_sysreg_read’: target/arm/tcg/translate-m-nocp.c:509:18: warning: declaration of ‘tmp’ shadows a previous local [-Wshadow=compatible-local] 509 | TCGv_i32 tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]); | ^~~ target/arm/tcg/translate-m-nocp.c:433:14: note: shadowed declaration is here 433 | TCGv_i32 tmp; | ^~~ --- target/arm/tcg/mve_helper.c: In function ‘helper_mve_vqshlsb’: target/arm/tcg/mve_helper.c:1259:19: warning: declaration of ‘r’ shadows a previous local [-Wshadow=compatible-local] 1259 | typeof(N) r = FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, &su32); \ | ^ target/arm/tcg/mve_helper.c:1267:5: note: in expansion of macro ‘WRAP_QRSHL_HELPER’ 1267 | WRAP_QRSHL_HELPER(do_sqrshl_bhs, N, M, false, satp) | ^~~~~~~~~~~~~~~~~ target/arm/tcg/mve_helper.c:927:22: note: in expansion of macro ‘DO_SQSHL_OP’ 927 | TYPE r = FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat); \ | ^~ target/arm/tcg/mve_helper.c:945:5: note: in expansion of macro ‘DO_2OP_SAT’ 945 | DO_2OP_SAT(OP##b, 1, int8_t, FN) \ | ^~~~~~~~~~ target/arm/tcg/mve_helper.c:1277:1: note: in expansion of macro ‘DO_2OP_SAT_S’ 1277 | DO_2OP_SAT_S(vqshls, DO_SQSHL_OP) | ^~~~~~~~~~~~ --- target/arm/tcg/mve_helper.c: In function ‘do_sqrshl48_d’: target/arm/tcg/mve_helper.c:2463:17: warning: declaration of ‘extval’ shadows a previous local [-Wshadow=compatible-local] 2463 | int64_t extval = sextract64(src << shift, 0, 48); | ^~~~~~ target/arm/tcg/mve_helper.c:2443:18: note: shadowed declaration is here 2443 | int64_t val, extval; | ^~~~~~ --- target/arm/tcg/mve_helper.c: In function ‘do_uqrshl48_d’: target/arm/tcg/mve_helper.c:2495:18: warning: declaration of ‘extval’ shadows a previous local [-Wshadow=compatible-local] 2495 | uint64_t extval = extract64(src << shift, 0, 48); | ^~~~~~ target/arm/tcg/mve_helper.c:2479:19: note: shadowed declaration is here 2479 | uint64_t val, extval; | ^~~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-3-philmd@linaro.org> Reviewed-by: Peter Maydell Signed-off-by: Markus Armbruster --- target/arm/tcg/mve_helper.c | 16 ++++++++-------- target/arm/tcg/translate-m-nocp.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target/arm/tcg/mve_helper.c b/target/arm/tcg/mve_helper.c index c666a96ba1..8b99736aad 100644 --- a/target/arm/tcg/mve_helper.c +++ b/target/arm/tcg/mve_helper.c @@ -925,8 +925,8 @@ DO_1OP_IMM(vorri, DO_ORRI) bool qc = false; \ for (e = 0; e < 16 / ESIZE; e++, mask >>= ESIZE) { \ bool sat = false; \ - TYPE r = FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat); \ - mergemask(&d[H##ESIZE(e)], r, mask); \ + TYPE r_ = FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat); \ + mergemask(&d[H##ESIZE(e)], r_, mask); \ qc |= sat & mask & 1; \ } \ if (qc) { \ @@ -1250,11 +1250,11 @@ DO_2OP_SAT(vqsubsw, 4, int32_t, DO_SQSUB_W) #define WRAP_QRSHL_HELPER(FN, N, M, ROUND, satp) \ ({ \ uint32_t su32 = 0; \ - typeof(N) r = FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, &su32); \ + typeof(N) qrshl_ret = FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, &su32); \ if (su32) { \ *satp = true; \ } \ - r; \ + qrshl_ret; \ }) #define DO_SQSHL_OP(N, M, satp) \ @@ -1292,12 +1292,12 @@ DO_2OP_SAT_U(vqrshlu, DO_UQRSHL_OP) for (e = 0; e < 16 / ESIZE; e++, mask >>= ESIZE) { \ bool sat = false; \ if ((e & 1) == XCHG) { \ - TYPE r = FN(n[H##ESIZE(e)], \ + TYPE vqdmladh_ret = FN(n[H##ESIZE(e)], \ m[H##ESIZE(e - XCHG)], \ n[H##ESIZE(e + (1 - 2 * XCHG))], \ m[H##ESIZE(e + (1 - XCHG))], \ ROUND, &sat); \ - mergemask(&d[H##ESIZE(e)], r, mask); \ + mergemask(&d[H##ESIZE(e)], vqdmladh_ret, mask); \ qc |= sat & mask & 1; \ } \ } \ @@ -2454,7 +2454,7 @@ static inline int64_t do_sqrshl48_d(int64_t src, int64_t shift, return extval; } } else if (shift < 48) { - int64_t extval = sextract64(src << shift, 0, 48); + extval = sextract64(src << shift, 0, 48); if (!sat || src == (extval >> shift)) { return extval; } @@ -2486,7 +2486,7 @@ static inline uint64_t do_uqrshl48_d(uint64_t src, int64_t shift, return extval; } } else if (shift < 48) { - uint64_t extval = extract64(src << shift, 0, 48); + extval = extract64(src << shift, 0, 48); if (!sat || src == (extval >> shift)) { return extval; } diff --git a/target/arm/tcg/translate-m-nocp.c b/target/arm/tcg/translate-m-nocp.c index 33f6478bb9..42308c4db5 100644 --- a/target/arm/tcg/translate-m-nocp.c +++ b/target/arm/tcg/translate-m-nocp.c @@ -506,7 +506,7 @@ static bool gen_M_fp_sysreg_read(DisasContext *s, int regno, gen_branch_fpInactive(s, TCG_COND_EQ, lab_active); /* fpInactive case: reads as FPDSCR_NS */ - TCGv_i32 tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]); + tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]); storefn(s, opaque, tmp, true); lab_end = gen_new_label(); tcg_gen_br(lab_end); From patchwork Fri Sep 29 08:50:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727602 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp331880wrt; Fri, 29 Sep 2023 01:52:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGz5FW15e+tqhWn0AAXACPDHDRj5ccD7dBDeI6FWo82ioeSZii6RQv5BqI0g7Sz0+wB++cn X-Received: by 2002:a05:620a:25ce:b0:76e:f7f3:723e with SMTP id y14-20020a05620a25ce00b0076ef7f3723emr2833601qko.38.1695977528210; Fri, 29 Sep 2023 01:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977528; cv=none; d=google.com; s=arc-20160816; b=HDmCd4ngFRtPjwTASwb3O/hQy0dCFMSk/W83raeMmN1Xsp6/1kP/wvWBnnfoazyVOw uBPXwuWzpCmAY6BWfK6KFh3LxU+z0W9O89+ZM7k+QB6+9mYS4Vp0yJQ7Eyiqt7I5d02F IsI8I6CDXMHmiSINtdivas9mKrmTGe8VQh+4KjAB+h/V/DgJzqvCvakVfC4kgzidgW4d ZdVWh20cMrWBINqbh5WMwDN9fb8PliWwLV3mPA3HujmMywirNBOTtsv4LCLhBe58mE1d FXex0AT1pkR7FIaEAHoSH1Ho6kao63iA4GybwDjfy3a8aW6PzZMrv36eEeoVFHv8dT9i 11bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mNNZqgGBCRydSpAMm3CyVCUzTpS3bjgDJpddGBx98jU=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=TjyLVBWFGvtZII+qHk3iGqcFNoezzVL6BVWwo8Z5FngS4S7nnuD64gUtsqkzI2MyP0 ia7vimV/H4acs46r5RO80qmICBK6LXyrmusaAPS+owMApxANpKI/W6+y2HelakeSBgsl jlLsIqH4fcA79Bd7xWC8fHuPav147w+MfRRrfcDZaj9G74LkCWllzvdDOtecQLd2MPIB bgDTaGvZDQ2iD4F9qfWxPsyOnpNCjhRNEZJXMKBzejaiCLz/kTLLQfIlF0u0UgZSVqol 8eSaY+bj2EeQK5Y9zRDghzyA7Bu/9+COnkEFnzQqnl0kHD+Yd/KL+z1/yHj5LAC396uL y0pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B2Sy3zHy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id py10-20020a05620a878a00b0076d81529c23si10043447qkn.294.2023.09.29.01.52.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:52:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=B2Sy3zHy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dk-0005Im-Pw; Fri, 29 Sep 2023 04:51:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9Da-00059a-3G for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DD-0005e9-5B for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mNNZqgGBCRydSpAMm3CyVCUzTpS3bjgDJpddGBx98jU=; b=B2Sy3zHywSbkwhrRNbXXzkh8TTaEz5iJbyXuwhdWZsYtN2FPPGgkEbOxFYzn1dcdWTPzmi C9DFw9Zr2/KCFEDE4Sz+d4q9zmOPpdvnM3Qz1pkNvKLc16vUwm6Wmr6JO+4uuKIxwu6E1b lljPkU/pYskcaV+U+ymAP0jJI0P47hg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-687-lCh5EhyPOK65QNQSC-WqAw-1; Fri, 29 Sep 2023 04:50:55 -0400 X-MC-Unique: lCh5EhyPOK65QNQSC-WqAw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8FCE385A5A8; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B9D910005D2; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6C83021E6913; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 10/56] target/arm/hvf: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:07 +0200 Message-ID: <20230929085053.2789105-11-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Per Peter Maydell analysis [*]: The hvf_vcpu_exec() function is not documented, but in practice its caller expects it to return either EXCP_DEBUG (for "this was a guest debug exception you need to deal with") or something else (presumably the intention being 0 for OK). The hvf_sysreg_read() and hvf_sysreg_write() functions are also not documented, but they return 0 on success, or 1 for a completely unrecognized sysreg where we've raised the UNDEF exception (but not if we raised an UNDEF exception for an unrecognized GIC sysreg -- I think this is a bug). We use this return value to decide whether we need to advance the PC past the insn or not. It's not the same as the return value we want to return from hvf_vcpu_exec(). Retain the variable as locally scoped but give it a name that doesn't clash with the other function-scoped variable. This fixes: target/arm/hvf/hvf.c:1936:13: error: declaration shadows a local variable [-Werror,-Wshadow] int ret = 0; ^ target/arm/hvf/hvf.c:1807:9: note: previous declaration is here int ret; ^ [*] https://lore.kernel.org/qemu-devel/CAFEAcA_e+fU6JKtS+W63wr9cCJ6btu_hT_ydZWOwC0kBkDYYYQ@mail.gmail.com/ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-4-philmd@linaro.org> Reviewed-by: Peter Maydell Signed-off-by: Markus Armbruster --- target/arm/hvf/hvf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 546c0e817f..757e13b0f9 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1934,16 +1934,16 @@ int hvf_vcpu_exec(CPUState *cpu) uint32_t rt = (syndrome >> 5) & 0x1f; uint32_t reg = syndrome & SYSREG_MASK; uint64_t val; - int ret = 0; + int sysreg_ret = 0; if (isread) { - ret = hvf_sysreg_read(cpu, reg, rt); + sysreg_ret = hvf_sysreg_read(cpu, reg, rt); } else { val = hvf_get_reg(cpu, rt); - ret = hvf_sysreg_write(cpu, reg, val); + sysreg_ret = hvf_sysreg_write(cpu, reg, val); } - advance_pc = !ret; + advance_pc = !sysreg_ret; break; } case EC_WFX_TRAP: From patchwork Fri Sep 29 08:50:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727623 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333821wrt; Fri, 29 Sep 2023 01:58:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFup/S7y7FaDanoaDbOCm2ZlCj0/plt2wtp2cbBQp5037fWl01BNbhV4Cx+bYnoeoPvdtJx X-Received: by 2002:a05:620a:4488:b0:774:17fe:5820 with SMTP id x8-20020a05620a448800b0077417fe5820mr3889382qkp.21.1695977935687; Fri, 29 Sep 2023 01:58:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977935; cv=none; d=google.com; s=arc-20160816; b=qdDfefAiSQFNvKTisTNmi8DC0g+mA//fFkkAcW5v8XP/ZV5Rg8LSPwdw4OCfijWbIS L9EwwViiVRKfSN382RZhya88bCj9w0QvFBMTNYNrLbfyJ0B0fKbz5oiT7LeYz1dzzvnL o453LocYV9EyKQq4+/X+jlI0SHqZpqGZAH9bFH30WpyCHN0qMsEA8srUvCNMYBOBymuG MfKXAJ89kwdOIN8d8VedvXF9ED7FTrEtK/I+VIKReiaTI9lc632qaSzwZIJUdpRuAjB9 7cTw+bCJMGw3pIZTwGHb5YZJIx2PUObYLutZtAGM2EGuVQ2PovwAvRtae4FgCPCKGM8U +bXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Fo3sgQUoq1v/rXQDfdnS796xPwOPol/7CVX97Dogeq8=; fh=vkIKEHcwKJya0eJ7ZEuSZlQ+z9UQVjOKAU0iaZuC/Ks=; b=eCoYp8nJSUcaPXMQ/ZbLUzHk2d271fOeiuatzQtVmGTGqRGtTERAYmb1Yt9ZLDPHKx Yw50Ku1dcGxPm6PwbsczAt5CBK3FCutaATqU7rtySBwwGwjY9jtaEZ7+WqnLqnFFgSjl IbkNV6oy2Vg+etrCFk0yMwhgSWYNNrnc8kb8+9xWHrRg06IrPRqBwLrzVToFgybQzOu2 hkGMs1iOY2ZdFonX156It8y3bKUcSt8yFIYAhMeIj1VNSuCYHAvpxcjE8OMJ2ALxckFq p0giwIc8g6B5fCkFyQq5Vubj0vt7HIKkBuAEtJ0CQbs0JhUlv9OKfu2VbQb2aLUfxV7i u3ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TibOjdtL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f20-20020a05622a105400b0041959c8e2c0si2568432qte.110.2023.09.29.01.58.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:58:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TibOjdtL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dg-0005Ca-84; Fri, 29 Sep 2023 04:51:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DU-00051z-M4 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DA-0005bz-QJ for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Fo3sgQUoq1v/rXQDfdnS796xPwOPol/7CVX97Dogeq8=; b=TibOjdtLQUTBIiTTXeUOv4sI7jAwuvLNUuJlCg2byizpKYo5fBWwUGTfGDpA0dDzKszwDR p0dCh3YQ6wJWwTQa4+1CcJ7EBtauvYs1iLsBXyIq9l3BldqY2PXqkbdpbiJ/dej7Mfly78 xonO0MGdbuEvWIuOsGkP+JlCGjG3zr8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-687-trWVRLUMOdCuyehyScSo0A-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: trWVRLUMOdCuyehyScSo0A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ABEC3811E7E; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6DDF810F1BE7; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6F4FD21E6914; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 11/56] target/mips: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:08 +0200 Message-ID: <20230929085053.2789105-12-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: target/mips/tcg/nanomips_translate.c.inc:4410:33: error: declaration shadows a local variable [-Werror,-Wshadow] int32_t imm = extract32(ctx->opcode, 1, 13) | ^ target/mips/tcg/nanomips_translate.c.inc:3577:9: note: previous declaration is here int imm; ^ target/mips/tcg/translate.c:15578:19: error: declaration shadows a local variable [-Werror,-Wshadow] for (unsigned i = 1; i < 32; i++) { ^ target/mips/tcg/translate.c:15567:9: note: previous declaration is here int i; ^ target/mips/tcg/msa_helper.c:7478:13: error: declaration shadows a local variable [-Werror,-Wshadow] MSA_FLOAT_MAXOP(pwx->w[0], min, pws->w[0], pws->w[0], 32); ^ target/mips/tcg/msa_helper.c:7434:23: note: expanded from macro 'MSA_FLOAT_MAXOP' float_status *status = &env->active_tc.msa_fp_status; ^ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-5-philmd@linaro.org> Signed-off-by: Markus Armbruster --- target/mips/tcg/msa_helper.c | 8 ++++---- target/mips/tcg/translate.c | 8 +++----- target/mips/tcg/nanomips_translate.c.inc | 6 +++--- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index c314a74397..7a8dbada5d 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -7432,15 +7432,15 @@ void helper_msa_ftq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, #define MSA_FLOAT_MAXOP(DEST, OP, ARG1, ARG2, BITS) \ do { \ - float_status *status = &env->active_tc.msa_fp_status; \ + float_status *status_ = &env->active_tc.msa_fp_status; \ int c; \ \ - set_float_exception_flags(0, status); \ - DEST = float ## BITS ## _ ## OP(ARG1, ARG2, status); \ + set_float_exception_flags(0, status_); \ + DEST = float ## BITS ## _ ## OP(ARG1, ARG2, status_); \ c = update_msacsr(env, 0, 0); \ \ if (get_enabled_exceptions(env, c)) { \ - DEST = ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; \ + DEST = ((FLOAT_SNAN ## BITS(status_) >> 6) << 6) | c; \ } \ } while (0) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 9bb40f1849..26d741d960 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -15564,10 +15564,8 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns, void mips_tcg_init(void) { - int i; - cpu_gpr[0] = NULL; - for (i = 1; i < 32; i++) + for (unsigned i = 1; i < 32; i++) cpu_gpr[i] = tcg_global_mem_new(cpu_env, offsetof(CPUMIPSState, active_tc.gpr[i]), @@ -15584,7 +15582,7 @@ void mips_tcg_init(void) rname); } #endif /* !TARGET_MIPS64 */ - for (i = 0; i < 32; i++) { + for (unsigned i = 0; i < 32; i++) { int off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[0]); fpu_f64[i] = tcg_global_mem_new_i64(cpu_env, off, fregnames[i]); @@ -15592,7 +15590,7 @@ void mips_tcg_init(void) msa_translate_init(); cpu_PC = tcg_global_mem_new(cpu_env, offsetof(CPUMIPSState, active_tc.PC), "PC"); - for (i = 0; i < MIPS_DSP_ACC; i++) { + for (unsigned i = 0; i < MIPS_DSP_ACC; i++) { cpu_HI[i] = tcg_global_mem_new(cpu_env, offsetof(CPUMIPSState, active_tc.HI[i]), regnames_HI[i]); diff --git a/target/mips/tcg/nanomips_translate.c.inc b/target/mips/tcg/nanomips_translate.c.inc index a98dde0d2e..d81a7c2d11 100644 --- a/target/mips/tcg/nanomips_translate.c.inc +++ b/target/mips/tcg/nanomips_translate.c.inc @@ -4407,8 +4407,8 @@ static int decode_nanomips_32_48_opc(CPUMIPSState *env, DisasContext *ctx) case NM_BPOSGE32C: check_dsp_r3(ctx); { - int32_t imm = extract32(ctx->opcode, 1, 13) | - extract32(ctx->opcode, 0, 1) << 13; + imm = extract32(ctx->opcode, 1, 13) + | extract32(ctx->opcode, 0, 1) << 13; gen_compute_branch_nm(ctx, OPC_BPOSGE32, 4, -1, -2, imm << 1); @@ -4635,7 +4635,7 @@ static int decode_isa_nanomips(CPUMIPSState *env, DisasContext *ctx) break; case NM_LI16: { - int imm = extract32(ctx->opcode, 0, 7); + imm = extract32(ctx->opcode, 0, 7); imm = (imm == 0x7f ? -1 : imm); if (rt != 0) { tcg_gen_movi_tl(cpu_gpr[rt], imm); From patchwork Fri Sep 29 08:50:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727603 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp331901wrt; Fri, 29 Sep 2023 01:52:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGANMy9pqAqN0bONWi5l55Ls/Kt8ifkPyErj9cr4NJdxo6f/SqzNEhAsu3WHsK+RJaX83cl X-Received: by 2002:a05:620a:bc1:b0:76f:1268:9e26 with SMTP id s1-20020a05620a0bc100b0076f12689e26mr3812541qki.24.1695977530329; Fri, 29 Sep 2023 01:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977530; cv=none; d=google.com; s=arc-20160816; b=MxcDEBPygs1Xg4s9kdWvGFfiQHqbpYFXpp0S+a+DivUcaxAkkdF2H0LFA7CN6a4O/n TLG0xvY3maKnZ2NBY8YZhwdLP+MnYSBB7EGe0AWbaceWHLoo2bw0Ngunr8sairbH4kfb GGig0pQhrenw20HISjW39/EPts4+zLG+uVWvneUG6UjTZSFvFaXafvozt+/8B8vo8P5L 59AU+9GY1mkrOMkDlOdJotvsVgnkD1c+Du5zJRLr19C/13BnMx7nJq9mEnQsZyfH0iGY g0drotTBWH4LLGrrGR5HZtPxu8HSVBQR56Uz8M8WUubGDOHYDP+OkVHTGcDhl5TKmLDJ 3uSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ll5bXXu1nVFA0cbGY/6KvJ6V2dFJkq3aCHLqLxUxRGI=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=nKrogh/CUmU1u+lE3szaaSN+2LFTUkHC30faHC505exuhgDGfZQrdsomjvkdkX40ZG o9AM0V7ubh9W7D2iYdsd1hR7jFIhdw0l68BAkl7OvAGllUbJeN+zjbslayT6hMFNZeOj rRlkvJF0sjz/3DAcjVOIdUoC1qKtm6c9MdE3CojzupZ2ox+WxuvYgWoD/mojC2pEsHPn QLQW+EibkzFpdLsKcns4jm0dZcVopWBO544szFI5SDWYHEaLNisGat8cp2UzVTEQwqtT WSdsaVl2S3/Dtz3L+3CzNiFvOq+b5pGibcYrguhdyWdKGlqlFKqJ4WVlxO0Mf1BX6muo Nx/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fYGIgKtn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i11-20020a05620a248b00b00775907603f0si216628qkn.470.2023.09.29.01.52.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fYGIgKtn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DZ-000596-M7; Fri, 29 Sep 2023 04:51:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DV-000520-Ai for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DB-0005cs-Tj for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ll5bXXu1nVFA0cbGY/6KvJ6V2dFJkq3aCHLqLxUxRGI=; b=fYGIgKtnYHEblAqXOdvKkuccq9FBVMXAiFnYUi0rm2uFoWlaiXmGxbEWTMX/WOJ5Niz7Nq ebMObLIeFlY63YM17ajkC9XU8SfowstDYMqng5SwgA8cduRq5z7kGrTgl1sL0cSveGUVr6 r5TogwRLJvvqpkuIHEJ6FQuZXToWZ+E= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-528-xP6j9z8_NI2t_HgIbxbisA-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: xP6j9z8_NI2t_HgIbxbisA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A091B101A53B; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D7D714171CA; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7230B21E6915; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 12/56] target/m68k: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:09 +0200 Message-ID: <20230929085053.2789105-13-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: target/m68k/translate.c:828:18: error: declaration shadows a local variable [-Werror,-Wshadow] TCGv tmp = tcg_temp_new(); ^ target/m68k/translate.c:801:15: note: previous declaration is here TCGv reg, tmp, result; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-ID: <20230904161235.84651-6-philmd@linaro.org> Signed-off-by: Markus Armbruster --- target/m68k/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 9e224fe796..15c9ddf427 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -824,7 +824,7 @@ static TCGv gen_ea_mode(CPUM68KState *env, DisasContext *s, int mode, int reg0, reg = get_areg(s, reg0); result = gen_ldst(s, opsize, reg, val, what, index); if (what == EA_STORE || !addrp) { - TCGv tmp = tcg_temp_new(); + tmp = tcg_temp_new(); if (reg0 == 7 && opsize == OS_BYTE && m68k_feature(s->env, M68K_FEATURE_M68K)) { tcg_gen_addi_i32(tmp, reg, 2); From patchwork Fri Sep 29 08:50:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727616 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333084wrt; Fri, 29 Sep 2023 01:56:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGjB18l7bBKfF5zJnyPaegwHoKjgwc8KLJlhyWBrSgZtDwdyUn2ohMxUx9ITIHQtCWEpH6 X-Received: by 2002:a05:620a:3913:b0:773:b2b1:6f6a with SMTP id qr19-20020a05620a391300b00773b2b16f6amr3696763qkn.59.1695977778298; Fri, 29 Sep 2023 01:56:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977778; cv=none; d=google.com; s=arc-20160816; b=TzGK3in/wzG/GdR7LjnOEPGVgLepSGzQ6WiW2zt+n2oi4ogORTzHxqJhKO+LZ1cE9Y fZOrSgJHb0GG4rfUYn1s6P/OxZ+DdcSChyo1e0L9udkzVxxqFqhpGEvyBsYPJ2p9l98j KuyfRgzGzbQomzDRoki4/zf1AekrnNCkMOY+/zXYGqWyR2TwamW8M/YRamlYUURqaiAT QtCE+s70lsfcP9UUPht29gf8DHlVuZftNqluopT5YqTaBSZQYuYjA0zsVXDRSwxmr3ms BjoEh/TMNz01Hvo5hX3isEteZVHG441jFsE8leis+dyxecf4oCnHiITx6SBq7rHf4DEQ Cjng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=u+gXFHyiOssKuws26aj3snZMvL7ARvGkD3IT5khP5Gs=; fh=4BNfS75s1GAZLJLea+sTLx/vsXqv6uUvqeHQnw8gEeM=; b=XujqmXiD8YwYhSzgDbnrxDL72sYJqwsevAH4CnP1yyWNk5tNOSx/otm5jZSZRhr/s+ syGkTS34hoM7Irnhz/5sVr1Vc9VFgLPieMp4lcgVQbXiopxUJjOtXfRzZSbyPK3OhQWG EF/S26nwNVAWEkEzwWmWN8ZKSAJMBHSzbo9Z14ypzyL6OO7V+KCuRzFnas+6ItbcGzZT Pt61mMTSgsyPp6d4LJdSADHJEL2M4He/YxHElh5Vn6QhUDmMZIQUjQj5foaTcAch+Vo1 ChpU38M2HxsC7Jnszp3VovBJh+DMDMZlyolR2Rxmj/886I3tzcsEzvnrsYLCdTBiyWfH M/1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IRmI0hMb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id re24-20020a05620a8e1800b0076daeaded07si9556427qkn.74.2023.09.29.01.56.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:56:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IRmI0hMb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dc-0005C2-QK; Fri, 29 Sep 2023 04:51:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DQ-000507-Ng for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DA-0005bl-LT for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u+gXFHyiOssKuws26aj3snZMvL7ARvGkD3IT5khP5Gs=; b=IRmI0hMbijL9PGvPcLbqExV4cHXf0wofA0Frn+Yhh6PBq0U3Rsgrz00pFwRJly/OwXEvh7 Uqz4wSt3KlFVzTq7aV5LfYzfR2H+hLOTI3bAxf0XklCKGNsXyv3ry+o20pfH3P0CmWrXOM CDAHnh/8wPw4Ie8P8Mtj3rrMVzkYIdE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-687-6k7aB4tCOci4Zb3cCu60Lw-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: 6k7aB4tCOci4Zb3cCu60Lw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ED0F03806737; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B1AE0C15BB8; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7512621E6916; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bastian Koppelmann Subject: [PULL 13/56] target/tricore: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:10 +0200 Message-ID: <20230929085053.2789105-14-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: target/tricore/translate.c:5016:18: warning: declaration of ‘temp’ shadows a previous local [-Wshadow=compatible-local] 5016 | TCGv temp = tcg_constant_i32(const9); | ^~~~ target/tricore/translate.c:4958:10: note: shadowed declaration is here 4958 | TCGv temp; | ^~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-7-philmd@linaro.org> Reviewed-by: Bastian Koppelmann Signed-off-by: Markus Armbruster --- target/tricore/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 6ae5ccbf72..9ca211b2a8 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -4962,8 +4962,6 @@ static void decode_rc_logical_shift(DisasContext *ctx) const9 = MASK_OP_RC_CONST9(ctx->opcode); op2 = MASK_OP_RC_OP2(ctx->opcode); - temp = tcg_temp_new(); - switch (op2) { case OPC2_32_RC_AND: tcg_gen_andi_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], const9); @@ -4972,10 +4970,12 @@ static void decode_rc_logical_shift(DisasContext *ctx) tcg_gen_andi_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], ~const9); break; case OPC2_32_RC_NAND: + temp = tcg_temp_new(); tcg_gen_movi_tl(temp, const9); tcg_gen_nand_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], temp); break; case OPC2_32_RC_NOR: + temp = tcg_temp_new(); tcg_gen_movi_tl(temp, const9); tcg_gen_nor_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], temp); break; @@ -5013,7 +5013,7 @@ static void decode_rc_logical_shift(DisasContext *ctx) break; case OPC2_32_RC_SHUFFLE: if (has_feature(ctx, TRICORE_FEATURE_162)) { - TCGv temp = tcg_constant_i32(const9); + temp = tcg_constant_i32(const9); gen_helper_shuffle(cpu_gpr_d[r2], cpu_gpr_d[r1], temp); } else { generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC); From patchwork Fri Sep 29 08:50:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727620 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333490wrt; Fri, 29 Sep 2023 01:57:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7+FGTahrRf4PTsWs/mPvAVTt+HyLz5wlB5b/kCbvymFU/XSe61NPpoKV7X9iI4O2rqn/2 X-Received: by 2002:a05:622a:c4:b0:417:9ee1:800e with SMTP id p4-20020a05622a00c400b004179ee1800emr4585019qtw.37.1695977864637; Fri, 29 Sep 2023 01:57:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977864; cv=none; d=google.com; s=arc-20160816; b=DF2b6gl7U+Q1ZB5V0OLhBSDzkqCpiqBNd2rBPsKA6Y/2/3DQmpobcdv4PO6rpy10ig XFESIGL95aixs8K/mkobpyPtUuUtOU+csaGEip5aER6TpGS2TOPrxwgM04ZWtegSZe4i v3OggWEHj4TxVUiGcwlDZFLoamp3d4CuWO+sYScWk4BmC598oXpcCVcsySfGC86mW6AS 2gCXN+S6dZ9OgxKwwSckLYHxZhs6P3SEKrUyp65dN+d4WILMXs60KAmW2MQ6CQVl6wFb nBLY+fmOwd9bmOH0VWdLovkeZCeDPgujE5FXFwoISybd7Y0SRQzYlfYJZkNs+96396B4 YO0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EcNL3KNWfgGlXj+8QerAso4JKo/jrGmH/Zj7oToKoSI=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=fE/Ad5umm5LAQgjd31CtyDe3NcHxCETcRLDFUbiXqJsbH6dBrKvNbDmw0Zzg+sX2Tb al1ZVxnQ5j2kwznA18ASf624fIX03LwsZ41p/LY4xYqUPiyoeIFvLQ+aR34b8q3mSogv bMSQS5VC21zxx3jJt0G/twvp6QeQxBrp+6iRC1xBFX6T1ACctx8i1N3H7IHCVgSBj7iz wpejbJPkpfl6ABAZNZuKznBPNQ4udxBpseREQuau/VynONd2a9fXExN8DURQzu3cH/zu voyNDDF3ppRl8UnbLzUXjxMFvWZGEoBikp30q/XQNKaKor1Q1uiUBY68z7nlMrn20pl7 0Pog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="IHNr+cY/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d22-20020a05622a101600b0041817f7086dsi5101551qte.556.2023.09.29.01.57.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:57:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="IHNr+cY/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DX-00055f-Em; Fri, 29 Sep 2023 04:51:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DM-0004y1-Jg for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DB-0005c4-E0 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EcNL3KNWfgGlXj+8QerAso4JKo/jrGmH/Zj7oToKoSI=; b=IHNr+cY/NlZWhTJb3AXZNybh298dhn79B2AITTJj+xjmcUPkCXMa7m2VUlEKUYTXE7lpqX yzEg0XW0iYwPi1LD+iBbPifoaoK0wTvKAIBTMIGoyGoZWccU9CJrqv8nV2TVpzolH4nurl zzhWnMBP99toSsMMWYwxDLJzpe48R3w= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-115--IoKKtiEMlyUhlgi78Svhw-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: -IoKKtiEMlyUhlgi78Svhw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F258C3C0F458; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B469B176E4; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 77EFA21E691A; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 14/56] hw/arm/armv7m: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:11 +0200 Message-ID: <20230929085053.2789105-15-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: hw/arm/armv7m.c: In function ‘armv7m_realize’: hw/arm/armv7m.c:520:27: warning: declaration of ‘sbd’ shadows a previous local [-Wshadow=compatible-local] 520 | SysBusDevice *sbd = SYS_BUS_DEVICE(&s->bitband[i]); | ^~~ hw/arm/armv7m.c:278:19: note: shadowed declaration is here 278 | SysBusDevice *sbd; | ^~~ --- hw/arm/armsse.c: In function ‘armsse_realize’: hw/arm/armsse.c:1471:27: warning: declaration of ‘mr’ shadows a previous local [-Wshadow=compatible-local] 1471 | MemoryRegion *mr; | ^~ hw/arm/armsse.c:917:19: note: shadowed declaration is here 917 | MemoryRegion *mr; | ^~ --- hw/arm/armsse.c:1608:22: warning: declaration of ‘dev_splitter’ shadows a previous local [-Wshadow=compatible-local] 1608 | DeviceState *dev_splitter = DEVICE(splitter); | ^~~~~~~~~~~~ hw/arm/armsse.c:923:18: note: shadowed declaration is here 923 | DeviceState *dev_splitter; | ^~~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-8-philmd@linaro.org> Reviewed-by: Peter Maydell Signed-off-by: Markus Armbruster --- hw/arm/armsse.c | 16 ++++++---------- hw/arm/armv7m.c | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index 11cd08b6c1..31acbf7347 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -1468,7 +1468,6 @@ static void armsse_realize(DeviceState *dev, Error **errp) if (info->has_cachectrl) { for (i = 0; i < info->num_cpus; i++) { char *name = g_strdup_printf("cachectrl%d", i); - MemoryRegion *mr; qdev_prop_set_string(DEVICE(&s->cachectrl[i]), "name", name); g_free(name); @@ -1484,7 +1483,6 @@ static void armsse_realize(DeviceState *dev, Error **errp) if (info->has_cpusecctrl) { for (i = 0; i < info->num_cpus; i++) { char *name = g_strdup_printf("CPUSECCTRL%d", i); - MemoryRegion *mr; qdev_prop_set_string(DEVICE(&s->cpusecctrl[i]), "name", name); g_free(name); @@ -1499,7 +1497,6 @@ static void armsse_realize(DeviceState *dev, Error **errp) } if (info->has_cpuid) { for (i = 0; i < info->num_cpus; i++) { - MemoryRegion *mr; qdev_prop_set_uint32(DEVICE(&s->cpuid[i]), "CPUID", i); if (!sysbus_realize(SYS_BUS_DEVICE(&s->cpuid[i]), errp)) { @@ -1512,7 +1509,6 @@ static void armsse_realize(DeviceState *dev, Error **errp) } if (info->has_cpu_pwrctrl) { for (i = 0; i < info->num_cpus; i++) { - MemoryRegion *mr; if (!sysbus_realize(SYS_BUS_DEVICE(&s->cpu_pwrctrl[i]), errp)) { return; @@ -1605,7 +1601,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) /* Wire up the splitters for the MPC IRQs */ for (i = 0; i < IOTS_NUM_EXP_MPC + info->sram_banks; i++) { SplitIRQ *splitter = &s->mpc_irq_splitter[i]; - DeviceState *dev_splitter = DEVICE(splitter); + DeviceState *devs = DEVICE(splitter); if (!object_property_set_int(OBJECT(splitter), "num-lines", 2, errp)) { @@ -1617,22 +1613,22 @@ static void armsse_realize(DeviceState *dev, Error **errp) if (i < IOTS_NUM_EXP_MPC) { /* Splitter input is from GPIO input line */ - s->mpcexp_status_in[i] = qdev_get_gpio_in(dev_splitter, 0); - qdev_connect_gpio_out(dev_splitter, 0, + s->mpcexp_status_in[i] = qdev_get_gpio_in(devs, 0); + qdev_connect_gpio_out(devs, 0, qdev_get_gpio_in_named(dev_secctl, "mpcexp_status", i)); } else { /* Splitter input is from our own MPC */ qdev_connect_gpio_out_named(DEVICE(&s->mpc[i - IOTS_NUM_EXP_MPC]), "irq", 0, - qdev_get_gpio_in(dev_splitter, 0)); - qdev_connect_gpio_out(dev_splitter, 0, + qdev_get_gpio_in(devs, 0)); + qdev_connect_gpio_out(devs, 0, qdev_get_gpio_in_named(dev_secctl, "mpc_status", i - IOTS_NUM_EXP_MPC)); } - qdev_connect_gpio_out(dev_splitter, 1, + qdev_connect_gpio_out(devs, 1, qdev_get_gpio_in(DEVICE(&s->mpc_irq_orgate), i)); } /* Create GPIO inputs which will pass the line state for our diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index bf173b10b8..1f78e18872 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -517,7 +517,7 @@ static void armv7m_realize(DeviceState *dev, Error **errp) for (i = 0; i < ARRAY_SIZE(s->bitband); i++) { if (s->enable_bitband) { Object *obj = OBJECT(&s->bitband[i]); - SysBusDevice *sbd = SYS_BUS_DEVICE(&s->bitband[i]); + sbd = SYS_BUS_DEVICE(&s->bitband[i]); if (!object_property_set_int(obj, "base", bitband_input_addr[i], errp)) { From patchwork Fri Sep 29 08:50:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727611 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332449wrt; Fri, 29 Sep 2023 01:53:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGypw+RJM6xfDRgqGcOT6+r7h8ZsGuWHIDaDtQjnbMeJ+92wpL/JmvNgnG4LORg/FKpHUUB X-Received: by 2002:a05:6214:3d89:b0:65a:f332:10f9 with SMTP id om9-20020a0562143d8900b0065af33210f9mr3949144qvb.31.1695977638869; Fri, 29 Sep 2023 01:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977638; cv=none; d=google.com; s=arc-20160816; b=0MXqVnjHLxIdcp3HRP18qIj24RKJ012bFpLTKtKL349otS78n2tU9UOCbRuB+v4u/R QzOSRdKrrmJ7TfDGs/mZ8vM/BOcweQOIQtZtfZwwdfMwczWhe7Jughm17RQVrOiAcF9X 10Q0HqCvxJWlnjJQCybdzhYHYp+94OMtnxQ5tpYcd6KgjX8udBtttDAj7UxvgKz/wbJc +23r7l9zCYWEHjcgUSmubmC3brSDIUzvpWYs05ks8tbOvwld3/DQBoRXQ14+i8fhBXdR L6GikAwhj+0iwnrqclYFw3Efq/WMF7g4YgYqc3diZdtzzAUGgCsH8qf0SrIb404rujk/ lYtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GLS8hKYIud+QsFyN4gSipeI/BAQn5RSSiAuPEBlCmeE=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=wEY+rVe4gIu+oIl6beBGt6g5hqn8V4t+jFI9hvBYs3+rkpcgKPxke/wv6CJ6vngrWb DuEKz5fPianMBMCmofcEyQZb3l1MDwJDp8z0QFY0BB519wpqe0kDEiFFbX5TNPSnoAEn oSM/WBe6z4zoi1TJFM0DWJqfTOzDtVRhFj6Ye9xQbzqJrI4J2T5GsGzevtL6I+m9c+uv KRnIU1aliUI8moz+wojeJ9LDvf0FzhOWHJL7Th4NWRfQoUZYgjWspAa533ylkDKQ62sL hx+QaCTywC8oxcL2rwjtM/JSlIPV67EQOD0ugD4jezzA1HD4Y3fICtfJ8VZrHcY9RoXh toQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LlQ322rm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f29-20020a0caa9d000000b0065af18cab63si7083540qvb.346.2023.09.29.01.53.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:53:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LlQ322rm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DZ-00058W-BG; Fri, 29 Sep 2023 04:51:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DX-00054B-6w for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DC-0005cZ-Pp for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GLS8hKYIud+QsFyN4gSipeI/BAQn5RSSiAuPEBlCmeE=; b=LlQ322rmt7mmPxrBcWwGvGJDU64JwAUfIQJJB4P97RpiZhSxtbLCyq0UCkngBysAcXk4Ln YEM7cVLmnUuRD/jDB3SsS4CDN79CnrhmzvLsjkmVmmpZEXODO1T1E3C342/jyDu7OQ+7O3 zKO/gnZ0LDQ/OBLFFvjNko0FYyfNQ5A= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-NZ8KM_5dNeahbQNplMww3A-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: NZ8KM_5dNeahbQNplMww3A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 82CDD800B35; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6046E40C6EBF; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7B17A21E691B; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 15/56] hw/arm/virt: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:12 +0200 Message-ID: <20230929085053.2789105-16-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: hw/arm/virt.c:821:22: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_irq irq = qdev_get_gpio_in(vms->gic, ^ hw/arm/virt.c:803:13: note: previous declaration is here int irq; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-ID: <20230904161235.84651-9-philmd@linaro.org> Signed-off-by: Markus Armbruster --- hw/arm/virt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 8ad78b23c2..15e74249f9 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -801,7 +801,6 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem) for (i = 0; i < smp_cpus; i++) { DeviceState *cpudev = DEVICE(qemu_get_cpu(i)); int ppibase = NUM_IRQS + i * GIC_INTERNAL + GIC_NR_SGIS; - int irq; /* Mapping from the output timer irq lines from the CPU to the * GIC PPI inputs we use for the virt board. */ @@ -812,7 +811,7 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem) [GTIMER_SEC] = ARCH_TIMER_S_EL1_IRQ, }; - for (irq = 0; irq < ARRAY_SIZE(timer_irq); irq++) { + for (unsigned irq = 0; irq < ARRAY_SIZE(timer_irq); irq++) { qdev_connect_gpio_out(cpudev, irq, qdev_get_gpio_in(vms->gic, ppibase + timer_irq[irq])); From patchwork Fri Sep 29 08:50:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727621 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333732wrt; Fri, 29 Sep 2023 01:58:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGry1b6s/hOH6oLk06zZ+wgHN51+Hhi3s2spbpAeFzJ9bOVl1SE7U3yM8E+8OGDhiyJ9i0X X-Received: by 2002:a05:622a:513:b0:419:4bdf:756b with SMTP id l19-20020a05622a051300b004194bdf756bmr3914936qtx.36.1695977919173; Fri, 29 Sep 2023 01:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977919; cv=none; d=google.com; s=arc-20160816; b=OTF++EJi2w+ltVLpZ8FAwHOBTTwgCfXtdXvOuyg8vgMZBzaB4lEVXg4PTqT5MUNSru Ds4I3qym3YkvgmRikYFQY5tvCaEx+ZbewD8O7a5bklKyGX4wZo4xbHIz68rgdkpkoxBS r0hglXrkMtqe6DyZwwM7PRPZjeQ/3mN3IkQYusgnaAyQbKOHC5vsmMBe/D/UOdUiH7qJ EblZGJJ9/q+heLpSqBoJYzg40BHzTUkpmVlXqRNGp6MeMK2SvS0uZy+DfyS4mS6ieqlQ 2kAmM53BR6Nv1AFk8fn8j6X+Fl6SygtD8/tD4REfdMmKKIYkspDxODVtqmc3ne7NyJQR /kFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n6mHNfgmRFfmrHLYyODE6mZv5yjPRcsdm2kcZfvXjpY=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=JxjfwfFVki4Nd4ZI86hpr/wNu4PB+x2Ebl6ws5jbsNzGzEBSCyoOWmUlisUOzL43Zd R6xhTN77TXlovqzWAgDO0jWQwXBSyKhMAWFACkuZMClKBn0DjO8bp3CFmGfzmh3wRFUe zrQmb4I5JqtouFvDwA1aNLj+Ql7WWcA8byrVzL7L871X00HD/5AIm/KfIR/DePmcqJrH PcSX1aMe1ZYoL+DBwTTaA/fxxhuczSoSkwuZBG0t1I4Xo9CAknJhNMZ6ASAfmfdkekWW quLcbvaNb3im7f8GhJZei8+fWBu6qcalO+mGJRtn6hgXd7pwEzC3ckN83PlExRELwWGP fe1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gNIoHz5h; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id tn15-20020a05620a3c0f00b0076db59242a1si5130542qkn.468.2023.09.29.01.58.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:58:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gNIoHz5h; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dg-0005EC-5I; Fri, 29 Sep 2023 04:51:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DU-00051a-Co for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DC-0005ca-K3 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n6mHNfgmRFfmrHLYyODE6mZv5yjPRcsdm2kcZfvXjpY=; b=gNIoHz5h4YaAJaC9+zQdsCCacrS2yUM92IQ1+Fjetz7p5oa2c2ATi73wyi2BVWIfmyQcd6 LEHiQ3u1TlJeCc8cqAo2IhHVuM6GOgWSKkoDYSIt1umlmbdFrcWE8t06iOn+0hmeOtr65G 21mv+iapwRNEkSnymApYhbohAdj2wLg= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-310-1soWmgaCNZedDtQxa4npTA-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: 1soWmgaCNZedDtQxa4npTA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 893FF29AA3B9; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6645A492C37; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7DF6321E691C; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 16/56] hw/arm/allwinner: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:13 +0200 Message-ID: <20230929085053.2789105-17-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: hw/arm/allwinner-r40.c:412:14: error: declaration shadows a local variable [-Werror,-Wshadow] for (int i = 0; i < AW_R40_NUM_MMCS; i++) { ^ hw/arm/allwinner-r40.c:299:14: note: previous declaration is here unsigned i; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-ID: <20230904161235.84651-10-philmd@linaro.org> Signed-off-by: Markus Armbruster --- hw/arm/allwinner-r40.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/arm/allwinner-r40.c b/hw/arm/allwinner-r40.c index 7d29eb224f..a0d367c60d 100644 --- a/hw/arm/allwinner-r40.c +++ b/hw/arm/allwinner-r40.c @@ -296,10 +296,9 @@ static void allwinner_r40_realize(DeviceState *dev, Error **errp) { const char *r40_nic_models[] = { "gmac", "emac", NULL }; AwR40State *s = AW_R40(dev); - unsigned i; /* CPUs */ - for (i = 0; i < AW_R40_NUM_CPUS; i++) { + for (unsigned i = 0; i < AW_R40_NUM_CPUS; i++) { /* * Disable secondary CPUs. Guest EL3 firmware will start @@ -335,7 +334,7 @@ static void allwinner_r40_realize(DeviceState *dev, Error **errp) * maintenance interrupt signal to the appropriate GIC PPI inputs, * and the GIC's IRQ/FIQ/VIRQ/VFIQ interrupt outputs to the CPU's inputs. */ - for (i = 0; i < AW_R40_NUM_CPUS; i++) { + for (unsigned i = 0; i < AW_R40_NUM_CPUS; i++) { DeviceState *cpudev = DEVICE(&s->cpus[i]); int ppibase = AW_R40_GIC_NUM_SPI + i * GIC_INTERNAL + GIC_NR_SGIS; int irq; @@ -494,7 +493,7 @@ static void allwinner_r40_realize(DeviceState *dev, Error **errp) qdev_get_gpio_in(DEVICE(&s->gic), AW_R40_GIC_SPI_EMAC)); /* Unimplemented devices */ - for (i = 0; i < ARRAY_SIZE(r40_unimplemented); i++) { + for (unsigned i = 0; i < ARRAY_SIZE(r40_unimplemented); i++) { create_unimplemented_device(r40_unimplemented[i].device_name, r40_unimplemented[i].base, r40_unimplemented[i].size); From patchwork Fri Sep 29 08:50:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727609 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332387wrt; Fri, 29 Sep 2023 01:53:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH59So34JJ1WO+8WA5KSXLoTaDSthzU9zx0Ul2SgQVgLnweqkn25VutL7ouIXn0To1dGzoM X-Received: by 2002:ac8:5789:0:b0:417:9cae:b43 with SMTP id v9-20020ac85789000000b004179cae0b43mr4171648qta.35.1695977627316; Fri, 29 Sep 2023 01:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977627; cv=none; d=google.com; s=arc-20160816; b=kif7qK1HFPLdK9IfdlQOlxw5uvKwgPdTd6ASvlH/A+eAHYbOkKXwIv7ur5ciIv3fOm k5gb/3V9YibimMrBtY8sZ2eXp8hRzbc/wSMD6qo+8VjgCHJPWabFnvDflir5lRIAvihR 5NKeCURgHdrJoyYMezp1jexUAcZiPrnhiIYTfW2svmveD2LyDeFtZQH/g0UBMY4Fykyx sR8MIfVo938zxoHFtOM87H8twsTSP7g/h4zQC7X8FS9y1WIv6xpmNvowoLFPyjEK//CW SF9AlSlSLz0Yjl5/QA0bLCSu1AkxhQKogzbA8vVtXp5I5QVYPv2U0blMIA1nR/+A8vyp j8iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=leHG7gs8FX5ozx1PuThc684J6vqDCXFzX9PpzbgoAp4=; fh=BaSONcX+XFEGaG5iToYvksCjvv3xzJJzpAIWMeDOS0k=; b=ba5Cx5D1fu2vnADKd8MpOjoR9c5DezwHhgV+fUXPJUM+3FTYB3jbXjiPLpidyejzPl DjG/OHNaLlfunAa2QJ/gDfSa4fpZwOAVcfuMp1GK92D6f82/jLvF2xjV2UNRUHReWQno l+RKU6oHSQgDs+jzLFalhrjHvFdcbYA2C9BFRDATXbGLggas9U3CEz/1J8CxXeS7fCgf +X5HsF9tzS6JNvC+OI6prp5gokArE5qbVvMCdTmMl2jSKUP7EfqyipHUPl067sMNpUbd awGqiUYw27kHomnES4dGQeYbkg+JGgqNAIg2zyKoLA48TAdM2/QMj8IiUVPMhAFcdYKH 6oFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GVmxfLdO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v16-20020ac85790000000b004181a0f4104si5028114qta.34.2023.09.29.01.53.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:53:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GVmxfLdO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9De-0005CM-Fe; Fri, 29 Sep 2023 04:51:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DQ-000508-TL for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DB-0005cA-Ip for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=leHG7gs8FX5ozx1PuThc684J6vqDCXFzX9PpzbgoAp4=; b=GVmxfLdONDHF3pJ8yITsGrZDuhkCl/5Vf2FbZMQfq1rgH8UofFc7RYle1xjXt9L567OjmV TlJLYR8jscC1GU1/Dip0TCvtruLy/lR3qjD7S7zNIlHlLx0qg7U59pJQtmmIjW5ef8VgUv 4nck108RVyOoqRrLGG7Wd6znKG19v+o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-532-TJ4lZUCHPkePP2HED3Wqvw-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: TJ4lZUCHPkePP2HED3Wqvw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8DDAB803DBD; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6AC012026D4B; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 80EF621E6880; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PULL 17/56] hw/m68k: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:14 +0200 Message-ID: <20230929085053.2789105-18-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: hw/m68k/virt.c:263:13: error: declaration shadows a local variable [-Werror,-Wshadow] BOOTINFOSTR(param_ptr, BI_COMMAND_LINE, ^ hw/m68k/bootinfo.h:47:13: note: expanded from macro 'BOOTINFOSTR' int i; \ ^ hw/m68k/virt.c:130:9: note: previous declaration is here int i; ^ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-13-philmd@linaro.org> Reviewed-by: Thomas Huth Signed-off-by: Markus Armbruster --- hw/m68k/bootinfo.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/m68k/bootinfo.h b/hw/m68k/bootinfo.h index a3d37e3c80..0e6e3eea87 100644 --- a/hw/m68k/bootinfo.h +++ b/hw/m68k/bootinfo.h @@ -44,15 +44,14 @@ #define BOOTINFOSTR(base, id, string) \ do { \ - int i; \ stw_p(base, id); \ base += 2; \ stw_p(base, \ (sizeof(struct bi_record) + strlen(string) + \ 1 /* null termination */ + 3 /* padding */) & ~3); \ base += 2; \ - for (i = 0; string[i]; i++) { \ - stb_p(base++, string[i]); \ + for (unsigned i_ = 0; string[i_]; i_++) { \ + stb_p(base++, string[i_]); \ } \ stb_p(base++, 0); \ base = QEMU_ALIGN_PTR_UP(base, 4); \ @@ -60,7 +59,6 @@ #define BOOTINFODATA(base, id, data, len) \ do { \ - int i; \ stw_p(base, id); \ base += 2; \ stw_p(base, \ @@ -69,8 +67,8 @@ base += 2; \ stw_p(base, len); \ base += 2; \ - for (i = 0; i < len; ++i) { \ - stb_p(base++, data[i]); \ + for (unsigned i_ = 0; i_ < len; ++i_) { \ + stb_p(base++, data[i_]); \ } \ base = QEMU_ALIGN_PTR_UP(base, 4); \ } while (0) From patchwork Fri Sep 29 08:50:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727612 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332626wrt; Fri, 29 Sep 2023 01:54:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFg3F8Dt/Tpe+kuwrpq6ZWz4qw1G311C6EeUYkqNz3cH19qlDZCAxt+N4Rz8uuVYOpNZ3DG X-Received: by 2002:a0c:b219:0:b0:655:dc84:d744 with SMTP id x25-20020a0cb219000000b00655dc84d744mr3491778qvd.25.1695977673119; Fri, 29 Sep 2023 01:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977673; cv=none; d=google.com; s=arc-20160816; b=QrIe5ASU143VboR8+2Ol2kGCJjpjjpp2l9cimgWxe1Zs6+CoWP8PcwuyOvhfWx1kWA wOnzOCQ9L+2NxPDCbc+mpgj9X6s0kbrYuiRvH+49Tn9KXvmupvU4xp/ZpjQw7F8bzp2q 9JJwlq27TWhwxuQVOfahxz/no5sm4zEGK+tfbxfbscK1YcsK7cs3dIjxyCI2I+77z6xB jQ3zEM0m87UUnAx65bsbNlECviZ2DHG135X6QuSm48p/tUijvF1mzp0HrFnB7v/q6E72 cTImwy+pSAOctM0xrfwgGM9JpYl8avyFlwePtApJumTO5dQ+gnblMyTR/kW0xnICct+1 bQUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AuY4c+rNgBEthHETX4q54zFauPLIMdPU3WaalCkJm9Q=; fh=vkIKEHcwKJya0eJ7ZEuSZlQ+z9UQVjOKAU0iaZuC/Ks=; b=Boj7WBj4jOkjefb/3kl/FRE9WKveeL1mzNh0O6BNHAnQNqb6DE1olZlBCLvaZZ/PdC HmTO1up+LJ93xWZLIF8X2/H/aIHl17Fct5mFNBB9dUfLGgM+Ou7GXQ+rQcbfXqZp6FhS 029yd4waxgLP8I1rnVN4B2iIBmQbddh0r6fQzLoE6PaJ3F4kPqtLkEkqDS6SBTRkvqCu nKBA7WYXwdDGchNIQ4xRzTaghwNCi7zpfLABycg7B4/wPoBj6njgiE+oC2KoV/YVd8Lk NxlgtLyBYBaDIjMShIWkzD+g6cjp4tR43S9V8sV+a6E3gyr0UGPkYn1bYg4obUPpF1/2 /I/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AspphZuM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y19-20020a0cd993000000b006594b2aa67csi4305059qvj.478.2023.09.29.01.54.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AspphZuM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DU-00050u-0f; Fri, 29 Sep 2023 04:51:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DK-0004xK-5s for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DA-0005b8-D8 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AuY4c+rNgBEthHETX4q54zFauPLIMdPU3WaalCkJm9Q=; b=AspphZuMzcaHL5ZbAroA5Evo5QFhaqLi73Dw5XFt2rAmc+azTfks9A+5FsQOsh/8ksA0Ik WQBFQN2XN11LnwNMVD48mcPY/53GUFvR1OnrOnHU2Q5FTIe5rhv0IurowQhw12XUbuibLH xT8IoSp4yg7DFnOG5nA9xd2L+jSB8yo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-7qdX-6meORW_pPDDNtpf7Q-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: 7qdX-6meORW_pPDDNtpf7Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 92239801779; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F52E10F1BE7; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 83B4621E6882; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 18/56] hw/microblaze: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:15 +0200 Message-ID: <20230929085053.2789105-19-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: hw/microblaze/petalogix_ml605_mmu.c: In function ‘petalogix_ml605_init’: hw/microblaze/petalogix_ml605_mmu.c:186:24: warning: declaration of ‘dinfo’ shadows a previous local [-Wshadow=compatible-local] 186 | DriveInfo *dinfo = drive_get(IF_MTD, 0, i); | ^~~~~ hw/microblaze/petalogix_ml605_mmu.c:78:16: note: shadowed declaration is here 78 | DriveInfo *dinfo; | ^~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-14-philmd@linaro.org> Signed-off-by: Markus Armbruster --- hw/microblaze/petalogix_ml605_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c index ea0fb68cf0..fb7889cf67 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -183,7 +183,7 @@ petalogix_ml605_init(MachineState *machine) spi = (SSIBus *)qdev_get_child_bus(dev, "spi"); for (i = 0; i < NUM_SPI_FLASHES; i++) { - DriveInfo *dinfo = drive_get(IF_MTD, 0, i); + dinfo = drive_get(IF_MTD, 0, i); qemu_irq cs_line; dev = qdev_new("n25q128"); From patchwork Fri Sep 29 08:50:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727604 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp331908wrt; Fri, 29 Sep 2023 01:52:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/3kL30grrHN32bzjKCyD2Q2z/6epZsRBpOYpqjYezgh6HwHcWEO4Wi9mvZPF5oxiIHQaG X-Received: by 2002:a05:622a:453:b0:417:fe9c:6d88 with SMTP id o19-20020a05622a045300b00417fe9c6d88mr4066496qtx.37.1695977531686; Fri, 29 Sep 2023 01:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977531; cv=none; d=google.com; s=arc-20160816; b=tRRvuzBKxqkL3M2qXgD3ehUjOgN3qKE/dIiljOK0sjHe2iq/W4p4PQLUKYoBKCjLxn Kj5D3it45fZQdGmPkVg4skdQPh4yI658iM1cxP7jVHpUmuX1GbZzT2In13KsOg7v1hXs 4DBM3q/dBYZG4lcDUh8tIjsNGe4fIdLJtZgdPrERmrrze43T2rBT1zHHb72Sw2q3KyT/ GSMBHzuvsvucypkILL2yDcJKy4tm9nboqidC9v9rJzYgkl+ezE0t2XGL+h1lPgumFtPE s6VKFehKyskdiwLQ40LBupoZC8WMrpgAIt7QMwMr5nzATFqYiCOYBazkl8R/cCYwXgpx MqoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oTfBkhZ+AkKmfYBoreBoF3jgEy3JllYH6NEQgZ8yaMM=; fh=vkIKEHcwKJya0eJ7ZEuSZlQ+z9UQVjOKAU0iaZuC/Ks=; b=PcL46XBQKtKbBBRyMZjGjYtk/dUU18hge51ZYvwXe6GxYOqE7IN14w3EUqrACHZf8k CqCBStc7qqdgoQ9TeFPRRGow/cZ+F3CveQ/xbKpQi9/b/VKVDoB0bcuBFLiGF1ydIf9a 93Fg5zFJQMnJS0UR92jJWBK47wInrxssOX/o3ITT4prkFzXeiUvyfwtQR/nITri67tuL LdQae7vW0JimNyfSscxu3JM6BwV0O/WIqhhqlXNPkNkphPnjr4ufjn8Tc3RtzJp957bP Vzq79zFLBg/7FPe5nvICDm1VQXfNiH9vU+mXyPghL8LakqGL2DYb1JZVlRgXuNnN1TAW CSlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Aq1osLUd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j21-20020ac85c55000000b00419831dc7ebsi11718qtj.43.2023.09.29.01.52.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:52:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Aq1osLUd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DW-00053D-K9; Fri, 29 Sep 2023 04:51:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DK-0004xL-6U for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DA-0005bd-Dy for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oTfBkhZ+AkKmfYBoreBoF3jgEy3JllYH6NEQgZ8yaMM=; b=Aq1osLUdM5pkvmOJs1uN4JEbgeajWZa5pIHjJEuyQWhlqncZKTR9pcem2f9Tsh7XiN9RgQ 4i1PUiSzoVhCdIPW7hzOQEVwJwZCyrYSR4QP17Q0tVWUt2PiwMMzjuBogbAjJC7vnnsKkh NyHD95UxXnUviqeCFL/+HxS05ZGtIo8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-63-u7304ZHvO2OA3DKAAeGKlA-1; Fri, 29 Sep 2023 04:50:57 -0400 X-MC-Unique: u7304ZHvO2OA3DKAAeGKlA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 987B03C025C7; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7661540C6EC0; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8682421E6883; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 19/56] hw/nios2: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:16 +0200 Message-ID: <20230929085053.2789105-20-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: hw/nios2/10m50_devboard.c: In function ‘nios2_10m50_ghrd_init’: hw/nios2/10m50_devboard.c:101:22: warning: declaration of ‘dev’ shadows a previous local [-Wshadow=compatible-local] 101 | DeviceState *dev = qdev_new(TYPE_NIOS2_VIC); | ^~~ hw/nios2/10m50_devboard.c:60:18: note: shadowed declaration is here 60 | DeviceState *dev; | ^~~ hw/nios2/10m50_devboard.c:110:18: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 110 | for (int i = 0; i < 32; i++) { | ^ hw/nios2/10m50_devboard.c:67:9: note: shadowed declaration is here 67 | int i; | ^ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-15-philmd@linaro.org> Signed-off-by: Markus Armbruster --- hw/nios2/10m50_devboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c index 91383fb097..952a0dc33e 100644 --- a/hw/nios2/10m50_devboard.c +++ b/hw/nios2/10m50_devboard.c @@ -98,7 +98,7 @@ static void nios2_10m50_ghrd_init(MachineState *machine) qdev_realize_and_unref(DEVICE(cpu), NULL, &error_fatal); if (nms->vic) { - DeviceState *dev = qdev_new(TYPE_NIOS2_VIC); + dev = qdev_new(TYPE_NIOS2_VIC); MemoryRegion *dev_mr; qemu_irq cpu_irq; @@ -107,7 +107,7 @@ static void nios2_10m50_ghrd_init(MachineState *machine) cpu_irq = qdev_get_gpio_in_named(DEVICE(cpu), "EIC", 0); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irq); - for (int i = 0; i < 32; i++) { + for (i = 0; i < 32; i++) { irq[i] = qdev_get_gpio_in(dev, i); } From patchwork Fri Sep 29 08:50:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727622 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333801wrt; Fri, 29 Sep 2023 01:58:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmJA5aHLsH/gf5K2MT1d5h0xy9DHZE5i9zYKfRV8oj4ysfqJ/pAOK1ODnR5nwEbUCGB68v X-Received: by 2002:a0c:a899:0:b0:65d:79:b3fe with SMTP id x25-20020a0ca899000000b0065d0079b3femr2878580qva.21.1695977932625; Fri, 29 Sep 2023 01:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977932; cv=none; d=google.com; s=arc-20160816; b=EQ5JNc73qzeGSr1lfjBT94gZUokMlzfxihac35JARayo5bI2+7G0MWOfiHoKcIUw1t D4Mzn0yLQp0bLEgeKMBJyaN15tJHKEO95nXZDkwczvtQKdHXb1VbIc228rN2M17pgodJ 8d8oQ6pg+2PGtGXNwtuXJ54i+nQTl7v7dEZYzSLxaFURtkLRKFxe2xoGDMHakbOi/vZe jxx0V6Q0JGX2LX8boa6t3S/GWhYBNlc8s07cYMfpEmUotahFlL+UeJqA3o+RSkWKZ/32 Wn3ghsCGqWcQQS2xFcaukhgIo6Bb0WDLPBM4ObH4hhcCYzv8kHwMe83p5KqTqP81q8BV rdkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RblW5yTCxDRLJKGfYdaOTh+OR9JgnGGeaSPLNcKIiEI=; fh=tutAMg9N8A3i2oJMSFm+jg0IS8JudBlOJ2I8jnKxRbA=; b=O4N4B5eLCRWWRmdiBPk5VuU2yLtNQeiwtlT88yNtlPlyTUGViB06dVfdl9HnAMdmDc C2CmuMhmDPK41+aWShXFJSKrR1nFXwz1eawtro0VfUsHP1KwfCZU7GoE1WZ0EHxjxtqn o0ZiVRxxeAvEw0mD/DcpOAtYkckec1WMHEy4AOKP1yDNRA+4U/Qe2rdvpxHrlCwMecH+ Xi5GIH+2ISFw+Nv/xKWVqiXpnTsTQaIqh8r+pKK3LkLXD3dKTeylu81VoNwUoVYWxyCz rcZw/Dgv7Fz4WMOKHs685WzpUrQLmAkkoa3EYc7zylcA8Enk3ouG9el6Nk0lU0XEAhSi CmMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IFvyYqqs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b2-20020a0c9b02000000b006563c00dc87si5158386qve.342.2023.09.29.01.58.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:58:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IFvyYqqs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dg-0005F0-QZ; Fri, 29 Sep 2023 04:51:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DX-00055g-CK for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DC-0005cJ-Qd for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RblW5yTCxDRLJKGfYdaOTh+OR9JgnGGeaSPLNcKIiEI=; b=IFvyYqqszX13OwwLKTHRJiD5b5shUey++K2sQWRYT5orypy41WdE3yI8HEkFzNWKPVb8ao y2fBjW4bwwrSH8NyNCqG7UBGPHGTa0zocYF/9eTns8oez/aVZN0KO8wtmdSuIHnBjMnwCG guTdd2zkf7OHlbNisFgKgYSofaOtgDs= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-474-4mEqS7yhOa-bqshfaQiCSg-1; Fri, 29 Sep 2023 04:50:58 -0400 X-MC-Unique: 4mEqS7yhOa-bqshfaQiCSg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 03CE31C08974; Fri, 29 Sep 2023 08:50:58 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A0D614171B6; Fri, 29 Sep 2023 08:50:57 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 896F021E6884; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Akihiko Odaki , Eric Blake Subject: [PULL 20/56] net/eth: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:17 +0200 Message-ID: <20230929085053.2789105-21-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: net/eth.c:435:20: error: declaration shadows a local variable [-Werror,-Wshadow] size_t input_size = iov_size(pkt, pkt_frags); ^ net/eth.c:413:16: note: previous declaration is here size_t input_size = iov_size(pkt, pkt_frags); ^ Suggested-by: Akihiko Odaki Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-16-philmd@linaro.org> Reviewed-by: Eric Blake Reviewed-by: Akihiko Odaki Signed-off-by: Markus Armbruster --- net/eth.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/eth.c b/net/eth.c index 649e66bb1f..3f680cc033 100644 --- a/net/eth.c +++ b/net/eth.c @@ -432,8 +432,6 @@ _eth_get_rss_ex_src_addr(const struct iovec *pkt, int pkt_frags, } if (opthdr.type == IP6_OPT_HOME) { - size_t input_size = iov_size(pkt, pkt_frags); - if (input_size < opt_offset + sizeof(opthdr)) { return false; } From patchwork Fri Sep 29 08:50:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727614 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332961wrt; Fri, 29 Sep 2023 01:55:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFytHBR98GCM5R9z0GGv3yNiW21KZ1vD+GCHX6hc549aF8moNhFRL/f6wXvwNMQ5Hkbb79f X-Received: by 2002:a05:620a:2494:b0:76f:27af:2798 with SMTP id i20-20020a05620a249400b0076f27af2798mr4062342qkn.61.1695977752029; Fri, 29 Sep 2023 01:55:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977752; cv=none; d=google.com; s=arc-20160816; b=qWnlBabaUbB3jqQlzprr7R4nJBP4aCIptP7bIlUQUO6J5GdKaBc7eipIC8v9ZWB8Ja XixGDFf2l6kXCfZq4RhGrp1kreHhsuP7yP3NMXgcnlrxIcR47IxyyONy9oxE+93MQpYN UhaDd80QlE9792CRO9ftrSjxRXyzLnawJhkYOjhOYxz1j+XszIZfB3FNziBVKnPG83Tb JLtBnJsBCOrjn78x6nXG24C7Qa2bIHB0XDBJ9IA8OytjQ2AFGhA56OCmBHLzFrSh0vH8 AKtD9KsbdBuOIfMjQGK4iGtbUEPEojlfwcXB4gyfW8ahnuqChsS9WRJWVuiI+CTCOaNR wwvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cyEEDeIM4t46x5VE8Yy+9CWu9nyYvBCMyGW0Sl7OzfA=; fh=53IbrxGKf5DKzpPrbbbiz9m7MaADJVsQe9QuQdGLN0w=; b=lZdR4R3mmD1bSi8hdyAAp3llRZuQi5AaMIUxkXtocWpv9kmQH037lsqglL/bpOFCU7 NnfAmYeUdLsm5pNjhWBj65b8totW02Bo2J50g83+ft8yjjWudrjj/w8kKH+XNXgddw0Z ItDMt5Dj2+5Az3gvXqd/pwf9aGaWIBest2JwAeE8mrnGca7gCafEBSgc7gOn2qHGUnm/ QXYydsSJYYEkbkAIGhEE83Q7pEC3iLOPw6CuINeMcqlP3Nzr970RtrIniuKNvlR09Omo hr94BBYDCN10t+K6IleEe7qmLadPebcQixO25RL8+rXMrlPZY/Xi2NB1nuBNO5nOECPV HHTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NkL4Gb+H; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k25-20020a05620a07f900b0077053731daesi9593429qkk.261.2023.09.29.01.55.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:55:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NkL4Gb+H; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dm-0005Jb-PV; Fri, 29 Sep 2023 04:51:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9Dc-0005C8-S3 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DC-0005cN-U2 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cyEEDeIM4t46x5VE8Yy+9CWu9nyYvBCMyGW0Sl7OzfA=; b=NkL4Gb+HNf48faffJgbpJo2MboXWLCLcLZCqpdJ11yx2pUf7sJgrmLhMJxnkIfYykquikZ i4kNpS0GpWEadjHiOT6X0hzh0AO9qj6CqY/etrHZgOBzn46YwvWpawGN7Bksj03HQ35OFD fIeGqADm5QPHTY6BK1+MieBxxsMR4Hc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-63-a41chQclPAaxLWACUwuhyw-1; Fri, 29 Sep 2023 04:50:57 -0400 X-MC-Unique: a41chQclPAaxLWACUwuhyw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4B8F185A78E; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 81D362026D68; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8C3E121E6885; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P_=2E_Berrang=C3=A9?= Subject: [PULL 21/56] crypto/cipher-gnutls.c: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:18 +0200 Message-ID: <20230929085053.2789105-22-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: In file included from crypto/cipher.c:140: crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_encrypt’: crypto/cipher-gnutls.c.inc:116:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local] 116 | int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); | ^~~ crypto/cipher-gnutls.c.inc:94:9: note: shadowed declaration is here 94 | int err; | ^~~ --- crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_decrypt’: crypto/cipher-gnutls.c.inc:177:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local] 177 | int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); | ^~~ crypto/cipher-gnutls.c.inc:154:9: note: shadowed declaration is here 154 | int err; | ^~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-17-philmd@linaro.org> Reviewed-by: Daniel P. Berrangé Signed-off-by: Markus Armbruster --- crypto/cipher-gnutls.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/cipher-gnutls.c.inc b/crypto/cipher-gnutls.c.inc index 501e4e07a5..d3e231c13c 100644 --- a/crypto/cipher-gnutls.c.inc +++ b/crypto/cipher-gnutls.c.inc @@ -113,7 +113,7 @@ qcrypto_gnutls_cipher_encrypt(QCryptoCipher *cipher, while (len) { gnutls_cipher_hd_t handle; gnutls_datum_t gkey = { (unsigned char *)ctx->key, ctx->nkey }; - int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); + err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); if (err != 0) { error_setg(errp, "Cannot initialize cipher: %s", gnutls_strerror(err)); @@ -174,7 +174,7 @@ qcrypto_gnutls_cipher_decrypt(QCryptoCipher *cipher, while (len) { gnutls_cipher_hd_t handle; gnutls_datum_t gkey = { (unsigned char *)ctx->key, ctx->nkey }; - int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); + err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); if (err != 0) { error_setg(errp, "Cannot initialize cipher: %s", gnutls_strerror(err)); From patchwork Fri Sep 29 08:50:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727613 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332959wrt; Fri, 29 Sep 2023 01:55:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5JxYCX6r3hQ9nL182VlUatvctqhu6vA5vJSTMoSa+SK3VZRdyLpke6ehNPoZ9EzCfcElv X-Received: by 2002:a05:620a:3913:b0:774:179d:659a with SMTP id qr19-20020a05620a391300b00774179d659amr3701502qkn.34.1695977751346; Fri, 29 Sep 2023 01:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977751; cv=none; d=google.com; s=arc-20160816; b=lNMgl/q4vgX/0D37H5xUdWUinjZI8xkg4YqVr7CaYmfZykcUV4vHguYUnrPfB4/jBW GXLb28wlsqaU1puMfTw+Vap7d/HhBnznprH5i6rc4dC96rr/BKKVtepfSqnXD66pF2pB UqKTrYhTh4zPmWoh3ReMRKirJ4Mh6Cg4kTi5vDnvv5UQIK9WLFesJ4Kf3R9dbJG+4ScM mKsDXau7dZU6sq1asli6QOSfjg5LGeHpjrThjHV6Za43HXBFhYstOICTHFE708NA72ms A95mpgYgUS4Y3EPwLQrWVWrBk/5AvYAwYiqUBaQFSeK35cxQ/BuAXOe+gLg4FV5v8zAe y1XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5xtaxu9vx6HTcALqnXkzmf305ZuqxOnzTYiMi68kHS8=; fh=nERd176022K4vpnJvTmk0fDn57Eykgdsza7ZL0rhDn4=; b=gC6eIKVv2g8Aq2wRr14Q/4MenVDRjENCkJ2KBVQuS7DrtE4UWx96bRe8fCdJWur2Gv Jh4V4KAlvuF5PlY/qPB13IzrPr06V72I7NEJpa5DmNFWoRIhvQ8L/Tt8NAjhaml4qq9r 68E47x2zPS1fC6Vptym/kpK5V5+btVKyxxgU+jR6ULketNL2QKJ4WtgEcs0wc1+xySTB +9fxy5wZZap0+gbNw1wRF0CqfthBsO+G9s3zHw8zOnK2xp1kMKj6uIEzBkSWnrfQ94HL G/m1SKRTduEgBrnxjvKCNup2qUZc38YFRl4bumTlx/VQpZ/Jgu+GdOcS0pfnncgFdHH5 NT9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Fpd9ez7X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w10-20020a0cb54a000000b0065b174c561fsi4342058qvd.112.2023.09.29.01.55.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:55:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Fpd9ez7X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DZ-000589-2o; Fri, 29 Sep 2023 04:51:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DS-00050W-8m for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DB-0005ck-RV for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5xtaxu9vx6HTcALqnXkzmf305ZuqxOnzTYiMi68kHS8=; b=Fpd9ez7XFZF7MI+fgx7PGyYYwpGJVfel0jF52W51rEqb2eeL57iYxfKoptDEHVobe4ITXl 28PBRx1fHN1QFhb2ECmux+AHpvfhw38nQCOLxD5gbFpbA9K2C/tKMus5RfWag3a2d3KM1J Jsfaj8ZXcDC1tL+K3uiSJ480I3jiDDk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-472-jZoZGFg6M7-2PSuUR5K9-Q-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: jZoZGFg6M7-2PSuUR5K9-Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4DB885A5BE; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 827E340C6EC1; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8F02021E6886; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" Subject: [PULL 22/56] util/vhost-user-server: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:19 +0200 Message-ID: <20230929085053.2789105-23-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: util/vhost-user-server.c: In function ‘set_watch’: util/vhost-user-server.c:274:20: warning: declaration of ‘vu_fd_watch’ shadows a previous local [-Wshadow=compatible-local] 274 | VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1); | ^~~~~~~~~~~ util/vhost-user-server.c:271:16: note: shadowed declaration is here 271 | VuFdWatch *vu_fd_watch = find_vu_fd_watch(server, fd); | ^~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-18-philmd@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Markus Armbruster --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index b4b6bf30a2..5ccc6d24a0 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -278,7 +278,7 @@ set_watch(VuDev *vu_dev, int fd, int vu_evt, VuFdWatch *vu_fd_watch = find_vu_fd_watch(server, fd); if (!vu_fd_watch) { - VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1); + vu_fd_watch = g_new0(VuFdWatch, 1); QTAILQ_INSERT_TAIL(&server->vu_fd_watches, vu_fd_watch, next); From patchwork Fri Sep 29 08:50:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727615 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333038wrt; Fri, 29 Sep 2023 01:56:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHa+n6DZypnZQsvKKNSOF+7YWqZRTRBvVU+DQjAyz6eWImvF3u0pynyUgCGQgVgSs11YYx8 X-Received: by 2002:a05:620a:2913:b0:775:9032:45c4 with SMTP id m19-20020a05620a291300b00775903245c4mr1023306qkp.8.1695977767609; Fri, 29 Sep 2023 01:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977767; cv=none; d=google.com; s=arc-20160816; b=XShnjLINU8fe0hdKLurN6XfYngOSX/mMUt0nhwke8CLMCz8IPWIClkuE1tHxJVH8IS yp1qqk+A/ymwQSBl2SepXNq8cMMoH8xyE8evXP/NAWJOiQNGsUtrIyPYYs5qalHAdUTB wzW+RYGgwrI+IHadvk7l1sCAaAa8LTtXrcm0l4xUi3F9ZkPb5Emr/CtsHPk0Tn9v6L8J G9eW6D58ZxvENT2XS+68fas1V6YG9pMYa24AePe5tYYTUY490b/pHIarm0wf8dpEp+9m YPUh28rPLHUsnfHtcx/Ur7EIypEIm8bnor3tqztJRxpaD3XvqS95SzR1c/ObgevNokEU +j2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EzuqQcLXPkEwoJkgWGFTACoAmjwA24zZHh83aGo4fhg=; fh=vkIKEHcwKJya0eJ7ZEuSZlQ+z9UQVjOKAU0iaZuC/Ks=; b=MrI1fTfLwndq5GtbRJl317NWNxeNFxOF239PCdhriKHPLYnSq+70RcNzv9tHrVis8k dqG7tM2DTMv+4CdIM4hMzZMEE/0f6k3qj0oIPRiQc1u42rvQhH+G5ZsPaGzsY1ksOTez 2qCA9zZ5HMDndgbr19VebPBC9hj14JFSJ3yhpB+CpqAE2SEesutWk4HWKyjcdzkQ80+Q 1kv+G8A8xrGERR2U/hHcFBTfcA+FB1n0piix2SYMpmqNg2zhv+oPEFQIFiEfsMyrRs+p 9jh/emYw2jk4iW4kKiw1EGuHGslnxgT4dUJykvewQBjJlZeTJ1D2phLccwlla3fvhWwU d3OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OVuAXnWa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m1-20020a05620a290100b00773af69e5fesi3028648qkp.124.2023.09.29.01.56.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:56:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OVuAXnWa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dj-0005Gl-1r; Fri, 29 Sep 2023 04:51:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DQ-00050A-VQ for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:17 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DB-0005cg-Pm for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EzuqQcLXPkEwoJkgWGFTACoAmjwA24zZHh83aGo4fhg=; b=OVuAXnWaRL+awcw95w845dYhzOzbhuc/yTdUVKwnXqdHFrTRkjsJRiYlw0NFzO+R7VACRs mPy9px+rfB9SussUmJtYRodTieUdEK/tmsD7kE2JKrIkxXXDUo4y7VN/spGDs7nU5iHm5W TsPtEhhZa8No098qYOdaXWY89bTPnGE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-693-1RxhfZimOkSXlzdINSbOpg-1; Fri, 29 Sep 2023 04:50:57 -0400 X-MC-Unique: 1RxhfZimOkSXlzdINSbOpg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A8F6A185A79B; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 86C29C15BB8; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 91D6A21E6887; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 23/56] linux-user/strace: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:20 +0200 Message-ID: <20230929085053.2789105-24-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: linux-user/strace.c: In function ‘print_sockaddr’: linux-user/strace.c:370:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 370 | int i; | ^ linux-user/strace.c:361:9: note: shadowed declaration is here 361 | int i; | ^ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-20-philmd@linaro.org> Signed-off-by: Markus Armbruster --- linux-user/strace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index e0ab8046ec..cf26e55264 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -367,7 +367,6 @@ print_sockaddr(abi_ulong addr, abi_long addrlen, int last) switch (sa_family) { case AF_UNIX: { struct target_sockaddr_un *un = (struct target_sockaddr_un *)sa; - int i; qemu_log("{sun_family=AF_UNIX,sun_path=\""); for (i = 0; i < addrlen - offsetof(struct target_sockaddr_un, sun_path) && From patchwork Fri Sep 29 08:50:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727607 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332301wrt; Fri, 29 Sep 2023 01:53:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHVOiTZv7fOcoAkhjm0SAQxti7Y0rFdmTXOeRsMtgtXXISQDXD5mXbtUcBadQBFjs97Y1GN X-Received: by 2002:ad4:551b:0:b0:658:5e3e:d4ea with SMTP id pz27-20020ad4551b000000b006585e3ed4eamr3568092qvb.14.1695977612205; Fri, 29 Sep 2023 01:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977612; cv=none; d=google.com; s=arc-20160816; b=Ies4Yirm9vo69J97foUUqP56I35k/8+Je9AxIdIbrDzRFNAo/cbrXVWvU2abuf3AJ8 s3gmAgzOz7c4ysXuG/uiWVnZPrFLa/kbQ3WhPWxGm5AFflDfjNzXIHNKYMbSM27pQv5r iNT/+e/Jk3woPHAsP9MbpxRSiTAlqwcyEhYsDxbLs3UPZkOJWXeVAqPzT73lQTyOyny4 nioUlH3HG0HRjJFppfDMf7f+Wb6/cL0zAOXOT1m9ex3NUpcOUqm6nvYRuT94jZ8VANQ1 S7JTGHdAmBfvdKOPt0UQZ88jkVk6DQ9LC5FKKp4LyRI3plXJg1ZbVa0pb7wAPlxJFS3+ Jwng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dGZdvVBakkMPiy5r9uddsx0SOw4gUpw7qzyBErOGYps=; fh=vkIKEHcwKJya0eJ7ZEuSZlQ+z9UQVjOKAU0iaZuC/Ks=; b=ZkwZObETQqvNQCfc/sQQ42gH3875X7CUV6khyh063LcP4GVftyMvDMc0RyLf8GekN6 CP/dQ87qUax5Z1jYuDSVYbhdq4vSr0se1+lzVpL+aqSlbYUgauVYJy1OvX65BM6kBoPj PaxBc/LsUWo9Pe/VQe+q0aD89VDlTBEH1sIZkOHFyUsT2acfQsnjcxva+HfGigI8+g9A bl+y21TwguA1PbtDBebiY0lzUVucPJwbLchquU3VwevXTyutWrQY8B584tHotn5dNwIA MfhDmhi5xQVnWBGKK7pQ5DuWqRpTZ1Trl0t1iL2QZG1oQa3jqVIDbFjazTlv9tcjTsEm sfVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hhRLaGld; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l13-20020a05620a28cd00b00773cae5aec9si9957945qkp.159.2023.09.29.01.53.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:53:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hhRLaGld; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dk-0005Il-P8; Fri, 29 Sep 2023 04:51:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9Db-0005Be-Np for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DB-0005cd-NH for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dGZdvVBakkMPiy5r9uddsx0SOw4gUpw7qzyBErOGYps=; b=hhRLaGldmF4+TLQuXI9fh9BQsxy5WInhvof1Wi8FigXYS1pzJ4Nt3DbgXXPtwvrfC+DY1o /ko4Dj5dhaW96aaw5KEwBia4S6F43pQpHEYSTBxvt5nF3/NAtUgrVEqmYfiGU23I0cjprA WY5vAZY1QhOpsWZJtk0E7mHkAQozrog= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-FN3ZuuFPMVCZMa1O0EfefA-1; Fri, 29 Sep 2023 04:50:57 -0400 X-MC-Unique: FN3ZuuFPMVCZMa1O0EfefA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AABCB1C05149; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88C8A40C2064; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 949B321E6888; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 24/56] sysemu/device_tree: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:21 +0200 Message-ID: <20230929085053.2789105-25-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: hw/mips/boston.c:472:5: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_fdt_setprop_cells(fdt, name, "reg", reg_base, reg_size); ^ include/sysemu/device_tree.h:129:13: note: expanded from macro 'qemu_fdt_setprop_cells' int i; ^ hw/mips/boston.c:461:9: note: previous declaration is here int i; ^ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-21-philmd@linaro.org> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- include/sysemu/device_tree.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/sysemu/device_tree.h b/include/sysemu/device_tree.h index ca5339beae..8eab395934 100644 --- a/include/sysemu/device_tree.h +++ b/include/sysemu/device_tree.h @@ -126,10 +126,8 @@ int qemu_fdt_add_path(void *fdt, const char *path); #define qemu_fdt_setprop_cells(fdt, node_path, property, ...) \ do { \ uint32_t qdt_tmp[] = { __VA_ARGS__ }; \ - int i; \ - \ - for (i = 0; i < ARRAY_SIZE(qdt_tmp); i++) { \ - qdt_tmp[i] = cpu_to_be32(qdt_tmp[i]); \ + for (unsigned i_ = 0; i_ < ARRAY_SIZE(qdt_tmp); i_++) { \ + qdt_tmp[i_] = cpu_to_be32(qdt_tmp[i_]); \ } \ qemu_fdt_setprop(fdt, node_path, property, qdt_tmp, \ sizeof(qdt_tmp)); \ From patchwork Fri Sep 29 08:50:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727606 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332252wrt; Fri, 29 Sep 2023 01:53:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9zqLPoiyWVqKSHXtOmRJCHYNowvZqbCzZqGfhzJ/RoeVGLvz0eQG3n8IsPLrrOejPjH1K X-Received: by 2002:a05:620a:4316:b0:76c:ba61:f8b with SMTP id u22-20020a05620a431600b0076cba610f8bmr3962600qko.23.1695977602574; Fri, 29 Sep 2023 01:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977602; cv=none; d=google.com; s=arc-20160816; b=lBMWXv2XB3fVCnLKg3npE/38wxOxoVMAKehAgri742W6YvKwaKxZrJlNLN7Z6ZgPqa TTfg3vMQBNgVunlwNLQ8MFb0K0d7EixlxqYGaWHCBb3SrPm/HGViJ8iblI0Psb7WEkSK Dv7MqZk/M22yzJwl5pB+SgiAYt6lF0tCVUhOOnTzHNYn/wpfkdOr2ez6T1iNt8bWKCZ+ TuRXq3tf8x7yBpe+7Zgj6ITUDpdD2jfQoIXdy7BV9jrFYKP2ohmlXkizsr2n6bMPyRWZ WDASdlq62YLTfaAsQJVq4xkR/GQ4P0EBFCFoP5vM2j83tozBh2g98h/oaT5G2An5+itu ro+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b/5nebuArM3BUaPbXl0XGZrfg9ZeOX0VBSaMHR6v93I=; fh=wFbHg8zksF24Et4Bhh4D1nm102BHwR8vAPs9hR7EQAY=; b=Yr/HbJxkYushDcdTn7dnwFPv7RRUS/QmsbtZBx6osDS/GOPapNLc7O5f7XM1fQwmKY qAG9X0frxKYfaTcfDlcPhghD4wpXbFfMJ5UOtL/nxLhjDizpW2p+s7dXake3kbXP0w/Q vJE3rRljYGzAdIYg0by20YZAFqwz7+6kdo4f/AOXVBsKxuce6cH4yFNAfha7lvk1rIwV hDsYM7Ke/ZnGO6cFed9oY6bK7Emhp1Pwmfzp26IoQf3fdjC97BCuBtZU4P1zcHX1Tli6 1qZmLKz/1YQkh6QGs1q/sEeoqWXOwXoIzruLATSrI/nrSCsLy4dweQbPr6UMU+vG/4YI 6ASg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q5lGTLwB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dt20-20020a05620a479400b00774383c131dsi1013004qkb.121.2023.09.29.01.53.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:53:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Q5lGTLwB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dj-0005Gs-8X; Fri, 29 Sep 2023 04:51:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DT-00050j-2o for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DC-0005cW-HH for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b/5nebuArM3BUaPbXl0XGZrfg9ZeOX0VBSaMHR6v93I=; b=Q5lGTLwBM9DOl/UWHyUnniZeuKWQxc13AJYgC7qHPwBjbocoMq5rHeuFWdo4WA0RUOTANN D5svc/2vqUwlv5IbpMhHrfGJ+RkBd6hoqHWVfuAtrJ4w4U5Lo/j7y4dW4rYplYaUn5cEgQ FqxqU0tjqprj1/eSHuX/x05xQZajMi0= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-472-qDLvY7ZKNgGkFcMdGCMX_A-1; Fri, 29 Sep 2023 04:50:57 -0400 X-MC-Unique: qDLvY7ZKNgGkFcMdGCMX_A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B55A53806739; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93A6740C2070; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9767A21E688A; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Xu Subject: [PULL 25/56] softmmu/memory: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:22 +0200 Message-ID: <20230929085053.2789105-26-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: softmmu/memory.c: In function ‘mtree_print_mr’: softmmu/memory.c:3236:27: warning: declaration of ‘ml’ shadows a previous local [-Wshadow=compatible-local] 3236 | MemoryRegionList *ml; | ^~ softmmu/memory.c:3213:32: note: shadowed declaration is here 3213 | MemoryRegionList *new_ml, *ml, *next_ml; | ^~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-22-philmd@linaro.org> Reviewed-by: Peter Xu Signed-off-by: Markus Armbruster --- softmmu/memory.c | 1 - 1 file changed, 1 deletion(-) diff --git a/softmmu/memory.c b/softmmu/memory.c index c0383a163d..234bd7b116 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -3245,7 +3245,6 @@ static void mtree_print_mr(const MemoryRegion *mr, unsigned int level, } if (mr->alias) { - MemoryRegionList *ml; bool found = false; /* check if the alias is already in the queue */ From patchwork Fri Sep 29 08:50:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727617 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333217wrt; Fri, 29 Sep 2023 01:56:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFgU9W3bgaQ544HL0neiwgAc1Ydn73SEHaZY2+OW+zfO7naG/Vd4Zjkahgm7CroMQjc/Na X-Received: by 2002:ac8:7f0f:0:b0:417:a469:1680 with SMTP id f15-20020ac87f0f000000b00417a4691680mr3725551qtk.38.1695977805792; Fri, 29 Sep 2023 01:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977805; cv=none; d=google.com; s=arc-20160816; b=ox4244X5RKz88x12SJvc1sMuKHZlRt//dBpqOSZhX3EefpawOTE+KlU+9URtPl2pu0 lLXFB9a12XqlP9uVADvjzcE83dHKqDAdo/C45YHF+vkRKd53/4z2giU+/HmcXijWBdMX Vlbz0Zd9FcT0LtnicSsq9Hjwr+Gb1nrHpUV8ipGc/ZIW9VgcuEuzVT4p+iCYl83WTwHw JBMZaorxrRmi0YlMh6kKZqPFAySIJIVW/KQ5q0jbdisUNiuQFnvu0hy6iQHuhL66x0lF O9YE8zUNgWuiwsb5cjVx8UE7vYH++VkzAVNkFiae9PwpUoltcVss3fEigdT4p2buj36g 6DMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7UV48sbdVMGeVoWJq1kENky0JQ2CPBfQXeo/C7cSXh8=; fh=5iGHHmEytlxi795Jw182k0/nUrkiSXWvul28mVK7agk=; b=GmmaYV18OQOPnrRaulZarvPDCVS9s5R87p6OnY6IJ26jtUxAH4SXNwCR5d3f1CpaXf QMEC/6XCLW1qm0QUw9pHXLmIaHEizNa+kQHY8+BixmxmXcbQKu97O/LEJil6w/D9AuoI fMu/cFV2A4oC48fwBOOFZt/xbm4Zbcvty5zSJGm255Xlad1kTbzo85ZIdLxx2foFEl9Y yNHyYZC4j8XXxdDdkieF5xksTt+/qKgzdKN7JYeXfsP59/5+TwPR0r93IypjF9rqhuAy ipZ/I4B5Tg6emrMZF16ZAssRfgIT9dFOzadOXfr6T6BVUAMygiC4Z+t1EVzfVaa3505q 9OhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XY3aWqCY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m17-20020a05622a055100b00417d9251452si5403597qtx.770.2023.09.29.01.56.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:56:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XY3aWqCY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dl-0005J2-Bq; Fri, 29 Sep 2023 04:51:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9Dc-0005Bp-FF for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DE-0005cP-T2 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7UV48sbdVMGeVoWJq1kENky0JQ2CPBfQXeo/C7cSXh8=; b=XY3aWqCY+N71Qt32+G/w+aL7ldDcN60kahxEYPGj4fxsqxaf/Sn5Tt0Nosamdyi8olRWyq vJcakSBmCMz0hBVxdwxXuRjqO7iPXRAdaQFW88l80TBjt0fW6nTAJca3j0MnjT9HoiSwdV VKAbH5znI87tFInOmz+V5NEvqtAoqbY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-310-ciDaImPKPEi6iFP2pYk-5Q-1; Fri, 29 Sep 2023 04:50:57 -0400 X-MC-Unique: ciDaImPKPEi6iFP2pYk-5Q-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B66C4811E86; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93827492B16; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9A4F021E688B; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P_=2E_Berrang=C3=A9?= , Peter Xu Subject: [PULL 26/56] softmmu/physmem: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:23 +0200 Message-ID: <20230929085053.2789105-27-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: softmmu/physmem.c: In function ‘cpu_physical_memory_snapshot_and_clear_dirty’: softmmu/physmem.c:916:27: warning: declaration of ‘offset’ shadows a parameter [-Wshadow=compatible-local] 916 | unsigned long offset = page % DIRTY_MEMORY_BLOCK_SIZE; | ^~~~~~ softmmu/physmem.c:892:31: note: shadowed declaration is here 892 | (MemoryRegion *mr, hwaddr offset, hwaddr length, unsigned client) | ~~~~~~~^~~~~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904161235.84651-23-philmd@linaro.org> Reviewed-by: Daniel P. Berrangé Reviewed-by: Peter Xu Signed-off-by: Markus Armbruster --- softmmu/physmem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 4f6ca653b3..309653c722 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -913,16 +913,16 @@ DirtyBitmapSnapshot *cpu_physical_memory_snapshot_and_clear_dirty while (page < end) { unsigned long idx = page / DIRTY_MEMORY_BLOCK_SIZE; - unsigned long offset = page % DIRTY_MEMORY_BLOCK_SIZE; + unsigned long ofs = page % DIRTY_MEMORY_BLOCK_SIZE; unsigned long num = MIN(end - page, - DIRTY_MEMORY_BLOCK_SIZE - offset); + DIRTY_MEMORY_BLOCK_SIZE - ofs); - assert(QEMU_IS_ALIGNED(offset, (1 << BITS_PER_LEVEL))); + assert(QEMU_IS_ALIGNED(ofs, (1 << BITS_PER_LEVEL))); assert(QEMU_IS_ALIGNED(num, (1 << BITS_PER_LEVEL))); - offset >>= BITS_PER_LEVEL; + ofs >>= BITS_PER_LEVEL; bitmap_copy_and_clear_atomic(snap->dirty + dest, - blocks->blocks[idx] + offset, + blocks->blocks[idx] + ofs, num); page += num; dest += num >> BITS_PER_LEVEL; From patchwork Fri Sep 29 08:50:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727618 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333341wrt; Fri, 29 Sep 2023 01:57:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHr5L/koplXt+Bpb3SDb9wrGhDPvDCJO7HK7aAag3Uo7JN/SI++lNxqEi+SLtYXHZ/OZFya X-Received: by 2002:ac8:5d4a:0:b0:419:573c:59a4 with SMTP id g10-20020ac85d4a000000b00419573c59a4mr4641064qtx.20.1695977831133; Fri, 29 Sep 2023 01:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977831; cv=none; d=google.com; s=arc-20160816; b=s74S7ogYqeA2EDZTShCM3T8yfJYCf81+E8JNa0QHzq4sWwtIjaQCOxyBlVeyrccggx AmYHZrUinq4O1xhBdgPZQ++KNqtr0A8SCwgFI1cR6Ubragx1Ce6VQAWWih30r1mV0Jyb jh+azjlWcs1MpW7EvrW9km37E4wNJromkGv7WtHJfOhl8MDj5Dw7VRznoaNKndlTITxP 4KYj7Of4fOVwq90DppPnDo+8pk/waBJ5eu3pOgAES7jCfoUjG1PliGV3PKWWh3F/I+T7 Yl8M3vVSXzk5BOMEM3clVZLs6WZ+lS2LH+vWP0m120OlqKXBNgnkpiaqStPvmSkWY6r2 fgnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CSABX0JFS8xFvjd/2VSsYO0xxGojyvt0PA02T7ZW/Gg=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=L/1YNw/qjBIopvSmrl5gVTy502RmL0osr+sBiLJ3nzVB8iCRmgHGyt1sv+AlejafcO DmR0Z/sTMe2ZAtNYhByBT77c5DKxfBxaGUNi1hhFI9dbKioLzaabnXHyvFCsl86iLLus yl1PZ3cXtOPZIlNJRJBM7vgn+KUTqhgVXEd7d/gq58GU+9qnlNxjHORns/rKQacOXSJ2 nGm7tMqlZGcOh860rN059brPtvmejlMkyKjOhWaABtYgUcYTRDA2xYRw/R3ZmnTgxPHZ aTQOJxLdw+dgarv3xcOiXwXJnJ4beJ//pRRemFaCxDhNXmxjrCqpDSkXGR7CdMOYX/Dl WuUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OAx2jZkD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l7-20020a05622a174700b00419628da44csi1835874qtk.526.2023.09.29.01.57.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:57:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OAx2jZkD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dm-0005JA-Br; Fri, 29 Sep 2023 04:51:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9Df-0005Ch-Qe for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DE-0005cb-UQ for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CSABX0JFS8xFvjd/2VSsYO0xxGojyvt0PA02T7ZW/Gg=; b=OAx2jZkDOBq9pc+GAFLZ6z4QQUSTOMCBxgB8S0aEobaFn5bv2mCZrv/8sVanrJHiWTYtqT 1ZczHRqMzV5b7GMdxL/W9TZn2DUvsXjilf5G7yujTsUTzTAV0FO5Hxsn8GBDwfj45Zgpmt neDWX9YMVlId3oRztvLWPQnx3JzdD/Q= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-63-EtKEYv2QMoaPvMUko5NqmQ-1; Fri, 29 Sep 2023 04:50:57 -0400 X-MC-Unique: EtKEYv2QMoaPvMUko5NqmQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B86718007A4; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 95B232026D4B; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9D0AA21E688D; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 27/56] hw/core/machine: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:24 +0200 Message-ID: <20230929085053.2789105-28-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: hw/core/machine.c: In function ‘machine_initfn’: hw/core/machine.c:1081:17: warning: declaration of ‘obj’ shadows a parameter [-Wshadow=compatible-local] 1081 | Object *obj = OBJECT(ms); | ^~~ hw/core/machine.c:1065:36: note: shadowed declaration is here 1065 | static void machine_initfn(Object *obj) | ~~~~~~~~^~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904162824.85385-2-philmd@linaro.org> Reviewed-by: Peter Maydell Signed-off-by: Markus Armbruster --- hw/core/machine.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index cb38b8cf4c..a232ae0bcd 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -1082,8 +1082,6 @@ static void machine_initfn(Object *obj) ms->maxram_size = mc->default_ram_size; if (mc->nvdimm_supported) { - Object *obj = OBJECT(ms); - ms->nvdimms_state = g_new0(NVDIMMState, 1); object_property_add_bool(obj, "nvdimm", machine_get_nvdimm, machine_set_nvdimm); From patchwork Fri Sep 29 08:50:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727610 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332468wrt; Fri, 29 Sep 2023 01:54:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnYVcLUr/la4JCcQukr2VBuQYZhwa+BFaCCxt3DunegPP/zDg+nMPhnyotpl3twUnWQixO X-Received: by 2002:a05:6214:588b:b0:65b:17b9:25e8 with SMTP id md11-20020a056214588b00b0065b17b925e8mr3768991qvb.5.1695977641138; Fri, 29 Sep 2023 01:54:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977641; cv=none; d=google.com; s=arc-20160816; b=Bk+PmaA+iDdcKYBFHgW+tlo5getbhfS98pPbOyt+B11p1Cy0PLRRxt4a0Xtsu/S/9z /n6/BrEeuxjotJrvxvMpGtLzJgphmmfP4eEX8gvi2sLK96WjqPWOFTatpxU6kIloq3W3 dcS/zC8C8Q4pTsOzvZ97fJF1W85dXWzUBBTVCUo3UdGHxUFcb8dNYz1AhNc4yusoCPkT J2CNnqfKilrpOkmXXfUyTQwajx0+LbzEoQFoIozOxl+1zGpLNNKk/z414H48Y9zia471 akQH0Ogg7zBssFbS7GRvMu153z8PewxR+UXGLhuLKJDY83eNAw4zfUgaKsWFuaBVRxMQ J1VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PfRZm1Tr+msFGXcXQgGvHu4UGdfHaMt0ZevvgeflFQQ=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=hBRpdwHtXdsnw6XgIWS9uTbcH/jgKyzpXbmDDg1/zKPE2AUvsJ1axu9lPpuiNy/WX2 jOAp2GCYEmvJca8sZPvpgAg0vPMDBXdypYt4NuHeyqIpRY/O/FfCCEpKCufUH9wijdZU 7iSinZ4R2hrXvGdFEPS2mHm7wlaL+Z4D2ZRlJ/4RHVu48TZIhapu1uBoU6uS06LXi3l5 9vH04tMUqb7cUIz4yctciy7ntF/HqIKySz+IZDPI3qwJKvE4iogmuhvyKGTf75ssX61n MczXc2cLEP1C8Sf9wQhiAQTc+FW7KUSpiuhglMbGJK9ia07tcDyR2ygI+qyHt/d1FY80 gkeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ajny/UbT"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k28-20020a0cb25c000000b0063d456fcd44si9523518qve.515.2023.09.29.01.54.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:54:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ajny/UbT"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DQ-0004zt-B4; Fri, 29 Sep 2023 04:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DH-0004wc-Qk for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9D9-0005bP-Vz for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PfRZm1Tr+msFGXcXQgGvHu4UGdfHaMt0ZevvgeflFQQ=; b=Ajny/UbTfumUbizb8Qd1l3ALuYaNhKRY/L2ZZIgIbBt1tjpkPU7LFLJE2T7OrVNnAnw9gP Qq8mwlaIW3yx8BRTfHjdChAGEX90eXpk0DldeyOiL1FVvg4JY7ueQLn/Lnki1p44Kl7gwl Mc/Cpk46H6cA+MGFdGf7RdG+bdBWq6w= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-534-RMuwZ1bQPsqn7-JME4WGhA-1; Fri, 29 Sep 2023 04:50:57 -0400 X-MC-Unique: RMuwZ1bQPsqn7-JME4WGhA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3673802D35; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B155C14171CB; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9FE7521E6890; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 28/56] hw/intc/openpic: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:25 +0200 Message-ID: <20230929085053.2789105-29-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Fix: hw/intc/openpic.c: In function ‘openpic_gbl_write’: hw/intc/openpic.c:614:17: warning: declaration of ‘idx’ shadows a previous local [-Wshadow=compatible-local] 614 | int idx; | ^~~ hw/intc/openpic.c:568:9: note: shadowed declaration is here 568 | int idx; | ^~~ Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20230904162824.85385-3-philmd@linaro.org> Reviewed-by: Peter Maydell Signed-off-by: Markus Armbruster --- hw/intc/openpic.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index c757adbe53..a6f91d4bcd 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -610,11 +610,8 @@ static void openpic_gbl_write(void *opaque, hwaddr addr, uint64_t val, case 0x10B0: case 0x10C0: case 0x10D0: - { - int idx; - idx = (addr - 0x10A0) >> 4; - write_IRQreg_ivpr(opp, opp->irq_ipi0 + idx, val); - } + idx = (addr - 0x10A0) >> 4; + write_IRQreg_ivpr(opp, opp->irq_ipi0 + idx, val); break; case 0x10E0: /* SPVE */ opp->spve = val & opp->vector_mask; From patchwork Fri Sep 29 08:50:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727605 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332151wrt; Fri, 29 Sep 2023 01:52:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE2B7QPIIjhIAp2+H4pcyLJBz34y6dbP+CrujL++CpvFGD4omRFd979UuJAINUydpop3Jy3 X-Received: by 2002:ac8:5f8f:0:b0:418:b66:c1bf with SMTP id j15-20020ac85f8f000000b004180b66c1bfmr4140151qta.46.1695977579689; Fri, 29 Sep 2023 01:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977579; cv=none; d=google.com; s=arc-20160816; b=vwmGI6EcSmajaIW3agNyZMNCYnDImq7KYwHzSqvbLiQrcPHSqsRlPYaQNQv2MzLi0C t8L8bz2wgc0OYY1ajLW+Ilz9xTUNsGMjWP3JqeKAnVjGb37ZRpOfsGGQy8MHbZEL4L8t Wc7L0gBkpzYxBu0mAkLWg9aHLtP8cntSlt2cBxNLO33LFyYmuY/hWXP1m0PRDu3DgH6s ZFbu+Moo+CYWSxFEvd+53W73wBIY+IC/H/Qo2quq6vVxJmR5Sh838VGzw76W1ZmixQve +IXz4E4UsMn8ancMYIGCzTMDk8Hj9cmtS4uxWyqoES4CTxlm7xgQL5zT4ncvsJ422Dt6 FJoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rHWFkm0Owm+0KO8bC4d1hG2we6McKOc9L+rx16nbk2Q=; fh=u1kk6oY/jZAcw2lMgy0QQr17FnLowJaaL+GvRwVd/XA=; b=oCarTNnklk+Lnp3pBdytg/o2Ki89yKQxJ0qVGxJ0QnQP31eLUwOzn/2FZhHDPs7GUn BgO+GK6yau9q6078vblmEarrywkIrkkVULD2mqBpMOWQqW3Pu+IYte9GjXGDVA4vV3W1 GfJN6s7lWLEDmwbOAMqshBCFMS/Bp/Rm+48/0hoxK6m6IIA81JXe+qytbgsIolUMewhc wUQ2+L2PfuEBSHVfmo0pj7ysYRGbV6u6dy6SKmfVNL7vW3Yf8NbPB7L/MMDjRcYV2hAd BsCkCLkk1Y6XStrrl4eMNWV1KzTDiP5iHZ6frpvnJzAAX0CM0IZUI6445PEw0Sa4P8az dFSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Rud8lAI7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q14-20020a05622a04ce00b00417f34c1f6bsi5157716qtx.576.2023.09.29.01.52.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:52:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Rud8lAI7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9De-0005Cg-L7; Fri, 29 Sep 2023 04:51:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DW-00052W-4r for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DC-0005dJ-N0 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rHWFkm0Owm+0KO8bC4d1hG2we6McKOc9L+rx16nbk2Q=; b=Rud8lAI7BtPcmbiQGC3XhEOPw2OeYXJ3DJlO7aCNBBI71IUAALBa5pH77SI38NT37LwGYu qgBFUtZ0Kt4omySqaQwx9112SYLzxl7LYWwytYih8gba1Ffv547CA0E7rToqz2mmWeiWaQ 6ZsA8HzT1DozSrrfl3xZDvXNMLfi+9A= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-39KKLhHvN0SlLEPlHM0Oyg-1; Fri, 29 Sep 2023 04:50:58 -0400 X-MC-Unique: 39KKLhHvN0SlLEPlHM0Oyg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A3B983C025BC; Fri, 29 Sep 2023 08:50:57 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 814E19A; Fri, 29 Sep 2023 08:50:57 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C5E3121E689C; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Auger Subject: [PULL 39/56] hw/intc/arm_gicv3_its: Avoid shadowing variable in do_process_its_cmd() Date: Fri, 29 Sep 2023 10:50:36 +0200 Message-ID: <20230929085053.2789105-40-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell Avoid shadowing a local variable in do_process_its_cmd(): ../../hw/intc/arm_gicv3_its.c:548:17: warning: declaration of ‘ite’ shadows a previous local [-Wshadow=compatible-local] 548 | ITEntry ite = {}; | ^~~ ../../hw/intc/arm_gicv3_its.c:518:13: note: shadowed declaration is here 518 | ITEntry ite; | ^~~ Signed-off-by: Peter Maydell Message-ID: <20230922152944.3583438-2-peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Signed-off-by: Markus Armbruster --- hw/intc/arm_gicv3_its.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/intc/arm_gicv3_its.c b/hw/intc/arm_gicv3_its.c index 5f552b4d37..52e9aca9c6 100644 --- a/hw/intc/arm_gicv3_its.c +++ b/hw/intc/arm_gicv3_its.c @@ -545,10 +545,10 @@ static ItsCmdResult do_process_its_cmd(GICv3ITSState *s, uint32_t devid, } if (cmdres == CMD_CONTINUE_OK && cmd == DISCARD) { - ITEntry ite = {}; + ITEntry i = {}; /* remove mapping from interrupt translation table */ - ite.valid = false; - return update_ite(s, eventid, &dte, &ite) ? CMD_CONTINUE_OK : CMD_STALL; + i.valid = false; + return update_ite(s, eventid, &dte, &i) ? CMD_CONTINUE_OK : CMD_STALL; } return CMD_CONTINUE_OK; } From patchwork Fri Sep 29 08:50:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727624 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp334646wrt; Fri, 29 Sep 2023 02:01:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwvv2eG/NOKMeXtMYk5n3Dfwcf+urFxDdBqoJNNHBXuxN/RTUQRn2hynTBDmVJGDU8ZZYH X-Received: by 2002:a05:620a:4489:b0:775:7f6e:1920 with SMTP id x9-20020a05620a448900b007757f6e1920mr3487517qkp.17.1695978073020; Fri, 29 Sep 2023 02:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695978073; cv=none; d=google.com; s=arc-20160816; b=wxr9g2wQELh1tE9sS3K5Celux9LQYL/sHXaMJjH+PHnV2luxd8R6i07QtdqXrG8lZw YTyHHg43tk/GeUFqDN6TjfWAcO10sOsb74ygFigPo8b0onfIIlRQ3iaXjoro/GuQ2ciS KJFfqIWaEDOyFvvLdOiG//1HoZMNGePNpwY8j3YW9EV9yXiQJG93pqAYxovWrDxtn6ex c5KQ7d0mUCVMOFgDHA2sRSAMOI2pFk7zOAhnxln6utnKRdv0vWw5rjI1S0pGhEI3WgI1 9cFMcXiKTlW0JlZ0OYgbxhnH1L7qQqVxH+UcLGWIuyX1WcbQzX3W5KfT9hQXK4idSjt5 pnkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=T4GjYDCb7xOJWXlG+vnKWW+7by992abrtrTUH3d+Z1Q=; fh=u1kk6oY/jZAcw2lMgy0QQr17FnLowJaaL+GvRwVd/XA=; b=W+fab6zYEtMUc1tmL6agKlUkq7UdPb7FZ2fhwUji7YSz1fQ651Hj/FmwdB78W/cQKo fqWLowmhQNqXy2a+nZxfE0eNsw7RnTlvsvQIYhe7mI4o91YURd/J47tSI1riCkj8lZ+2 GC22hkpWiipyqvlnei8HQma4IYaViLQcx3BBCWPCMahzxowA/LlXPjqbE2ZXcjgAjRv4 bfTE/HJMLOvUlgF1plmkh1WLDDK+gwVKfy5Auh4QLPwbacY+uEk24lKidRg/ka7RO3/0 gHbNuprpFmyrbqJWn7QWB3MqfFkTlD7o6ttLp3g+z+CFfqkZaYbDBXSCAtwsxpOcbxO9 FTTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QddJfZ4E; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v2-20020a05620a0f0200b007706b14735dsi9813760qkl.643.2023.09.29.02.01.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 02:01:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QddJfZ4E; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Mi-0001qS-3Y; Fri, 29 Sep 2023 05:00:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9Mb-0001mc-E5 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 05:00:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9MN-0008Bb-Nw for qemu-devel@nongnu.org; Fri, 29 Sep 2023 05:00:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695978029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T4GjYDCb7xOJWXlG+vnKWW+7by992abrtrTUH3d+Z1Q=; b=QddJfZ4E/5BOSZMNk/ssMI56TmfYgUkZ2UR4kmIe7mUMGc3bC49pAnpnw7nMcpDOX6tgB5 iKSpWurjg8sGtCklq5DKas3VjUu7KaVZjCqyw3VusCBTqae6PSr1en8jgC/aZhiAa5g/nP LiGsieMQnDoV1LVg6xvSSd+Qz9wI/Ws= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-539-cI-9u3zxNNyyh6XhV0cGvw-1; Fri, 29 Sep 2023 05:00:27 -0400 X-MC-Unique: cI-9u3zxNNyyh6XhV0cGvw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6F9D5802D38; Fri, 29 Sep 2023 09:00:27 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4C901176E4; Fri, 29 Sep 2023 09:00:27 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C8BE621E689D; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Auger Subject: [PULL 40/56] hw/misc/arm_sysctl.c: Avoid shadowing local variable Date: Fri, 29 Sep 2023 10:50:37 +0200 Message-ID: <20230929085053.2789105-41-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell Avoid shadowing a local variable in arm_sysctl_write(): ../../hw/misc/arm_sysctl.c: In function ‘arm_sysctl_write’: ../../hw/misc/arm_sysctl.c:537:26: warning: declaration of ‘val’ shadows a parameter [-Wshadow=local] 537 | uint32_t val; | ^~~ ../../hw/misc/arm_sysctl.c:388:39: note: shadowed declaration is here 388 | uint64_t val, unsigned size) | ~~~~~~~~~^~~ Signed-off-by: Peter Maydell Message-ID: <20230922152944.3583438-3-peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Signed-off-by: Markus Armbruster --- hw/misc/arm_sysctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c index 42d4693854..3e4f4b0524 100644 --- a/hw/misc/arm_sysctl.c +++ b/hw/misc/arm_sysctl.c @@ -534,12 +534,12 @@ static void arm_sysctl_write(void *opaque, hwaddr offset, s->sys_cfgstat |= 2; /* error */ } } else { - uint32_t val; + uint32_t data; if (!vexpress_cfgctrl_read(s, dcc, function, site, position, - device, &val)) { + device, &data)) { s->sys_cfgstat |= 2; /* error */ } else { - s->sys_cfgdata = val; + s->sys_cfgdata = data; } } } From patchwork Fri Sep 29 08:50:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727619 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333400wrt; Fri, 29 Sep 2023 01:57:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECBD5E+jAIXoGTVQD+TZ5tYtPEBbai4nUtlYYZaq6wMcmWZl0WIP0x9Dmmi9dyLRaFnccy X-Received: by 2002:a05:620a:136a:b0:775:7530:cbf8 with SMTP id d10-20020a05620a136a00b007757530cbf8mr3492829qkl.39.1695977843746; Fri, 29 Sep 2023 01:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977843; cv=none; d=google.com; s=arc-20160816; b=yxG70+4WPuB9lZ8oq308TMlkfoA4yomEsZQgENSLkQ8vm3DETvS7HjT0tPTAfq5edV maeh811lCXiC0LtO5v5nm0AGw60YVuMj1csTqqV5+U3X5c4HDQp0VsjQ4LGblu4Xz5Ys GAKljkEyRLviL79sU+IlQDB63QDaIZ2TYZYOOuKLEZd5ggVhQdo0ewMLl2ek/a8bYgw2 9gOQ2qPTqvO7y9zMWzevd9Q112gMQVUxJSWcIqq0S9LpJX1OrxQq/QSvkzMclGP2uGO4 WAYBPCth1eI40IDWn/qBohoqER80iDsTFuZe3+YTsrGR0v49+o60I/3rrFL0aJNKOU27 n88Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=y6oUritT/tvNge4hpZhsru6x2nNnKpQ7C/KLQ2rP0D0=; fh=u1kk6oY/jZAcw2lMgy0QQr17FnLowJaaL+GvRwVd/XA=; b=Gz4MdgQ/JEg8DQHAOnkCuymyZMsay7woaxSzEbnZb+KaacgKfZffGA3BkiD0NvGfVi wgnpNqEuYyta9+5pnokR2LrsK71sGpoeLYw9/dPwJUmBfzdmqZxcc9CUOw5H5KiAI54k fbUv3N40iLovGmSJpF9qT7Y7lRzod3CVa5gH3gD13sVth+4qBWVP7mdqOb34nVOTLAcj 9faMHfouCPwBvlbP32ltdWkL50+p4DhGuunQwPeiBZIfuHU9SAZ7fp7TTtz2OKJko6ox q04WgCLh4eE30usxpiV5WnAaslKW5NU6CV0Tx0No6JpKxCrmEzetKnPZBOYyIYRI1j4I ggvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gerCQHHJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h19-20020a05620a245300b0077417e7fd27si8701564qkn.290.2023.09.29.01.57.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:57:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gerCQHHJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dm-0005J7-4S; Fri, 29 Sep 2023 04:51:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9Dc-0005Bq-IR for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DC-0005d2-V0 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y6oUritT/tvNge4hpZhsru6x2nNnKpQ7C/KLQ2rP0D0=; b=gerCQHHJPpOWZpKnyQpieAljMoDLKZ1qXAzaP2mY+8McHscROPwN6VeCVbBh7ABHEkh88Y wcc0xVi8CGa2OiMpKjerw1kzxEuTXSB4vBHF7JGtHmY7Ia2Blz1NEVnlumgHG0uRDq/4V/ 5p64FDSVga556z7dg/Brx1mDlGxNOWk= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-29-iL2UWVfDNJKfEiOdOqpwZQ-1; Fri, 29 Sep 2023 04:50:58 -0400 X-MC-Unique: iL2UWVfDNJKfEiOdOqpwZQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AF1C81C0514A; Fri, 29 Sep 2023 08:50:57 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D34640C6EBF; Fri, 29 Sep 2023 08:50:57 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id CB96621E689E; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Auger Subject: [PULL 41/56] hw/arm/smmuv3.c: Avoid shadowing variable Date: Fri, 29 Sep 2023 10:50:38 +0200 Message-ID: <20230929085053.2789105-42-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell Avoid shadowing a variable in smmuv3_notify_iova(): ../../hw/arm/smmuv3.c: In function ‘smmuv3_notify_iova’: ../../hw/arm/smmuv3.c:1043:23: warning: declaration of ‘event’ shadows a previous local [-Wshadow=local] 1043 | SMMUEventInfo event = {.inval_ste_allowed = true}; | ^~~~~ ../../hw/arm/smmuv3.c:1038:19: note: shadowed declaration is here 1038 | IOMMUTLBEvent event; | ^~~~~ Signed-off-by: Peter Maydell Message-ID: <20230922152944.3583438-4-peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Signed-off-by: Markus Armbruster --- hw/arm/smmuv3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 1e9be8e89a..6f2b2bd45f 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -1040,8 +1040,8 @@ static void smmuv3_notify_iova(IOMMUMemoryRegion *mr, SMMUv3State *s = sdev->smmu; if (!tg) { - SMMUEventInfo event = {.inval_ste_allowed = true}; - SMMUTransCfg *cfg = smmuv3_get_config(sdev, &event); + SMMUEventInfo eventinfo = {.inval_ste_allowed = true}; + SMMUTransCfg *cfg = smmuv3_get_config(sdev, &eventinfo); SMMUTransTableInfo *tt; if (!cfg) { From patchwork Fri Sep 29 08:50:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727625 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp335515wrt; Fri, 29 Sep 2023 02:02:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJVBkB+W6jX8YatjQo62B9JVK8R5bK3ywXQgX4ZC4421OPPOKP0Y6arOU1z1hJvtt+1olS X-Received: by 2002:a0c:c207:0:b0:651:6349:fa7 with SMTP id l7-20020a0cc207000000b0065163490fa7mr3964937qvh.25.1695978177318; Fri, 29 Sep 2023 02:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695978177; cv=none; d=google.com; s=arc-20160816; b=XffPL1dTlRCjInLNZyj3/thhVK6CGV4sx/6hB77qBKjj2yYmgxY0mKiQIRhzcLo9jv 5oRaY1rCO4Za2eObzxgdla8hnGw0r2JefjGzWV8OeXjPA5Q+a9bfCBEKJFHWYKWo5zSi P042QIjAHxSTOvI48yyjpA4q6txOFliH+yZuui2QAsi2rXjFo4ar7P3XDe2ZZOTrz81i gpMuLpGGCimdr95IFLc6hl+z0KPWB1Al2+bvlXHclMuhbEN7CbGVNYeoozQhpl5TfBJC UPOEHsLr8oVXIkIgYWqUgQIEmjBkBxabQjGLM4VjiGytnL/+u5tGtDKG6dCaemz5bI4+ Z//A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/+dpUECFCMcZ38HJNY0Gx8doEP4arUzG5jpycPf5+yc=; fh=2/sWogJi1sQjT0Gw3YjSM8yG9BVteXNgb37v0rOI+d4=; b=AJcTovlttAtCokhZLpslTvWxIq/lehr8rtBUZRV72H2wFPzHflchGtmXkpDD+RJNwr 8PPMJ0BnnPKiY1tyme5cGgkkrNGyJCrpeODjEFypck38uSAOckHnOAgGPmvHUo4MWf6s PGjp1suo9XJ7gGmPyDw/kP5Kww67tYzsZ6QwHUfRra96bRSuGSND9mfpyuZSx7qIdTPu bSfKTlOHhRUHhZchlhVL7tb8wpzt19IDurSO+dzCcop4O5VXwA17hTmHSDt61CJmE1a2 3kazPZP9kNA+BNVLXhWlOY7k79WqaEIWgRSv/1+dyhog7lno6JMn9colv9nUnavnU46t fpaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qi09158u; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k3-20020a0cf583000000b0065b21835750si3614772qvm.91.2023.09.29.02.02.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 02:02:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qi09158u; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Mr-000235-SD; Fri, 29 Sep 2023 05:01:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9Mh-0001qg-Ht for qemu-devel@nongnu.org; Fri, 29 Sep 2023 05:00:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9MO-0008Bw-D4 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 05:00:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695978031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/+dpUECFCMcZ38HJNY0Gx8doEP4arUzG5jpycPf5+yc=; b=Qi09158uMOp04OfGjik2uwtl3JUALlPl6tOZsOJUFV6HYlX2X0pMePUgP0gkhRnuXQVrdb jav5pQdVPO0SGvJrJ9kOtE2OI7z28hPc20RGlu6CfSFUhtBg58WJPgPxgYnIWhIAgbuVko /rEtz6yDgPG+iQuVGv3T1U1loN7gj2M= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-52-SxpB8XR9OESt43ESgH-RpA-1; Fri, 29 Sep 2023 05:00:27 -0400 X-MC-Unique: SxpB8XR9OESt43ESgH-RpA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C2DB1019C99; Fri, 29 Sep 2023 09:00:27 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4DB37176EA; Fri, 29 Sep 2023 09:00:27 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id CE86621E689F; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Peter Maydell , Eric Auger Subject: [PULL 42/56] hw/arm/smmuv3-internal.h: Don't use locals in statement macros Date: Fri, 29 Sep 2023 10:50:39 +0200 Message-ID: <20230929085053.2789105-43-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell The STE_CTXPTR() and STE_S2TTB() macros both extract two halves of an address from fields in the STE and combine them into a single value to return. The current code for this uses a GCC statement expression. There are two problems with this: (1) The type chosen for the variable in the statement expr is 'unsigned long', which might not be 64 bits (2) the name chosen for the variable causes -Wshadow warnings because it's the same as a variable in use at the callsite: In file included from ../../hw/arm/smmuv3.c:34: ../../hw/arm/smmuv3.c: In function ‘smmu_get_cd’: ../../hw/arm/smmuv3-internal.h:538:23: warning: declaration of ‘addr’ shadows a previous local [-Wshadow=compatible-local] 538 | unsigned long addr; \ | ^~~~ ../../hw/arm/smmuv3.c:339:23: note: in expansion of macro ‘STE_CTXPTR’ 339 | dma_addr_t addr = STE_CTXPTR(ste); | ^~~~~~~~~~ ../../hw/arm/smmuv3.c:339:16: note: shadowed declaration is here 339 | dma_addr_t addr = STE_CTXPTR(ste); | ^~~~ Sidestep both of these problems by just using a single expression rather than a statement expr. For CMD_ADDR, we got the type of the variable right but still run into -Wshadow problems: In file included from ../../hw/arm/smmuv3.c:34: ../../hw/arm/smmuv3.c: In function ‘smmuv3_range_inval’: ../../hw/arm/smmuv3-internal.h:334:22: warning: declaration of ‘addr’ shadows a previous local [-Wshadow=compatible-local] 334 | uint64_t addr = high << 32 | (low << 12); \ | ^~~~ ../../hw/arm/smmuv3.c:1104:28: note: in expansion of macro ‘CMD_ADDR’ 1104 | dma_addr_t end, addr = CMD_ADDR(cmd); | ^~~~~~~~ ../../hw/arm/smmuv3.c:1104:21: note: shadowed declaration is here 1104 | dma_addr_t end, addr = CMD_ADDR(cmd); | ^~~~ so convert it too. CD_TTB has neither problem, but it is the only other macro in the file that uses this pattern, so we convert it also for consistency's sake. We use extract64() rather than extract32() to avoid having to explicitly cast the result to uint64_t. Signed-off-by: Peter Maydell Message-ID: <20230922152944.3583438-5-peter.maydell@linaro.org> Reviewed-by: Eric Auger Signed-off-by: Markus Armbruster --- hw/arm/smmuv3-internal.h | 41 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/hw/arm/smmuv3-internal.h b/hw/arm/smmuv3-internal.h index 6d1c1edab7..648c2e37a2 100644 --- a/hw/arm/smmuv3-internal.h +++ b/hw/arm/smmuv3-internal.h @@ -328,12 +328,9 @@ enum { /* Command completion notification */ #define CMD_TTL(x) extract32((x)->word[2], 8 , 2) #define CMD_TG(x) extract32((x)->word[2], 10, 2) #define CMD_STE_RANGE(x) extract32((x)->word[2], 0 , 5) -#define CMD_ADDR(x) ({ \ - uint64_t high = (uint64_t)(x)->word[3]; \ - uint64_t low = extract32((x)->word[2], 12, 20); \ - uint64_t addr = high << 32 | (low << 12); \ - addr; \ - }) +#define CMD_ADDR(x) \ + (((uint64_t)((x)->word[3]) << 32) | \ + ((extract64((x)->word[2], 12, 20)) << 12)) #define SMMU_FEATURE_2LVL_STE (1 << 0) @@ -533,21 +530,13 @@ typedef struct CD { #define STE_S2S(x) extract32((x)->word[5], 25, 1) #define STE_S2R(x) extract32((x)->word[5], 26, 1) -#define STE_CTXPTR(x) \ - ({ \ - unsigned long addr; \ - addr = (uint64_t)extract32((x)->word[1], 0, 16) << 32; \ - addr |= (uint64_t)((x)->word[0] & 0xffffffc0); \ - addr; \ - }) +#define STE_CTXPTR(x) \ + ((extract64((x)->word[1], 0, 16) << 32) | \ + ((x)->word[0] & 0xffffffc0)) -#define STE_S2TTB(x) \ - ({ \ - unsigned long addr; \ - addr = (uint64_t)extract32((x)->word[7], 0, 16) << 32; \ - addr |= (uint64_t)((x)->word[6] & 0xfffffff0); \ - addr; \ - }) +#define STE_S2TTB(x) \ + ((extract64((x)->word[7], 0, 16) << 32) | \ + ((x)->word[6] & 0xfffffff0)) static inline int oas2bits(int oas_field) { @@ -585,14 +574,10 @@ static inline int pa_range(STE *ste) #define CD_VALID(x) extract32((x)->word[0], 31, 1) #define CD_ASID(x) extract32((x)->word[1], 16, 16) -#define CD_TTB(x, sel) \ - ({ \ - uint64_t hi, lo; \ - hi = extract32((x)->word[(sel) * 2 + 3], 0, 19); \ - hi <<= 32; \ - lo = (x)->word[(sel) * 2 + 2] & ~0xfULL; \ - hi | lo; \ - }) +#define CD_TTB(x, sel) \ + ((extract64((x)->word[(sel) * 2 + 3], 0, 19) << 32) | \ + ((x)->word[(sel) * 2 + 2] & ~0xfULL)) + #define CD_HAD(x, sel) extract32((x)->word[(sel) * 2 + 2], 1, 1) #define CD_TSZ(x, sel) extract32((x)->word[0], (16 * (sel)) + 0, 6)