Skip to contentSkip to conversation

scsi/arm: Clean up coding style violations

PATCH In review Darshan Rathod 3 participants 3 messages Nov 7, 2025 – Nov 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/scsi/arm/msgqueue.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/scsi/arm/msgqueue.c +4 -2
index 58115831362f..7e09624e5505 100644
@@ -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;
 }
Signature · 1 line
2.43.0
#1 lore raw
Quoted 7 lines · Darshan Rathod

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.

Up to the SCSI maintainers, but this code pre-dates many of the coding style updates, and I believe there is a general policy not to "fix" old code for such things. It creates noise and additional churn.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
#2 lore raw

Russell,

Quoted 3 lines

Up to the SCSI maintainers, but this code pre-dates many of the coding style updates, and I believe there is a general policy not to "fix" old code for such things. It creates noise and additional churn.

Correct. checkpatch is for validating *new* code.

Signature · 1 line
Martin K. Petersen