From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (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 791EF3EFD26 for ; Thu, 11 Jun 2026 11:59:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781179195; cv=none; b=JEcvTLTxCLyfYofV9wptnIbVWmZnx6mJHcxIqA2O2ccXAvRCB57AOQbUnBQ2+nzcPD0XU/ugGqyJTM46yRFTqJ3UnEJE+zOperaDBbw3X1Xf9ZUPSu5p4nV/jZGmKbjqGaiJMQ+/MkaSRif/STPnIA9z89Q+K8TjmD6HruJPUc4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781179195; c=relaxed/simple; bh=f93t3KPA+wyLo9wjgzE1RphXD2VIPXSpohzjt6hMGS8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zhp2l5J1j4U0078c7RF3tjaHN26/RoAQrqte8QTCDhtD+mTCjYnc+0bydbzk47tTxLiyZa8pcFT7smSUYKKwCIkgmYXk0yUVhPhnthWMC5gDxCD8W0uFfiKdaQsDrux55xZXARkcMDSA4hYU2de86XyNfjCX4cIOkm561pUPFSw= 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=cydqoThf; arc=none smtp.client-ip=209.85.216.43 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="cydqoThf" Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-36dac5d5da0so4039210a91.2 for ; Thu, 11 Jun 2026 04:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781179194; x=1781783994; 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=AcmaDQ8+KfB4e6m7++JXwBYQ7R8p81AkALQ3xv9FnR0=; b=cydqoThfv0ixktaorKzCVQTz61IBhHNpRtLdauY5EJ+pmWwbJZpza53nwp770f2CEe fXEIYUVh+dLhqH0ShGwBGu1KFBKkfZepCWv4UwYVuSGtg89FyKVmGkSeEDbCsr+f+dk+ gFVmS72Gjhp3fjQBovhc9RsFK0BpsqZwPHWVjPMoDwVHDlD2QuhgEVX1g/6sY8WjHq+m sAfdL10FoFK9qRsEyGUU1uwZmG4Iysb/zXqdEha00v6rq7g3T7fMk/sz+E6mb7KiJVrY fOZrPk5GrZABCUwCzx9+DKJjs8GU5qiUl2Bj8iXugZtHwkRtexMqX/fbyxK4lfExZKuo cYhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781179194; x=1781783994; 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=AcmaDQ8+KfB4e6m7++JXwBYQ7R8p81AkALQ3xv9FnR0=; b=I2I0AZrl+KrilRJsNCxyopUA0gd8ZrySQG9qh9Jo3nR+qIEeVGHi1Wt2Y2uzEMKsxU NjNV3zx1evQEPR+ZhvhvGKvDsesDUoL4M+PDYws8s/PoIQhcqKzzlmFbJCkiuEa4VDgN Hk3Yb+hZFxa+j7n3Kh78HJx5dNL8CntrpzhGKZq6EHUOJ6Xn5x7dLGQUYZJm/p5ivVEE nSCAjvaXK+aO3gJBzgAcwUrWhwrf/uZzcjXPBOzlot9Ria2QXrzibA3UZdTU64dSPLOP FeAU8EluVsI/MTacuFAJP35wXCzSf3rR/m2R1rgUq6ZFj6uvtWN4FaP2KoQm9kSce2gO GT6A== X-Forwarded-Encrypted: i=1; AFNElJ8rfe+dIiXhupxtSQRBvW5a7VPA9ai3AD/fzXn10NZZoKU2m3+gC+Vhe0Us8iJ07BOhTEUddFbsCtsSvdQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yw9iNu0TYBwH5Rox2IhaJYhtUDBhFoiBFBOfyRjnJImLWNJqlBb WgKSRI3Wu9MchIfDX5ethc7O3o60sHe4oFZjMEoYQdpl6as8a4h8fi+g X-Gm-Gg: Acq92OExNffUnhGDAep3tYIYCJckC9rwxXwQ/CaKULxeiQvLlO8eu3ewaYFwDK39ayW doQ+4rTqjLqT9ejaGR9Q6iMvlIi2FIBsMOhnjHs/qeSl3G6XEFgzOS6WFMWYJx86nWlbBLJdQR/ 6II6SFfKj9+cWYF38FUNqaqcmBXZcCBh+Qv+Vhxnhc40McTQpfIhA6qfuRTeSHTob9H98QdqELo dcFNeQmngRbUoOAie/Vu8BN6VhfTJzkcUuAWsnxPAT/zub8W7FIjffFm2d/irrksy+ZwkTzmbyt zvikNusKgQfzhLZYM3stDbMQpKm4nvNwmlSKN8LdYq37+sTi8+MtCVmEcYp1BmRsEeLyWLiyk2h yooHnD20Q+I9l3rsTJEHpVfiLAO2UZLyM6frEZqin25iASWEpoZobH9zmJOcRNrJW8BeDK9YJFI ZVxJmmJGM853U1VaqybHEih3CulZwP/V8x81CEZ+D+m2eCTW+xSMxD2IKYMMRH3F6O0T98 X-Received: by 2002:a17:90b:2d92:b0:36d:649a:39f7 with SMTP id 98e67ed59e1d1-377a8dbbcc4mr3125965a91.22.1781179193958; Thu, 11 Jun 2026 04:59:53 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-37753d02ca4sm2499692a91.12.2026.06.11.04.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 04:59:53 -0700 (PDT) From: phucduc.bui@gmail.com To: Mark Brown , Liam Girdwood , Cezary Rojewski Cc: Jaroslav Kysela , Takashi Iwai , Peter Ujfalusi , Bard Liao , Kai Vehmanen , Pierre-Louis Bossart , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH 09/20] ASoC: Intel: avs: icl: Use guard() for spin locks Date: Thu, 11 Jun 2026 18:58:50 +0700 Message-ID: <20260611115901.80438-10-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260611115901.80438-1-phucduc.bui@gmail.com> References: <20260611115901.80438-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 spin locks. Merely code refactoring, and no behavior change. Signed-off-by: bui duc phuc --- sound/soc/intel/avs/icl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sound/soc/intel/avs/icl.c b/sound/soc/intel/avs/icl.c index d655e727bebd..4d425846b56e 100644 --- a/sound/soc/intel/avs/icl.c +++ b/sound/soc/intel/avs/icl.c @@ -166,15 +166,13 @@ int avs_icl_load_basefw(struct avs_dev *adev, struct firmware *fw) snd_hdac_chip_updateb(bus, VS_LTRP, AZX_REG_VS_LTRP_GB_MASK, ICL_VS_LTRP_GB_ICCMAX); - spin_lock(&bus->reg_lock); - snd_hdac_stream_start(hdac_stream(host_stream)); - spin_unlock(&bus->reg_lock); + scoped_guard(spinlock, &bus->reg_lock) + snd_hdac_stream_start(hdac_stream(host_stream)); ret = avs_hda_load_basefw(adev, fw); - spin_lock(&bus->reg_lock); - snd_hdac_stream_stop(hdac_stream(host_stream)); - spin_unlock(&bus->reg_lock); + scoped_guard(spinlock, &bus->reg_lock) + snd_hdac_stream_stop(hdac_stream(host_stream)); snd_hdac_dsp_cleanup(hdac_stream(host_stream), &dmab); -- 2.43.0