Commit 87929cae authored by Zou Wei's avatar Zou Wei Committed by Vasily Gorbik

s390/sclp: convert list_for_each to entry variant

convert list_for_each() to list_for_each_entry() where
applicable.
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZou Wei <zou_wei@huawei.com>
Link: https://lore.kernel.org/r/1623740220-15846-1-git-send-email-zou_wei@huawei.comSigned-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 0a9d947f
......@@ -284,7 +284,6 @@ static int
sclp_tty_chars_in_buffer(struct tty_struct *tty)
{
unsigned long flags;
struct list_head *l;
struct sclp_buffer *t;
int count;
......@@ -292,8 +291,7 @@ sclp_tty_chars_in_buffer(struct tty_struct *tty)
count = 0;
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment