From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0C6A3EFD0B for ; Thu, 18 Jun 2026 11:09:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781780943; cv=none; b=ifxDI3McULPRxDhoHmUb7LcGYvHv25Zrod12gsvX2wEQY5BSHrN4e4b/yVKXW9RFMskhnA6wOQ/y6pN+sw7+Hg8/COtO/GrMtnGvuH/wUW7SSP1H+s47Ip4Ot6/PNsgMJyKDN/2At+WnwNRx9eQjQh11NuPMP1k2kn8P5rclEkI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781780943; c=relaxed/simple; bh=3k5ocHDAte/5Y9dBudXlQ2zklcKkxOUMN9JvPLnupMc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SF5+wtTEAWNfQ0g5y7eFET6lzaWy9pNnzZb6JsO6MqG/f7Xzs749dAAHtcufMp+ASdTATiwCfIlFLk+w3Sx8lhq9KolHWGd1c590WyivAYhcXP+SdkyK4dXj1/F62BVfQxz35TlGl+AzSVoAe+UKUD6v3hwYaS6v9H7YHbJ0vLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UFY0cApE; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UFY0cApE" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2c6bdb8a8bdso5158275ad.1 for ; Thu, 18 Jun 2026 04:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781780942; x=1782385742; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qgwBmSSCggFVLUhXUYpfKHZun58CwgxvexKdy5tq5OA=; b=UFY0cApEvc0Gu4CfbSBeLzMwDUPNdhSzOxXgnPi02GrbjLHBk93pdIRszSs7XZrN3L DIaZYxTXZxtSuq4AYgBXOMg/wkb50B39F5FyKRNsdjdrrmxE3GhcIvp+dottfuGRU38O A+mLLIyyz+uDrde4Cxm/Hiu0gmTVixyqYY52Mm5xoCVH18uH8Jh/Y/pbcCt0hM/uH1p/ iIVlPrfdloyfwGOkPt1PjrCkci7H4ZvwYEoHivv+kQqAGuJaXGrxDPfgtBxL+k2oklg/ nvI9zVZjg4noxx/G/03zjmaRlTxDOYsKLwGilC/F3qbtDxC7jdOBvH2PXi2ITejWdLZP FVSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781780942; x=1782385742; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qgwBmSSCggFVLUhXUYpfKHZun58CwgxvexKdy5tq5OA=; b=VtGKLowlco+sLP/2sG/WqP5uVku48MgrJc667MKU7xt3YqC+fzTnAmhP6uvSrWklTj yjVXb8sJPC+4lecrjvISYMZA3Ws0K4hUnp9NBu3acDn1LUUeimfwBEXCmIsnUMAHK52W bmd6aLXWwpI+gVPzh3lcjbSxum5OMXDMxD+DDUhs7/ouJL6ab/Gdyw+iTxcqRxUabk4V ChMWjZa3Ny+CrO9IxN+nqfrNR7H3WLGS0keWYpnOUH3s3faYVk0gORFqrca1JrW3ZmSn RhbzcZ+DveZSZ9Pm5YYW/7nX1gTQrWfPyualHNLdY/REYPfEXZCgFHVxLBzZBtpyqp82 /5Jg== X-Forwarded-Encrypted: i=1; AFNElJ8irHqTF6bO/SkXS9IvViYhC9asTDk77c+m5iG9BU7B5VDs+u2WDxAydKEtkW2MK1Ld9Y5Vh/EJVtfcGhM=@vger.kernel.org X-Gm-Message-State: AOJu0YwyrOyfHEQdyJScH4g/BKM/GWcQdn7kL/V2PqOxTgm3Em44TJQz Wanfw7Jb8n4sfOIMHpXLxbHqklwiChMwtwqrhphOif3Z/So5gKpiCSpH X-Gm-Gg: AfdE7cmJ9Cr4kLvwJQkOz/vYanymHjPB8Ll8yybOGN96FmA6kDPKE/YQ8dj/KmLlMII XwUzMxT7ACSDIvCV6UYsza4IcX6ZIz0rdXM0fb3SvSDoRGD5W0PGEy+SWbsJgVgYj7ZUAVjfsAP tSvN2cNRel77jl6zwdzv3Ad6SjhKvg0BWYkAG8rHXrUFGOnXSykLL0xsgHcIJ2Bq90cQaQ4lq7k 1P6KDr1Kss9OqsNvbkSW+rEIc59pvry17JjMg0pmCvLitZeuUNnyM8Whp2nuD0aHDjPDcsK8IZ/ egnIwH5wyM2s1NK4+1bMiZ2BdWlH7gQI0aYG5qSthSDZV5JeAt1GzvJp0/H8Ad9j4yM1HTCxM7W DTpDAHdgUbWzMrYGxGqS/xAQUCLZChstdDQ9k52ZyZrfkZMUlOng5CBdjeW7XvNJd0/X2YLNc1U S+LVFwhKnWN0wacHpkNo4m+7v1+zlH7giO3IkBL13IpJSEqhc= X-Received: by 2002:a17:903:2a83:b0:2c6:ab74:985e with SMTP id d9443c01a7336-2c6bc24997bmr85186495ad.25.1781780942104; Thu, 18 Jun 2026 04:09:02 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c42f1f0f19sm196384565ad.10.2026.06.18.04.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2026 04:09:01 -0700 (PDT) From: phucduc.bui@gmail.com To: Mark Brown Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Cheng-Yi Chiang , Tzung-Bi Shih , Guenter Roeck , Benson Leung , David Rhodes , Richard Fitzgerald , povik+lin@cutebit.org, Charles Keepax , Support Opensource , Nick Li , Herve Codina , Srinivas Kandagatla , Matthias Brugger , AngeloGioacchino Del Regno , Shenghao Ding , Kevin Lu , Baojun Xu , Sen Wang , Oder Chiou , Lars-Peter Clausen , nuno.sa@analog.com, Steven Eckhoff , patches@opensource.cirrus.com, chrome-platform@lists.linux.dev, asahi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, bui duc phuc Subject: [PATCH 58/78] ASoC: codecs: tas675x: Use guard() for mutex locks Date: Thu, 18 Jun 2026 18:08:07 +0700 Message-ID: <20260618110827.232983-2-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260618110827.232983-1-phucduc.bui@gmail.com> References: <20260617103235.449609-1-phucduc.bui@gmail.com> <20260618110827.232983-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc Clean up the code using guard() for mutex locks. Merely code refactoring, and no behavior change. Signed-off-by: bui duc phuc --- sound/soc/codecs/tas675x.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/tas675x.c b/sound/soc/codecs/tas675x.c index 6f89a422f3c6..c44bf9144e44 100644 --- a/sound/soc/codecs/tas675x.c +++ b/sound/soc/codecs/tas675x.c @@ -162,7 +162,7 @@ static int tas675x_dsp_mem_write(struct tas675x_priv *tas, u8 page, u8 reg, u32 * DSP regs in a different book, therefore block * regmap access before completion. */ - mutex_lock(&tas->io_lock); + guard(mutex)(&tas->io_lock); ret = __tas675x_select_book(tas, TAS675X_BOOK_DSP); if (ret) @@ -176,7 +176,6 @@ static int tas675x_dsp_mem_write(struct tas675x_priv *tas, u8 page, u8 reg, u32 out: __tas675x_select_book(tas, TAS675X_BOOK_DEFAULT); - mutex_unlock(&tas->io_lock); return ret; } @@ -191,7 +190,7 @@ static int tas675x_dsp_mem_read(struct tas675x_priv *tas, u8 page, u8 reg, u32 * * DSP regs in a different book, therefore block * regmap access before completion. */ - mutex_lock(&tas->io_lock); + guard(mutex)(&tas->io_lock); ret = __tas675x_select_book(tas, TAS675X_BOOK_DSP); if (ret) @@ -211,7 +210,6 @@ static int tas675x_dsp_mem_read(struct tas675x_priv *tas, u8 page, u8 reg, u32 * out: __tas675x_select_book(tas, TAS675X_BOOK_DEFAULT); - mutex_unlock(&tas->io_lock); return ret; } -- 2.43.0