The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>, linux-kernel@vger.kernel.org
Subject: [PATCH] x86/mm: Consolidate SME comments and use break
Date: Tue,  9 Jun 2026 13:30:17 +0200	[thread overview]
Message-ID: <20260609113016.296259-2-thorsten.blum@linux.dev> (raw)

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 <thorsten.blum@linux.dev>
---
 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 */

             reply	other threads:[~2026-06-09 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 11:30 Thorsten Blum [this message]
2026-06-09 14:23 ` [PATCH] x86/mm: Consolidate SME comments and use break Dave Hansen
2026-06-09 15:32   ` Thorsten Blum
2026-06-09 16:26     ` Dave Hansen

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=20260609113016.296259-2-thorsten.blum@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /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