From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Cezary Rojewski <cezary.rojewski@intel.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH v1 1/1] ASoC: Intel: cht_bsw_rt5672: Drop unneeded NULL checks
Date: Tue, 28 Apr 2026 13:07:22 +0300 [thread overview]
Message-ID: <afCG2hkbC7c6mCxZ@ashevche-desk.local> (raw)
In-Reply-To: <afBx2D_hwLccJj3v@sirena.co.uk>
On Tue, Apr 28, 2026 at 05:37:44PM +0900, Mark Brown wrote:
> On Tue, Apr 28, 2026 at 11:16:56AM +0300, Andy Shevchenko wrote:
> > On Tue, Apr 28, 2026 at 05:07:39PM +0900, Mark Brown wrote:
>
> > > There's also the fact that as part of support for optional clocks the
> > > clock API will quite happily consume NULL clocks.
>
> > This clock is not optional, it's always retrieved with devm_clk_get().
> > When the flow runs into these code pieces the mclk != NULL, and always
> > valid (excluding some unrelated to this driver strange data corruption cases,
> > of course).
>
> > But yes, the CCF APIs are NULL-aware for a long time.
>
> My point is that it makes no difference if the caller does the NULL
> check.
The dead code or always-true one is not welcome in the kernel, it increases
unneeded burden on maintaining and understanding. While your point is correct
the lesser the code base the better. I don't believe we ever get this clock
become conditional (optional) again.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-04-28 10:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 7:47 [PATCH v1 1/1] ASoC: Intel: cht_bsw_rt5672: Drop unneeded NULL checks Andy Shevchenko
2026-04-28 8:07 ` Mark Brown
2026-04-28 8:16 ` Andy Shevchenko
2026-04-28 8:37 ` Mark Brown
2026-04-28 10:07 ` Andy Shevchenko [this message]
2026-04-28 23:17 ` Mark Brown
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=afCG2hkbC7c6mCxZ@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=ranjani.sridharan@linux.intel.com \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.com \
/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