s390/sclp: convert list_for_each to entry variant
PATCH 1/1 s390/sclp: convert list_for_each to entry variant
convert list_for_each() to list_for_each_entry() where applicable.
Reported-by Hulk Robot <[email protected]>
Signed-off-by Zou Wei <[email protected]>
--- drivers/s390/char/sclp_tty.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/s390/char/sclp_tty.c +1 -3
@@ -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
Quoted 8 lines · Zou Wei
convert
list_for_each()tolist_for_each_entry()where applicable.Reported-by Hulk Robot <[email protected]>Signed-off-by Zou Wei <[email protected]>--- drivers/s390/char/sclp_tty.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Applied, thanks!