From patchwork Mon Oct 9 09:47:46 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: 730968 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1116178wrw; Mon, 9 Oct 2023 02:50:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtcyBvjfDdwYIrcowSdbfTAzExA5wHUHzxupHedx8dsdBZ+lQt7yMWDrvk/ISZSJdB1q55 X-Received: by 2002:a05:6870:7010:b0:1c0:5f7a:896f with SMTP id u16-20020a056870701000b001c05f7a896fmr17292330oae.8.1696845059277; Mon, 09 Oct 2023 02:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696845059; cv=none; d=google.com; s=arc-20160816; b=MHX2omgp5WV8by1WCwX57Tk3a0aW2btpymJTBRUM60wqGeACldhRtimzVUFDNh4OP5 7OzzWcCxsGsCaUZQx9R/VLca8KMimboM6qRa3LL5Xpva6fanybBhlrtLZeRi6fUPrfJP ZsYHoUFp/BM382LYUPsqV4LJwIxSm8JCzEE1vhA4G5KoMD2pO81HA36cTAnUja09a5Mx n+x9+VfEHXySCVaK+W1yYIjkAA+gz04m4yECmGgjsT/fvmX1ac5oLjJsQ+sLXfBn6ym+ G4+4xyZvG7vmQVWRtF4w7WZxWqKquoReHReJlP3j2D2Wougk83JXsIEct5QQnm/A+/rV thog== 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=pMMxlES9nAQ+sONyZQnmh1EZ23km32jDSkIWikw2cps=; fh=n4SzPhYKXn8xRxTgdSQ5YZq0XW28GvXJqV224ul7a6o=; b=FiSyRkaTS3hviKizB/O6PX/VDjiajPkpENxKvkqGqvmz7lZKOvnV86bWtwESTszTIb M2gb9tBejUO9AefiAl8MCu5ZayBFvO34Dz4y4zPCgDWqtsgZ3S2DZh3rmmsssTk8mRlt 5F2vE3UNO9uFyZATxe0sGRnMa9RD5P7gPov/5xLRvNRr+dKeTzcZj8tCsdmDS+PvRQrV ycnTaAQQcYa7rtRaCPUCg2/cJlfMRStSHQp9sC01pQhH8Qd+g1QHvhMi3W6p1CN7jKsf +RXqz3nuQE+Njpqgp34n11N/jGivZaP+8HwHi5HzIFhT7fdPXrAcWm/Vips4ksWkmgdB uIxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UEEaVzD0; 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 ro17-20020a05620a399100b00770e0f570f8si5806468qkn.442.2023.10.09.02.50.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 02:50: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=@linaro.org header.s=google header.b=UEEaVzD0; 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 1qpmt6-000332-HJ; Mon, 09 Oct 2023 05:49:21 -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 1qpmsL-000246-A1 for qemu-devel@nongnu.org; Mon, 09 Oct 2023 05:48:36 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpmsI-00060a-Fb for qemu-devel@nongnu.org; Mon, 09 Oct 2023 05:48:32 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5334d78c5f6so7426948a12.2 for ; Mon, 09 Oct 2023 02:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696844908; x=1697449708; 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=pMMxlES9nAQ+sONyZQnmh1EZ23km32jDSkIWikw2cps=; b=UEEaVzD07CeGQ7jVjLoP2R9Tg/6ON/l5f4TGcenBCSbzShSkbqD4FGANhF5LmRlvl+ hVRzZXPr71BqvZoojL7dS+AktUMZc1fxsXY2pp4/JuHZOjIiDVdzK2UNbV2FFl3bHi8y 4hooNcQuByZDSvgzkt6GFKYW4lvOxJ4XIBuFPVJ+ydh/0vivtfsmpMI4d09PzXKcaMaI nOFiFJTT7BetbSkdwycsWcpSY+gUjUiCBikWdGTn8wpGpzUFQcPd634RX/P6Vfo6qWvh 8dNFwe70lqZrqmjgH9JTkMxqT/Luu6a3PYWkP+oAkZDOhVtP48/DDWmQMuXmXJ1acg/9 1fzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696844908; x=1697449708; 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=pMMxlES9nAQ+sONyZQnmh1EZ23km32jDSkIWikw2cps=; b=dPLUdkP1znb5m/Eu5ZQTzcYZN3kCfzynfNM5VmrAL0QwxJae7ag+Mpv9Df4HcMZDn4 X5zupUHvO1tNCe2Uz9kwbjr0uVgXNwy9vYA6/8qW4n1kXeugKJwVrpBK+LRhTHpYwlLe dw61xtinrvZu4krFVg29T7IAiulCi7TB8qFUZFKcXMxCbM8tsRilNAswLdRpjWh9nLEn WXLCTNbziYiD/dOZCh5i9J7iWRV8Y7C1GSKluDV/NyZk12E7eJrbujkZJYNQPu9n/o90 c0y7H5vNgyQhGtzlOrHERe3kAdRRj6tgLn2SkXrAXGRxtIsk09UV3vSQNC4SJ3eUUNQ7 YuSA== X-Gm-Message-State: AOJu0YyJd9Fg1lauGow/aIXvXbPnY7p0nfOyYcLxUUblczagqBn2aCN5 oqz4HkFPQK4A/QfHai1Pf8xG0pO0oDv6vxt6ueg= X-Received: by 2002:a05:6402:1b0b:b0:527:3a95:5bea with SMTP id by11-20020a0564021b0b00b005273a955beamr12741105edb.32.1696844908700; Mon, 09 Oct 2023 02:48:28 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id d5-20020aa7ce05000000b005346a263bb1sm5831257edv.63.2023.10.09.02.48.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 02:48:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Ani Sinha , "Michael S. Tsirkin" , Igor Mammedov , Yanan Wang , David Hildenbrand , Eric Farman , Richard Henderson , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Marcel Apfelbaum , Thomas Huth , Halil Pasic , Gerd Hoffmann , Ilya Leoshkevich Subject: [PATCH 6/6] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req() Date: Mon, 9 Oct 2023 11:47:46 +0200 Message-ID: <20231009094747.54240-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009094747.54240-1-philmd@linaro.org> References: <20231009094747.54240-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=philmd@linaro.org; helo=mail-ed1-x536.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 Reviewed-by: Eric Farman --- 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;