From patchwork Wed Oct 4 12:00:05 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: 729288 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a4e:0:b0:31d:da82:a3b4 with SMTP id v14csp302700wrs; Wed, 4 Oct 2023 05:02:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+PLU+TuM8HLcmu6+QHKvB5mrPPQm4/vDgNennsM+Pd3/YFrQ0MfsFXQY0mwMyrnHf4qQ8 X-Received: by 2002:a05:620a:911:b0:774:2915:d180 with SMTP id v17-20020a05620a091100b007742915d180mr1947430qkv.37.1696420931388; Wed, 04 Oct 2023 05:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696420931; cv=none; d=google.com; s=arc-20160816; b=H/+VPwSbRxlv/PGtftXa8XS0yd3X7HOze7xqObjx+OMFsH4LDtrtoaXrI109ssLijA PFPGTxFGZJzm6ispVzyJwT3G1Y5rtyMNlSfpCCIBDJTUOnPPDWZra2kUU/DvC/Ug+rDY 3C4IGxBolv4ovyMMYKiJmMRCRE2aUoHmprxyg2W8ADRUprMwL6ayCUS5Z9d2vjnNAwFt 1UTiHFWXmVNmTTiEry0qbYFoKm4IdqlxThP6WhRcuCBIqcXZG6oJJA4QVfnPv5WcfPix fIfDZIu6vRrG0UOVYn5qUF3nMgtzrUQCm80Pn4p/EXpPzBSU1bRifjPPsQUzJ/FgKMkK cQBQ== 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=TCSsB1yBxNop9ElFEQPzo8eRpaAPTBMtrtJV+7OJslM=; fh=lhdsMERe973z4lHvDGpqQDjDnXn01ffOfMbrOmuJz70=; b=UbqGe4uevDrmcB5wOVqF/jwWeoa15GHl6qGtYZprjAELehi8JzaFoiToHkfGwYuvns GPTgMbdx7ets5zp8l5Nb+AGIpVpDDusSu5gL3J/qnAiabmRCsquu5Ry/w7RQinLzdZUP 7yFdJ88KP/GeAc3Rs4q7ZxzL8gsMs1vwbrXOdjcIl9CYgp8+C0QAOaAiPmi/55EByNcH txyFP6FfnEKU+HYhKJJyr7Q3GRYcjfHrOfWeQzlCe5G1/50i6IndSz6HL5CPIaZg+sWz IKWckPZKp4l9kOYGG1i7/t9rzgfAtCcRDB0Kj++HHQ+H7AoAOWzKS3x1C4NkUoXxvXgA Lo/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t4338tGY; 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 bm31-20020a05620a199f00b00767b568becesi1411691qkb.486.2023.10.04.05.02.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Oct 2023 05:02: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=@linaro.org header.s=google header.b=t4338tGY; 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 1qo0ZK-0000Ib-Aj; Wed, 04 Oct 2023 08:01:42 -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 1qo0YQ-0008Tq-0Q for qemu-devel@nongnu.org; Wed, 04 Oct 2023 08:00:38 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qo0YO-0000xi-IH for qemu-devel@nongnu.org; Wed, 04 Oct 2023 08:00:37 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-405417465aaso20780485e9.1 for ; Wed, 04 Oct 2023 05:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696420835; x=1697025635; 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=TCSsB1yBxNop9ElFEQPzo8eRpaAPTBMtrtJV+7OJslM=; b=t4338tGYkiUc6DA3kdmPzoUcnvxTiagrrCHzwn4Jl2V3xLzOME4aasw+DmzOryX4ZL Z6AGUL8bGPWxf7IKMLk4Q7ClvH/CQwZ9WIHUCIpl7N8ePhdPMGzA8MWxOc5HJYnoZAnn UCtQhuyfpL/vkmr6QP4OS9357288pZ/hDOorJmP3/AZA8EEc7Uqq4F81NpevsrUalnSL 1Zl8acIb3Qqy5pXQwawdZ8cL/rSRrOfz0R0rj/RvP78BZ7/Xnu1YRlJk2AkelNVZLjHJ juUVdmFTwso9UNmlJD53ekzDT/ZZKsWWwvQAmPYUEHdO5cq4CEQkK6rpP9Fc/zJUcs3C MsMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696420835; x=1697025635; 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=TCSsB1yBxNop9ElFEQPzo8eRpaAPTBMtrtJV+7OJslM=; b=YGcgXAeicZwMF01lherRn221PuDE9aP+E/761W3RENZanHUk1rXQh9dIsuXai1+v0m sw1UkRfglHIc+cGQ0UOuwVS6fH7bCjpsOVGmDir+H/UcchItoTAnaizk+vbqPcapgtdI 64AY8BuUE9qwGZ0BgAYyu11LbqmIdfPByJV2UryYQ54ZV6LCahFDGXucjoTwS53JfZBb O/NO1CV4ffNaIt8ExWG4Ulrb1gYfrjXKnTsRvcsZWPvRkEjfzvlu+AGM1yGIE9wNdUqA cmUj7i+4zziV68gIcZdiq0CpXAa6lnURny4S4pZQ7RG9253ucbgfs/GncdrhEf0nhcss Zw9g== X-Gm-Message-State: AOJu0YwcsajUNz/Gct70kk9q86fOt6p68yung8zmj9x8HSZbJI3wH2cb uuw7GJXX8HYZPEwyuvl1TYteRRpfMj93IKuFKGE= X-Received: by 2002:a5d:6a4c:0:b0:31f:8a6d:e527 with SMTP id t12-20020a5d6a4c000000b0031f8a6de527mr1957218wrw.45.1696420834925; Wed, 04 Oct 2023 05:00:34 -0700 (PDT) Received: from m1x-phil.lan (5ep85-h01-176-173-163-52.dslam.bbox.fr. [176.173.163.52]) by smtp.gmail.com with ESMTPSA id v11-20020adfedcb000000b0031fd849e797sm3845151wro.105.2023.10.04.05.00.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Oct 2023 05:00:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , John Snow Subject: [PATCH v3 02/16] hw/ide/ahci: Clean up local variable shadowing Date: Wed, 4 Oct 2023 14:00:05 +0200 Message-ID: <20231004120019.93101-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004120019.93101-1-philmd@linaro.org> References: <20231004120019.93101-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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/ide/ahci.c:1577:23: error: declaration shadows a local variable [-Werror,-Wshadow] IDEState *s = &ad->port.ifs[j]; ^ hw/ide/ahci.c:1569:29: note: previous declaration is here void ahci_uninit(AHCIState *s) ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: John Snow --- hw/ide/ahci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index d0a774bc17..fcc5476e9e 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1622,9 +1622,7 @@ void ahci_uninit(AHCIState *s) AHCIDevice *ad = &s->dev[i]; for (j = 0; j < 2; j++) { - IDEState *s = &ad->port.ifs[j]; - - ide_exit(s); + ide_exit(&ad->port.ifs[j]); } object_unparent(OBJECT(&ad->port)); }