[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fb6ee370-54d7-4eff-8a44-ee7cf2d13e61@web.de>
Date: Mon, 20 May 2024 11:28:09 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Viresh Kumar <viresh.kumar@...aro.org>,
Javier Carrasco <javier.carrasco.cruz@...il.com>,
linux-sunxi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-pm@...r.kernel.org, kernel-janitors@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
Andre Przywara <andre.przywara@....com>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Peter Zijlstra <peterz@...radead.org>, "Rafael J. Wysocki"
<rafael@...nel.org>, Samuel Holland <samuel@...lland.org>,
Yangtao Li <tiny.windzz@...il.com>
Subject: Re: [PATCH 2/2] cpufreq: sun50i: replace of_node_put() with automatic
cleanup handler
…
> > > +++ b/drivers/cpufreq/sun50i-cpufreq-nvmem.c
> > > @@ -131,14 +131,14 @@ static const struct of_device_id cpu_opp_match_list[] = {
> > > static bool dt_has_supported_hw(void)
> > > {
> > > bool has_opp_supported_hw = false;
> > > - struct device_node *np;
> > > struct device *cpu_dev;
> > >
> > > cpu_dev = get_cpu_device(0);
> > > if (!cpu_dev)
> > > return false;
> > >
> > > - np = dev_pm_opp_of_get_opp_desc_node(cpu_dev);
> > > + struct device_node *np __free(device_node) =
> > > + dev_pm_opp_of_get_opp_desc_node(cpu_dev);
>
> Won't that result in build warning, mixed code and definitions now ?
I suggest to take another look at a corresponding information source.
[PATCH v3 04/57] kbuild: Drop -Wdeclaration-after-statement
https://lore.kernel.org/all/20230612093537.693926033@infradead.org/
See also:
https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/Warning-Options.html#index-Wdeclaration-after-statement
Would you like to stress a scope reduction for the affected local variable
by adding any curly brackets?
Regards,
Markus
Powered by blists - more mailing lists