From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45C4D32B114 for ; Tue, 9 Jun 2026 11:30:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781004639; cv=none; b=JoK/Ep4XOw/HfLaQTs3d69Ety65y5Ff3Rv6aGTK2fEV0iVqAa7UXVP9Fpc4+cxxq2oOY1Z4y30exvuosq139iTn7qQ/p+gZBTobuQGTVS2/jrlgQ7TgwRsvh3nuFTk8ANFmTsLhSPxWJWa1jUVpM5vCktDRgMUFUfyK0N0qLqKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781004639; c=relaxed/simple; bh=D9NkLtrAQDJaaAc6y6CoEbmoTUScxmtsUJ699iwJmHI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QJXgF/WJybgYFhs59dg4qCN1PIi8wjIcOEf+8mAHWLhUSBNcvEM9kQHD0NNP8sAQPb6f2ppJ6st+BKaeogUoYr8OqQTewptZLgjwCujuwLT1i9m8eVeflnMJeZLevoC3VmpT+IQQZ/edGqUe4T6tVd//rTzB/yi5fDRkcZJQQoM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=RtcpptYy; arc=none smtp.client-ip=95.215.58.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="RtcpptYy" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1781004635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Wf5QPyusLAX6lvY5Ks2JyLSxHUOqx4JJu5ARKVfla9Y=; b=RtcpptYyF5T3mKdDpvOvLZNqECYUFd040AqXgNkUkgv5DINTByIXnKtdb7iLqeZ2fLhA32 KFK2pDByk4886R29dGRjG/i4GPLknKtfFREB7LuxrS4l96shjOzTylwnGvWC+LhgWb0HD9 jnlEc6y0ROACI7DAZh2+uL8B1JcYCUk= From: Thorsten Blum To: Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" Cc: Thorsten Blum , linux-kernel@vger.kernel.org Subject: [PATCH] x86/mm: Consolidate SME comments and use break Date: Tue, 9 Jun 2026 13:30:17 +0200 Message-ID: <20260609113016.296259-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1004; i=thorsten.blum@linux.dev; h=from:subject; bh=D9NkLtrAQDJaaAc6y6CoEbmoTUScxmtsUJ699iwJmHI=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFnqPz3uKm1llf2lZhkzo/C7x664377fns89K2J78FP45 J2ShQp5HaUsDGJcDLJiiiwPZv2Y4VtaU7nJJGInzBxWJpAhDFycAjCRrVsZGd42i/rJPDhnJLNJ uyVFz85kWVeyqZPzGm5tbs6od+9uHGX4X8ZoLH/12d9XfyUzC3vlTS1bDixNuSUdeGzbDIuP524 e5AIA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Combine the two SME comments and use break instead of return to exit the switch consistently with the other cases. Signed-off-by: Thorsten Blum --- arch/x86/mm/mem_encrypt.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c index 95bae74fdab2..c6bab01a5db8 100644 --- a/arch/x86/mm/mem_encrypt.c +++ b/arch/x86/mm/mem_encrypt.c @@ -53,14 +53,13 @@ static void print_mem_encrypt_feature_info(void) case CC_VENDOR_AMD: pr_cont("AMD"); - /* Secure Memory Encryption */ - if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT)) { /* - * SME is mutually exclusive with any of the SEV - * features below. - */ + * Secure Memory Encryption is mutually exclusive with + * any of the SEV features below. + */ + if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT)) { pr_cont(" SME\n"); - return; + break; } /* Secure Encrypted Virtualization */