From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 5E128248F64 for ; Wed, 11 Mar 2026 15:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773242159; cv=none; b=D/x+4IxY3oLZUubrXUDTR/00tIqQFeUEUB3WmLmlXH3hhUn1LoRPopijgrLWSOY2Ss6NiDMwBRBVh6toVww4TFKL7qKmVr8ya9kbadcqiyJM0FdJrOUavtxGynoEux7t4uOYNoJx7YQeyIfHzZ/K39IuJuQOI0sktfbNrokqJF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773242159; c=relaxed/simple; bh=w2u2fqQCsXaHAd/5KvZY3EHmmOjJ4tdQ0WgkzhuocX8=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Eb419A3o/6TrPpYzQ6j/935HFXHOrbGDSowAWlSu0RSx2+w7HlrlljPy7ITQmTC8oHBgZxUz1votDVTmQvtoD92UgdId+OGqlhwz44fOh0B9wlpIwh4BVRgFoX3dfmIoRSsa+q/XdkVVnw2eVwOUfyaoilDi/WObjUZLv0w2l6k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=UfItrZMN; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="UfItrZMN" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4853e1ce427so38741575e9.3 for ; Wed, 11 Mar 2026 08:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1773242157; x=1773846957; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:date:from:from:to:cc:subject:date :message-id:reply-to; bh=w2u2fqQCsXaHAd/5KvZY3EHmmOjJ4tdQ0WgkzhuocX8=; b=UfItrZMN1FSMl3TaCRNCVFLTZ8qYZZ9KVrr2IXaWTDv9UX3Q6SY0aOBu8oxaxTotM9 dPoSCAUXL0ORJG8kZEt4xJ6jKZn/6R0ayEeBfzzIOn9zi/aBhI1OYTG1A3jtVOe+/eT0 HFn55s8r/kQZRfTX9f5ykp3Cjc+WNFKXlT2MB1hrWCxckF1tBkTySSwiopTsNjStL/0F BmIyfuA79GIIS3/DHSo+4QdOZ/hV9LBieJVi0OidLJnctQuTKbvH6I95hSx6qgqDo/lO FMt0EJlGnmVX8kZs+lsMdxHdLo9qiFDv2AbhFCz1P6TT1YdYQ4lttPHz54zJT0r/Ut5Y 5RjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773242157; x=1773846957; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=w2u2fqQCsXaHAd/5KvZY3EHmmOjJ4tdQ0WgkzhuocX8=; b=wtBeu5nqPrIbDlo75KL1kLcM2RAvjYno9ZOzaymsy3uwZxNjtGzIggLpNEfIIzoI4G OPMNhGpi+29+Irs3wVOGjUkQlLt/KQ7HFzcCDfo1U/eiu+bmzZxzR5RAkrHegCAmycNh nRmWZtlv7TlezZ/B8JqOeyNSgazZJw4Q4OLyTwT1gLZOqjh+DOiQ5Z0nWBy4Rkq52XfI Ha//ylBj0vj0N2cl1uabiKrLzJTqCEpTv6N/Vk3OofQt3pCTqan5+2npFDbiQjRkGgAT K783kkGmvQTfTZXLtnBQmgXzWHIGOLG742XB8T9CMbzBWqA4us4suOig+K3Ri5DKjhrb DiDQ== X-Forwarded-Encrypted: i=1; AJvYcCW7f+QWN/JjHlxsjFEQiW0n2ZIwTse3b/ahJ6sfqV8zVVLzMUHHNfKP5OQ4Y48mo7t81CkGCMeJJ/zlkyA=@vger.kernel.org X-Gm-Message-State: AOJu0YwDAx1/OWEJBIZaPdQhgh4FkPkG0M0528wTAulU95Lbbubv9W3U tc5dByXgDG9ZrWwnFUpUaBL5IyLtV68kqFLtdjaFawPyqhtTmK2nX2TzqWtGO5kFF1s= X-Gm-Gg: ATEYQzw8DLCUws1cXuRb9xT9YKHQPtEYndrA9L+emFw4HZ1CrHzDl9PoD2XBz3i9nul ub4RJr//tJ7LPW+EHXTR8L9bSdlFxVDSRRfptdjLLcwCKm0XRILKV7+FjHZU09vw68WqQAswDCw LYYvtIKcR4dXs3mbNMt/DiGNyK2VYABhJDbcmdt613hCVEvvZ8hl9DG5w54xpplseVhS59+srmj YOupNRcl8Gm+JQgwRwcHQrZzRofA7WMEisO4cPAC7VTjaaFvcAaDts3ahqxUIcHzPvHFeXuBJqM tKFIiFFtGqmalU/ApywjL6T5oYu4rnDNU2PEXb5M6SQhG0kG9dysFJRWB2CoRL4/veHpVs4IUlv ta9oduxDwyLRB4Vnm8UNliu9jKAWiPo23hRFh90hxumahtMw94qRbkSxjta0uRILn9GSw7S0Q/X wFWqE2x4vYfFPdL46w4jN5FMtXPx+9aww08OpkrDVVhG0= X-Received: by 2002:a05:600c:1f87:b0:485:3fd1:9936 with SMTP id 5b1f17b1804b1-4854b0a4a9dmr49458945e9.5.1773242156685; Wed, 11 Mar 2026 08:15:56 -0700 (PDT) Received: from r1chard (1-164-69-22.dynamic-ip.hinet.net. [1.164.69.22]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c73cdf254acsm2823498a12.11.2026.03.11.08.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2026 08:15:55 -0700 (PDT) From: Richard Lyu X-Google-Original-From: Richard Lyu Date: Wed, 11 Mar 2026 23:15:50 +0800 To: Dave Hansen Cc: Richard Lyu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/apic/msi: Use guard(mutex) in dmar_get_irq_domain() Message-ID: References: <20260311145944.85399-1-richard.lyu@suse.com> <697cdfdc-027a-4170-b31f-349cb01dd1d0@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <697cdfdc-027a-4170-b31f-349cb01dd1d0@intel.com> User-Agent: Mutt/2.2.13 (2024-03-09) On 2026/03/11 08:03, Dave Hansen wrote: >On 3/11/26 07:59, Richard Lyu wrote: >> The dmar_get_irq_domain() function uses a mutex to protect the >> initialization of the dmar_domain. Using guard(mutex) simplifies the >> control flow, removes the need for a 'out' label, and ensures the >> lock is automatically released regardless of the return path. > >I think these are kinda like whitespace fixes: If you're fixing a bug or >otherwise refactoring the code, go right ahead and convert over to >guard(). Otherwise, they're not worth the code churn. Thank you for the feedback. That makes total sense. I understand the concern about unnecessary code churn and will avoid sending pure stylistic cleanups unless they are part of a larger functional change or bug fix in the future. Richard