lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251107123435.1434-1-darshanrathod475@gmail.com>
Date: Fri,  7 Nov 2025 12:34:34 +0000
From: Darshan Rathod <darshanrathod475@...il.com>
To: linux@...linux.org.uk,
	James.Bottomley@...senPartnership.com,
	martin.petersen@...cle.com
Cc: linux-arm-kernel@...ts.infradead.org,
	linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Darshan Rathod <darshanrathod475@...il.com>
Subject: [PATCH] scsi/arm: Clean up coding style violations

Addressed checkpatch warnings by separating assignment from a conditional
statement and documenting the empty for loop. These updates improve code
clarity and maintain style consistency.

No functional change intended.

Signed-off-by: Darshan Rathod <darshanrathod475@...il.com>
---
 drivers/scsi/arm/msgqueue.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/arm/msgqueue.c b/drivers/scsi/arm/msgqueue.c
index 58115831362f..7e09624e5505 100644
--- a/drivers/scsi/arm/msgqueue.c
+++ b/drivers/scsi/arm/msgqueue.c
@@ -23,7 +23,8 @@ static struct msgqueue_entry *mqe_alloc(MsgQueue_t *msgq)
 {
 	struct msgqueue_entry *mq;
 
-	if ((mq = msgq->free) != NULL)
+	mq = msgq->free;
+	if (mq)
 		msgq->free = mq->next;
 
 	return mq;
@@ -99,7 +100,8 @@ struct message *msgqueue_getmsg(MsgQueue_t *msgq, int msgno)
 {
 	struct msgqueue_entry *mq;
 
-	for (mq = msgq->qe; mq && msgno; mq = mq->next, msgno--);
+	for (mq = msgq->qe; mq && msgno; mq = mq->next, msgno--)
+		; /* intentional: iterate to the msgno-th entry */
 
 	return mq ? &mq->msg : NULL;
 }
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ