From: Zou Wei <zou_wei@huawei.com>
To: <hca@linux.ibm.com>, <gor@linux.ibm.com>,
<borntraeger@de.ibm.com>, <gregkh@linuxfoundation.org>,
<jirislaby@kernel.org>, <vneethv@linux.ibm.com>,
<dsterba@suse.com>, <oberpar@linux.ibm.com>
Cc: <linux-s390@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Zou Wei <zou_wei@huawei.com>
Subject: [PATCH -next] s390/sclp: convert list_for_each to entry variant
Date: Tue, 15 Jun 2021 14:57:00 +0800 [thread overview]
Message-ID: <1623740220-15846-1-git-send-email-zou_wei@huawei.com> (raw)
convert list_for_each() to list_for_each_entry() where
applicable.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
drivers/s390/char/sclp_tty.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
index 162127f..6be9de8 100644
--- a/drivers/s390/char/sclp_tty.c
+++ b/drivers/s390/char/sclp_tty.c
@@ -284,15 +284,13 @@ static unsigned int
sclp_tty_chars_in_buffer(struct tty_struct *tty)
{
unsigned long flags;
- struct list_head *l;
struct sclp_buffer *t;
unsigned int count = 0;
spin_lock_irqsave(&sclp_tty_lock, flags);
if (sclp_ttybuf != NULL)
count = sclp_chars_in_buffer(sclp_ttybuf);
- list_for_each(l, &sclp_tty_outqueue) {
- t = list_entry(l, struct sclp_buffer, list);
+ list_for_each_entry(t, &sclp_tty_outqueue, list) {
count += sclp_chars_in_buffer(t);
}
spin_unlock_irqrestore(&sclp_tty_lock, flags);
--
2.6.2
next reply other threads:[~2021-06-15 6:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 6:57 Zou Wei [this message]
2021-06-15 23:05 ` [PATCH -next] s390/sclp: convert list_for_each to entry variant Vasily Gorbik
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=1623740220-15846-1-git-send-email-zou_wei@huawei.com \
--to=zou_wei@huawei.com \
--cc=borntraeger@de.ibm.com \
--cc=dsterba@suse.com \
--cc=gor@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=hca@linux.ibm.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=oberpar@linux.ibm.com \
--cc=vneethv@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).