On 11/09/2024 12:23, Jani Nikula wrote: > On Tue, 10 Sep 2024, Marc Gonzalez <mgonzalez@xxxxxxxxxx> wrote: >> On 10/09/2024 16:51, Dmitry Baryshkov wrote: >>> On Tue, Sep 10, 2024 at 01:03:43PM GMT, Jani Nikula wrote: >>> >>>> Building with clang and and W=1 leads to warning about unused >>>> pll_cmp_to_fdata(). Fix by annotating it with __maybe_unused. >>>> >>>> See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static >>>> inline functions for W=1 build"). >>>> >>>> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> >>> >>> I think this function can be dropped. Marc, your call, as an author of >>> the patch? >> >> ( Why is the patch prefixed "drm/msmi", is "msmi" a typo? ) > > Whoops, a typo. > >>> For the record, Arnaud is the driver's author. >> >> pll_cmp_to_fdata() was used in hdmi_8998_pll_recalc_rate() >> in a commented code block which was later removed. >> >> Thus, yes, it is safe to completely delete the unused function. >> I'm surprised gcc didn't catch that... > > Thanks, I'll change this to drop the function. > > GCC doesn't catch unused static inlines, while Clang does. It makes no sense to me that adding "inline" would prevent GCC from diagnosing the issue... GCC should simply ignore the "inline" keyword when definition is not in a header file (maybe they don't store "origin"). Regards