Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: phucduc.bui@gmail.com
Cc: peter.ujfalusi@gmail.com, lgirdwood@gmail.com, perex@perex.cz,
	tiwai@suse.com, jarkko.nikula@bitmer.com,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 7/7] ASoC: ti: omap-mcbsp: Simplify lock and resource handling
Date: Sun, 10 May 2026 10:35:23 +0900	[thread overview]
Message-ID: <af_g24kqkm4QhDuU@sirena.co.uk> (raw)
In-Reply-To: <20260508103837.138142-8-phucduc.bui@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 583 bytes --]

On Fri, May 08, 2026 at 05:38:37PM +0700, phucduc.bui@gmail.com wrote:

> Convert spinlock protected sections to guard()/scoped_guard()
> helpers and simplify the cleanup paths, including the
> reg_cache lifetime handling in omap_mcbsp_request().

>  static int omap_mcbsp_request(struct omap_mcbsp *mcbsp)
>  {
> -	void *reg_cache;
> +	void *reg_cache __free(kfree) = kzalloc(mcbsp->reg_cache_size, GFP_KERNEL);

> +	scoped_guard(spinlock, &mcbsp->lock) {

This function now mixes scoped and goto based cleanup which cleanup.h
warns us not to do - are you sure this is a good idea?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-05-10  1:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 10:38 [PATCH 0/7] ASoC: ti: Cleanup locking code using guard() helpers phucduc.bui
2026-05-08 10:38 ` [PATCH 1/7] ASoC: ti: j721e-evm: Use guard() for mutex locks phucduc.bui
2026-05-08 10:38 ` [PATCH 2/7] ASoC: ti: omap-dmic: " phucduc.bui
2026-05-08 10:38 ` [PATCH 3/7] ASoC: ti: omap-hdmi: " phucduc.bui
2026-05-08 10:38 ` [PATCH 4/7] ASoC: ti: omap-mcpdm: " phucduc.bui
2026-05-08 10:38 ` [PATCH 5/7] ASoC: ti: ams-delta: Use guard() for spin locks phucduc.bui
2026-05-08 10:38 ` [PATCH 6/7] ASoC: ti: omap-mcbsp-st: " phucduc.bui
2026-05-09 12:26   ` Jarkko Nikula
2026-05-08 10:38 ` [PATCH 7/7] ASoC: ti: omap-mcbsp: Simplify lock and resource handling phucduc.bui
2026-05-10  1:35   ` Mark Brown [this message]
2026-05-11  4:44     ` Bui Duc Phuc
2026-05-09 12:28 ` [PATCH 0/7] ASoC: ti: Cleanup locking code using guard() helpers Jarkko 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=af_g24kqkm4QhDuU@sirena.co.uk \
    --to=broonie@kernel.org \
    --cc=jarkko.nikula@bitmer.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@gmail.com \
    --cc=phucduc.bui@gmail.com \
    --cc=tiwai@suse.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