File 0002-kernel-config-put-braces-around-debug-stmnt.patch of Package mhvtl

From 4d4ee09b0e4c29e9992db6185509c65e472bd360 Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Tue, 3 Jun 2025 10:52:48 -0700
Subject: [PATCH 2/4] kernel config: put braces around debug stmnt

In some cases this code:

>	if (cmd)
>		MHVTL_DBG_PRT_CDB(1, serial_number, cmd, SCpnt->cmd_len);

Can causee issues because the debug macro translates to being empty.
So put braces around the debug print statement.

Signed-off-by: Lee Duncan <lduncan@suse.com>
---
 kernel/mhvtl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/mhvtl.c b/kernel/mhvtl.c
index 6e1b707bdb4e..983d7db91e23 100644
--- a/kernel/mhvtl.c
+++ b/kernel/mhvtl.c
@@ -597,8 +597,9 @@ static int _mhvtl_queuecommand_lck(struct scsi_cmnd *SCpnt, done_funct_t done)
 	if (done == NULL)
 		return 0;	/* assume mid level reprocessing command */
 
-	if (cmd)
+	if (cmd) {
 		MHVTL_DBG_PRT_CDB(1, serial_number, cmd, SCpnt->cmd_len);
+	}
 
 	if (SCpnt->device->id == mhvtl_driver_template.this_id) {
 		pr_err("initiator's id used as target!\n");
-- 
2.43.0

openSUSE Build Service is sponsored by