mbox series

[0/6] ASoC: codecs: Simplify mclk initialization

Message ID 20240221152516.852353-1-cezary.rojewski@intel.com
Headers show
Series ASoC: codecs: Simplify mclk initialization | expand

Message

Cezary Rojewski Feb. 21, 2024, 3:25 p.m. UTC
The patchset may not cover all codecs found in the codecs/ directory -
noticed a possible improvement and grepped for similar pattern across C
files found in the directory. Those addressed here seem pretty
straightforward.

Most of clk_xxx() functions do check if provided clk-pointer is
non-NULL. These do not check if the pointer is an error-pointer.
Providing such to a clk_xxx() results in a panic.

By utilizing _optional() variant of devm_clk_get() the driver code is
both simplified and more robust. There is no need to remember about
IS_ERR(clk) checks each time mclk is accessed.

Cezary Rojewski (6):
  ASoC: codecs: da7213: Simplify mclk initialization
  ASoC: codecs: nau8825: Simplify mclk initialization
  ASoC: codecs: rt5514: Simplify mclk initialization
  ASoC: codecs: rt5616: Simplify mclk initialization
  ASoC: codecs: rt5640: Simplify mclk initialization
  ASoC: codecs: rt5660: Simplify mclk initialization

 sound/soc/codecs/da7213.c  | 12 ++++--------
 sound/soc/codecs/nau8825.c | 12 ++++--------
 sound/soc/codecs/rt5514.c  |  9 +++------
 sound/soc/codecs/rt5616.c  |  9 +++------
 sound/soc/codecs/rt5640.c  |  9 +++------
 sound/soc/codecs/rt5660.c  |  9 +++------
 6 files changed, 20 insertions(+), 40 deletions(-)

Comments

Mark Brown Feb. 26, 2024, 7:28 p.m. UTC | #1
On Wed, 21 Feb 2024 16:25:10 +0100, Cezary Rojewski wrote:
> The patchset may not cover all codecs found in the codecs/ directory -
> noticed a possible improvement and grepped for similar pattern across C
> files found in the directory. Those addressed here seem pretty
> straightforward.
> 
> Most of clk_xxx() functions do check if provided clk-pointer is
> non-NULL. These do not check if the pointer is an error-pointer.
> Providing such to a clk_xxx() results in a panic.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/6] ASoC: codecs: da7213: Simplify mclk initialization
      commit: e2cb72d28740516cb03fa072e14b2f1a6eceef61
[2/6] ASoC: codecs: nau8825: Simplify mclk initialization
      commit: 71d322fd16a3a62d32a9e6a8d08f48e8a945a515
[3/6] ASoC: codecs: rt5514: Simplify mclk initialization
      commit: 67e9bf093372a070f67f85a6ffceb6a44d4cfcf4
[4/6] ASoC: codecs: rt5616: Simplify mclk initialization
      commit: f76de61ad1eb725cc05727377ccd4adda336b822
[5/6] ASoC: codecs: rt5640: Simplify mclk initialization
      commit: 6413849b678b04e30b5c938e344e653c31a5f73b
[6/6] ASoC: codecs: rt5660: Simplify mclk initialization
      commit: bf900c85f8a4ef47b868b6345879e35826a4fec1

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark