public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Darshan Rathod <darshanrathod475@gmail.com>
To: linux@armlinux.org.uk, James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com
Cc: linux-arm-kernel@lists.infradead.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Darshan Rathod <darshanrathod475@gmail.com>
Subject: [PATCH] scsi/arm: Clean up coding style violations
Date: Fri,  7 Nov 2025 12:34:34 +0000	[thread overview]
Message-ID: <20251107123435.1434-1-darshanrathod475@gmail.com> (raw)

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@gmail.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


             reply	other threads:[~2025-11-07 12:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 12:34 Darshan Rathod [this message]
2025-11-07 12:38 ` [PATCH] scsi/arm: Clean up coding style violations Russell King (Oracle)
2025-11-08 17:33   ` Martin K. Petersen

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=20251107123435.1434-1-darshanrathod475@gmail.com \
    --to=darshanrathod475@gmail.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=martin.petersen@oracle.com \
    /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