lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 22 Apr 2022 16:02:34 +0200
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     "Rafael J. Wysocki" <rafael@...nel.org>, Tom Rix <trix@...hat.com>,
        Daniel Lezcano <daniel.lezcano@...nel.org>
Cc:     Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] powercap/dtpm: move dtpm_subsys definition to dtpm.c

On 22/04/2022 15:56, Rafael J. Wysocki wrote:
> On Mon, Apr 18, 2022 at 8:08 PM Tom Rix <trix@...hat.com> wrote:
>>
>> Smatch reports this issue
>> dtpm_devfreq.c:200:24: warning: symbol 'dtpm_devfreq_ops'
>>    was not declared. Should it be static?
>>
>> dtpm_devfreq_ops is declared in dtpm_subsys.h where it
>> is also used
>>
>> extern struct dtpm_subsys_ops dtpm_devfreq_ops;
>> struct dtpm_subsys_ops *dtpm_subsys[] = {
>> ...
>>          &dtpm_devfreq_ops,
>>
>> Global variables should not be defined in header files.
>> This only works because dtpm.c is the only includer
>> of dtpm_subsys.h and user of dtpm_susys[].
>>
>> Move the definition of dtpm_subsys[] to dtpm.c and change
>> the storage-class specifier to static.
>>
>> Signed-off-by: Tom Rix <trix@...hat.com>
> 
> Daniel, any comments?
> 
> Or do you want to pick it up yourself?

Yes, I'll pick it

Thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ