Merge tag 'tty-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[platform/kernel/linux-starfive.git] / drivers / s390 / char / sclp_tty.c
index 162127f..6be9de8 100644 (file)
@@ -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);