Skip to contentSkip to conversation

s390/sclp: convert list_for_each to entry variant

PATCH Applied Zou Wei 2 participants 2 messages Jun 15, 2021 s390

lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 s390/sclp: convert list_for_each to entry variant

convert list_for_each() to list_for_each_entry() where applicable.

---
 drivers/s390/char/sclp_tty.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/s390/char/sclp_tty.c +1 -3
index 162127f..6be9de8 100644
@@ -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);
Signature · 1 line
2.6.2