projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a9d947
)
s390/sclp: convert list_for_each to entry variant
author
Zou Wei
<zou_wei@huawei.com>
Tue, 15 Jun 2021 06:57:00 +0000
(14:57 +0800)
committer
Vasily Gorbik
<gor@linux.ibm.com>
Fri, 18 Jun 2021 14:41:22 +0000
(16:41 +0200)
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>
Link:
https://lore.kernel.org/r/1623740220-15846-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/char/sclp_tty.c
patch
|
blob
|
history
diff --git
a/drivers/s390/char/sclp_tty.c
b/drivers/s390/char/sclp_tty.c
index 4456ceb23bd2a76f23b245792a44505e4217be6f..f5591bf82a8ff927cf8063c17ec342b59f3971bf 100644
(file)
--- a/
drivers/s390/char/sclp_tty.c
+++ b/
drivers/s390/char/sclp_tty.c
@@
-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);