summaryrefslogtreecommitdiff
path: root/drivers/pci/controller/dwc/pcie-qcom-common.c
diff options
context:
space:
mode:
authorYury Norov <yury.norov@gmail.com>2025-11-20 15:56:52 +0100
committerThomas Gleixner <tglx@linutronix.de>2025-11-20 20:17:32 +0100
commitb56651007fc018effe695a68d48caa6970b23094 (patch)
tree765715a0e8156a0b02e913d45a9f1acf0478dfc3 /drivers/pci/controller/dwc/pcie-qcom-common.c
parent185bccc79797d71477e672a1b2a2b7d0325044e7 (diff)
cpumask: Add initialiser to use cleanup helpers
Now we can simplify a code that allocates cpumasks for local needs. Automatic variables have to be initialized at declaration, or at least before any possibility for the logic to return, so that compiler wouldn't try to call an associate destructor function on a random stack number. Because cpumask_var_t, depending on the CPUMASK_OFFSTACK config, is either a pointer or an array, we have to have a macro for initialization. So define a CPUMASK_VAR_NULL macro, which allows to init struct cpumask pointer with NULL when CPUMASK_OFFSTACK is enabled, and effectively a no-op when CPUMASK_OFFSTACK is disabled (initialisation optimised out with -O2). Signed-off-by: Yury Norov <yury.norov@gmail.com> Signed-off-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://patch.msgid.link/20251120145653.296659-7-gmonaco@redhat.com
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-qcom-common.c')
0 files changed, 0 insertions, 0 deletions