From patchwork Tue Oct 10 11:50:48 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: 731455 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1701839wrw; Tue, 10 Oct 2023 04:52:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPinRLllpwOL46+cTJIYUossNbf7XdhMNMpiXtMcLpipk2HsUK6Jl1wf/ZLU+WWEw77FJH X-Received: by 2002:ac8:5f8c:0:b0:417:9431:c61b with SMTP id j12-20020ac85f8c000000b004179431c61bmr22443074qta.18.1696938758358; Tue, 10 Oct 2023 04:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696938758; cv=none; d=google.com; s=arc-20160816; b=m9X9t3bPEKYorkGwPITZtuW8ksWW/HHQUckT2ho4kPqQQgax93zosnX3a5nPiTDM85 v0q+Lli+ExRpMQEgfLpfG4tp9vbB7jEl5RlbSEE14+IcezEK9u3Kp2oFrLpgHPEAQQ6V T21EBRvHHtufkzXgOfEhH7rWPr5Fl0l1hvgY6TD2uxfd85pGjge1cJ3lzkSA1vfy7jka lEUZ2qRtAu/WP4nLkeytKkVO0Z3NbHj8bLDZKETlElA4Sw1uAzXVGqLoB7JVO470ePUT t0dxzaXdAbVZEEEb30RXdZ4QtdQPy8x+ZHuomZoBEosK4vhoiVqQxp8Pq4hs3N9yDrKx 9opg== 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=mxNNJ0+CbtGu/FtriJHh3KhiymL+ByyxtOGep+z6Z6E=; fh=06c1SfXCDJsZD94qIZFbVOXNxhn2+zM3SMxozUzqBSg=; b=g4ioG1xJ0lnjEIaZ1E9ye7Ll65MFoZRzPMLNkim45iTiiuFhJBG6e02TiXAh92U6jy C1oKP37uU4gXK0KQyNeX6NAfPA73BO4F6l4KoKW1BQGK6SUDwwWzqRhRK0vSLWRIRX27 YpCg6BWjn6SGNx/Lmdn6UZ0uODgj2nnFP5MHqnvqsinnNz4T4AeGfkV1I4xvOdpBnBme MhcYjuP2hv8u7SEjFmFwf9TXSV3RHyViKMbaJRsloK+Ig+Qz15B9B32BA2x0DAXy6Uu/ uQnbhoSy+7S+/Y9l1qxN8HVGKbZvKRXpw/Ct2YpCuUL+0TZvXmvmsJwrcWoJ4Qzj0CMT 3Cuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cll0BMja; 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 m13-20020ac85b0d000000b00418135e539fsi7617658qtw.359.2023.10.10.04.52.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Oct 2023 04:52:38 -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=Cll0BMja; 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 1qqBGy-0000IP-7U; Tue, 10 Oct 2023 07: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 1qqBGv-0000Bp-B8 for qemu-devel@nongnu.org; Tue, 10 Oct 2023 07:51:33 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqBGt-00078K-Mo for qemu-devel@nongnu.org; Tue, 10 Oct 2023 07:51:33 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-9b275afb6abso1450779266b.1 for ; Tue, 10 Oct 2023 04:51:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696938689; x=1697543489; 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=mxNNJ0+CbtGu/FtriJHh3KhiymL+ByyxtOGep+z6Z6E=; b=Cll0BMjaaF+NkJ4dA1sOKeOd6F7VATNi+FbkbuxmL0kCcNHdjWk1n69rpjlQqNQLEp tSVrQFuBtM8cWhHEaJ5abF1HiUp+mn+VrT3ygqydR92if9vcMwaFeE2RXdn2cBzd3T7y S3vAbKNSz3mJB29D70TpcYl5f1WIAutKHRab5GwYxXGOHT5+KljcwGEG9C780XQZoDnV me8pjRyxYDhpotL2k4g2173xTLrpwgt+V9HFU3OOOWsF1V7ssGqVi3TW4IyzOkF3d8MP IkggRsS7A9otiFc6g4UCa8AqMa9ZkMSrb19khFD47/jz/ePWQnFMM8D9eBFSGcu6cRBe mT1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696938689; x=1697543489; 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=mxNNJ0+CbtGu/FtriJHh3KhiymL+ByyxtOGep+z6Z6E=; b=Vyh6hOZ1lagRgdFlTCwNd6vCU9c92We3XEzNBAigTAtpjOnPlWCfMDSu/e4jsGMXMR eKvpT2baix/mWPgu43O2iM69ZotkJc4OG0hOUjyPU9Sc8l2yGPqkbyvqf4W9GAlCEDxE JuFsZ45IndJ5wW3gkw6smUFtXlXqKE7E39cpPwt+EUPKTkrDGwZ7d4lNb2umQI7Q31YI o/lCfDf4kG8Tdio/lJeaxPPxU8spyG4eFjtXNZNrywyKg478Oeq+Ke1kvbWePxXe4qBp NDfZr3beLLOKz3b4/UP3HaBG6+PPMpLOrZmfXb/XE6JW3LbdomRvJ5NV6D25SmEGTBgC hp0w== X-Gm-Message-State: AOJu0YwmBgglJfdrPolHSAKiWf90IrVjpWtKYuLv5HEusvdHuz5nIQZl kFqTOBm9PhkLPEMLY2cSxH8is+b3aBNY6MiLt9hONw== X-Received: by 2002:a17:906:fe08:b0:9a1:e0b1:e919 with SMTP id wy8-20020a170906fe0800b009a1e0b1e919mr13143233ejb.4.1696938689797; Tue, 10 Oct 2023 04:51:29 -0700 (PDT) Received: from m1x-phil.lan (aif79-h01-176-172-113-148.dsl.sta.abo.bbox.fr. [176.172.113.148]) by smtp.gmail.com with ESMTPSA id p26-20020a1709060dda00b009b2cc87b8c3sm8256010eji.52.2023.10.10.04.51.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Oct 2023 04:51:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Markus Armbruster , Igor Mammedov , Richard Henderson , Ilya Leoshkevich , Gerd Hoffmann , Halil Pasic , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , "Michael S. Tsirkin" , Yanan Wang , Eduardo Habkost , Eric Farman , qemu-s390x@nongnu.org, Christian Borntraeger , Thomas Huth , Ani Sinha , David Hildenbrand Subject: [PATCH v2 6/6] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req() Date: Tue, 10 Oct 2023 13:50:48 +0200 Message-ID: <20231010115048.11856-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231010115048.11856-1-philmd@linaro.org> References: <20231010115048.11856-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.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/s390x/sclpquiesce.c:90:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] QuiesceNotifier *qn = container_of(n, QuiesceNotifier, notifier); ^ hw/s390x/sclpquiesce.c:86:3: note: previous declaration is here } qn; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand --- hw/s390x/sclpquiesce.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/s390x/sclpquiesce.c b/hw/s390x/sclpquiesce.c index ce07b16884..a641089929 100644 --- a/hw/s390x/sclpquiesce.c +++ b/hw/s390x/sclpquiesce.c @@ -78,12 +78,10 @@ static const VMStateDescription vmstate_sclpquiesce = { } }; -typedef struct QuiesceNotifier QuiesceNotifier; - -static struct QuiesceNotifier { +typedef struct QuiesceNotifier { Notifier notifier; SCLPEvent *event; -} qn; +} QuiesceNotifier; static void quiesce_powerdown_req(Notifier *n, void *opaque) { @@ -97,6 +95,8 @@ static void quiesce_powerdown_req(Notifier *n, void *opaque) static int quiesce_init(SCLPEvent *event) { + static QuiesceNotifier qn; + qn.notifier.notify = quiesce_powerdown_req; qn.event = event;