[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c51c360e-a73f-9333-ffa1-3461de29f41f@linaro.org>
Date: Fri, 12 Aug 2022 21:41:22 +0300
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Florian Fainelli <f.fainelli@...il.com>,
linux-kernel@...r.kernel.org
Cc: Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
"moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>
Subject: Re: [PATCH v3 3/3] memory: Add Broadcom STB memory controller driver
On 12/08/2022 20:52, Florian Fainelli wrote:
>>> unless you also implied enclosing those functions under an #if
>>> IS_ENABLED(CONFIG_PM) or something which is IMHO less preferable.
>>
>> Are you sure you added also pm_ptr()? I don't see such warnings with W=1
>> and final object does not have the functions (for a different driver but
>> same principle).
>
> Yes I am sure I added pm_ptr() see the v4 I just submitted. I don't see
> how the compiler cannot warn about the functions being unused the day
> they stop being referenced by the pm_ops structure which is eliminated?
I don't have the answer how it exactly works (or which gcc version
introduced it), but I tested it and the functions were not present in
the object file, thus of course no warnings.
The driver change I am referring to is:
https://lore.kernel.org/all/20220808174107.38676-15-paul@crapouillou.net/
I think the only difference against your v4 is:
DEFINE_SIMPLE_DEV_PM_OPS
and lack of __maybe_unused on the functions.
The DEFINE_SIMPLE_DEV_PM_OPS itself adds __maybe_unused for !CONFIG_PM
case, but I don't think it is relevant.
Best regards,
Krzysztof
Powered by blists - more mailing lists