From patchwork Thu Aug 31 22:56:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 719038 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741824wrn; Thu, 31 Aug 2023 15:58:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHsV36VfuSB6s9uuDH847LYmkB2gR4WbqSvXMTq0FSh1N8ZScrPxXMldv2Orln8AWPKwa8f X-Received: by 2002:a1f:4e47:0:b0:490:5c1d:3ef9 with SMTP id c68-20020a1f4e47000000b004905c1d3ef9mr1071737vkb.5.1693522723854; Thu, 31 Aug 2023 15:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522723; cv=none; d=google.com; s=arc-20160816; b=Y5AFBX5BPhdl28Px2zgNnninYDs+Efp3i43cAPXPs04WYhcSAWcSNB9gZ5qCIkWv7v AwB+xUGrB1oLC+JXYpyNa7ogB95pLVPdDikkWBD3vc1FFMH8uFvXEnwUFRe+cjktI7Zd 3Iff79d7bemLGAJQCGfgKMaexnmMDXhUmPYbMytg5g919i6KC8oFzugKoVKcFcCwapyh qpZGWfKCI/EgyIwo85U5mkHhUPZO7l0oNlu0cSQULzMQ/xZj2n9vLBtAk1yY8ibW72lK sb7klnV+MHp3ZxH25h0QDEBXK5IwJJMhHFFdJHcBFryBFFmoVB/qsMPR19s6e/o0J1Hn uiaQ== 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=4GNi2AOj7YBZidVqMdiMTsl/wL7uqVeokPItco5CZ1w=; fh=rmbPMLkKdMLoE/1W8nKMRiIPVfrTnm2fPPNYpN4rLFw=; b=td8jU7GEYpVduQoZqXoDrV5tSAzAZardTqcwrq4VAV6GjqmRu2Pbc6yOXV0qIevRXM IM3y4sXCPs+pS7sbDvOQpeMz69U4bHsNCOSPaKptp49YsIi8NIjJqJLk38gXaS6iNuhz AXo1JThCFR96/DfdsWuHYJ6AZCy1aezb5nkYLoN199OTQ9dxuqjMm56UdG+drzq8dkst 2fMXzI5nnaDhayGJwbNdJBo4ReRIp7E+x29GHdyMd3aUq8NQKTe+L6zLk6kTjT0Aurmn JbMwQC14k7NEP/eCuLBAF2MMfAlZh/kBCtuIeyO1T81GexY3dFVlyAUTu/FzKVhSXkSN Sn0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BO63+KHX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z11-20020a05622a060b00b0041362f42bcasi1462765qta.794.2023.08.31.15.58.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BO63+KHX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbqbW-0004sf-Ad; Thu, 31 Aug 2023 18:57:34 -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 1qbqbJ-0004fZ-Eh for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:22 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqbF-0003DF-Po for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:21 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-500cfb168c6so2428965e87.2 for ; Thu, 31 Aug 2023 15:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522636; x=1694127436; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4GNi2AOj7YBZidVqMdiMTsl/wL7uqVeokPItco5CZ1w=; b=BO63+KHXIScqc/o1nMCK7Mz7lmzuQ7DEUqw5iMowpiHgfWKHpf+qh+cI6bt1O1X7lv jkWzn3QOvsV7qoTdoVIHU26sE7ytH1hGfb743k8ktggJdcq6bJM9UFASbkpsSZx8ulYu P3uChnX+V6qe5PFdlRv+dEmyh/zmwIuWb1G6kihR0vtPSasbauctsgyrKTnFQljyIji0 tGbFI08BMYB60KPMHgmqnDJKF9olgPtTc4/hmpQbnMRbG6UfLyfIke2WjtwU1mxe5Rqj Ck15lRS8uClSMjIbrQ5A4t1U815fY1Oh5wtTPxFj1vtckQqUUwFnaG3+L+vd1wP1CbKB tSLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522636; x=1694127436; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4GNi2AOj7YBZidVqMdiMTsl/wL7uqVeokPItco5CZ1w=; b=iHObpH4S3OwQ4I/XOInmNyrMpXVWqjS1SWixKiEiAnj0cQYTJaSedOMezvGW6ID816 EobhsNTQHS7jT9G2GOWOHNgii3CH8pweHJ6lWLFn8ltWaNrK6dJeLj1eyHZFgeEQUSDc qoHZYuVQxTR7xGG1a2EhDMWj1WxKp2UKUNfS5SOQsnbZv6u24mySFGh6cdUUMzZZKqsf 3domZ/SVjTT7q/3o56/sXyoZv8h+K28en/oru2ZjEaxklExlf1HR2PgevChsuQbOrubv nxHX7fl0i3cMv690pIu6v0IgZ5DqRfg60xti1Kt1rPdWMi5HpYCu6wLf9X/mADlbAP+U gisA== X-Gm-Message-State: AOJu0YzpFxWvkqt+88zUNPjiQ8PJn9tTge3KjhgYHY2AMcaeW7/El12C Ei/vyy9tgErr+Lq8dkEmldK7IX9Wqwup4N9Sojs= X-Received: by 2002:a05:6512:2513:b0:4f8:8be4:8a82 with SMTP id be19-20020a056512251300b004f88be48a82mr466680lfb.22.1693522635678; Thu, 31 Aug 2023 15:57:15 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id j8-20020a50ed08000000b0052333d7e320sm1304363eds.27.2023.08.31.15.57.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:57:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Alistair Francis Subject: [PATCH 11/11] sysemu/device_tree: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:06 +0200 Message-ID: <20230831225607.30829-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=philmd@linaro.org; helo=mail-lf1-x12f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 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é --- 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)); \