From: Mark Brown <broonie@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH v1 2/5] regmap: mmio: Drop unneeded and duplicative checks around CLK calls
Date: Mon, 8 Aug 2022 14:02:49 +0100 [thread overview]
Message-ID: <YvEJefFk7bqW9EpZ@sirena.org.uk> (raw)
In-Reply-To: <20220805205321.19452-2-andriy.shevchenko@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 906 bytes --]
On Fri, Aug 05, 2022 at 11:53:18PM +0300, Andy Shevchenko wrote:
> The commit 6b8e090ecc3d ("regmap: use IS_ERR() to check clk_get()
> results") assumes that CLK calls return the error pointer when clock
> is not found. However in the current code the described situation
> is simply impossible, because the regmap won't be created with
> missed clock if requested. The only way when it can be the case is
> what the above mentioned commit introduced by itself, when clock is
> not provided.
> Taking above into consideration, effectively revert the commit
> 6b8e090ecc3d and while at it, drop unneeded NULL checks since CLK
> calls are NULL-aware.
I don't understand the supposed benefit of this. Yes, the clk API does
currently accept NULL as a valid clock and returns it as a dummy but
explicitly taking advantage of that in the way that this does just feels
more sloppy than the current behaviour.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-08-08 13:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 20:53 [PATCH v1 1/5] regmap: mmio: Don't unprepare attached clock Andy Shevchenko
2022-08-05 20:53 ` [PATCH v1 2/5] regmap: mmio: Drop unneeded and duplicative checks around CLK calls Andy Shevchenko
2022-08-08 13:02 ` Mark Brown [this message]
2022-08-08 13:43 ` Andy Shevchenko
2022-08-05 20:53 ` [PATCH v1 3/5] regmap: mmio: Remove mmio_relaxed member from context Andy Shevchenko
2022-08-05 20:53 ` [PATCH v1 4/5] regmap: mmio: Get rid of broken 64-bit IO Andy Shevchenko
2022-08-05 20:53 ` [PATCH v1 5/5] regmap: mmio: Introduce IO accessors that can talk to IO port Andy Shevchenko
2022-08-05 21:22 ` Andy Shevchenko
2022-08-08 13:18 ` Mark Brown
2022-08-08 14:40 ` Andy Shevchenko
2022-08-08 16:04 ` Mark Brown
2022-08-08 18:39 ` Andy Shevchenko
2022-08-08 13:07 ` [PATCH v1 1/5] regmap: mmio: Don't unprepare attached clock Mark Brown
2022-08-08 13:41 ` Andy Shevchenko
2022-08-08 13:48 ` Mark Brown
2022-08-08 14:42 ` Andy Shevchenko
2022-08-08 15:52 ` Mark Brown
2022-08-08 18:23 ` Andy Shevchenko
2022-08-08 19:01 ` Mark Brown
2022-08-15 17:42 ` (subset) " 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=YvEJefFk7bqW9EpZ@sirena.org.uk \
--to=broonie@kernel.org \
--cc=aidanmacdonald.0x0@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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