Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Marc Gonzalez <mgonzalez@freebox.fr>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Arnaud Vrac <avrac@freebox.fr>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	intel-xe@lists.freedesktop.org,
	Nathan Chancellor <nathan@kernel.org>,
	Rob Clark <robdclark@gmail.com>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 7/8] drm/msmi: annotate pll_cmp_to_fdata() with __maybe_unused
Date: Wed, 11 Sep 2024 13:23:23 +0300	[thread overview]
Message-ID: <878qvyjxpg.fsf@intel.com> (raw)
In-Reply-To: <19ac4e25-7609-4d92-8687-585c6ea00c79@freebox.fr>

On Tue, 10 Sep 2024, Marc Gonzalez <mgonzalez@freebox.fr> 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@intel.com>
>> 
>> 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.

BR,
Jani.


>
> Regards
>
>
>>> ---
>>>  drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
>>> index 0e3a2b16a2ce..c0bf1f35539e 100644
>>> --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
>>> +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
>>> @@ -153,7 +153,7 @@ static inline u32 pll_get_pll_cmp(u64 fdata, unsigned long ref_clk)
>>>  	return dividend - 1;
>>>  }
>>>  
>>> -static inline u64 pll_cmp_to_fdata(u32 pll_cmp, unsigned long ref_clk)
>>> +static inline __maybe_unused u64 pll_cmp_to_fdata(u32 pll_cmp, unsigned long ref_clk)
>>>  {
>>>  	u64 fdata = ((u64)pll_cmp) * ref_clk * 10;
>>>  
>>> -- 
>>> 2.39.2
>
>

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-09-11 10:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1725962479.git.jani.nikula@intel.com>
2024-09-10 10:03 ` [PATCH 7/8] drm/msmi: annotate pll_cmp_to_fdata() with __maybe_unused Jani Nikula
2024-09-10 14:51   ` Dmitry Baryshkov
2024-09-10 15:54     ` Marc Gonzalez
2024-09-11 10:23       ` Jani Nikula [this message]
2024-09-12 10:56         ` Marc Gonzalez
2024-09-12 11:15           ` Jani Nikula
2024-09-12 12:14             ` Marc Gonzalez
2024-09-12 12:28               ` Dmitry Baryshkov
2024-09-12 12:50                 ` Marc Gonzalez
2024-09-12 13:05                   ` Dmitry Baryshkov
2024-09-12 13:10                     ` Jani Nikula
2024-09-21 21:16         ` Dmitry Baryshkov
2024-09-23  6:38           ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878qvyjxpg.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=avrac@freebox.fr \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=mgonzalez@freebox.fr \
    --cc=nathan@kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox