[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/25] hw/s390x: Clean up global variable shadowing in quiesce_pow
From: |
Thomas Huth |
Subject: |
[PULL 22/25] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req() |
Date: |
Wed, 18 Oct 2023 15:07:13 +0200 |
From: Philippe Mathieu-Daudé <philmd@linaro.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é <philmd@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231009094747.54240-7-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
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;
--
2.41.0
- [PULL 02/25] CPU topology: extend with s390 specifics, (continued)
- [PULL 02/25] CPU topology: extend with s390 specifics, Thomas Huth, 2023/10/18
- [PULL 04/25] target/s390x/cpu topology: handle STSI(15) and build the SYSIB, Thomas Huth, 2023/10/18
- [PULL 10/25] machine: adding s390 topology to query-cpu-fast, Thomas Huth, 2023/10/18
- [PULL 11/25] machine: adding s390 topology to info hotpluggable-cpus, Thomas Huth, 2023/10/18
- [PULL 09/25] qapi/s390x/cpu topology: set-cpu-topology qmp command, Thomas Huth, 2023/10/18
- [PULL 12/25] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE QAPI event, Thomas Huth, 2023/10/18
- [PULL 17/25] tests/avocado: s390x cpu topology entitlement tests, Thomas Huth, 2023/10/18
- [PULL 13/25] qapi/s390x/cpu topology: add query-s390x-cpu-polarization command, Thomas Huth, 2023/10/18
- [PULL 21/25] tests/avocado: s390x cpu topology bad move, Thomas Huth, 2023/10/18
- [PULL 24/25] target/s390x/kvm: Simplify the GPRs, ACRs, CRs and prefix synchronization code, Thomas Huth, 2023/10/18
- [PULL 22/25] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req(),
Thomas Huth <=
- [PULL 15/25] tests/avocado: s390x cpu topology core, Thomas Huth, 2023/10/18
- [PULL 14/25] docs/s390x/cpu topology: document s390x cpu topology, Thomas Huth, 2023/10/18
- [PULL 18/25] tests/avocado: s390x cpu topology test dedicated CPU, Thomas Huth, 2023/10/18
- [PULL 19/25] tests/avocado: s390x cpu topology test socket full, Thomas Huth, 2023/10/18
- [PULL 20/25] tests/avocado: s390x cpu topology dedicated errors, Thomas Huth, 2023/10/18
- [PULL 23/25] target/s390x/kvm: Turn KVM_CAP_SYNC_REGS into a hard requirement, Thomas Huth, 2023/10/18
- [PULL 25/25] tests/qtest/migration-test: Disable the analyze-migration.py test on s390x, Thomas Huth, 2023/10/18
- [PULL 16/25] tests/avocado: s390x cpu topology polarization, Thomas Huth, 2023/10/18