* [PATCH -next] s390/sclp: convert list_for_each to entry variant
@ 2021-06-15 6:57 Zou Wei
2021-06-15 23:05 ` Vasily Gorbik
0 siblings, 1 reply; 2+ messages in thread
From: Zou Wei @ 2021-06-15 6:57 UTC (permalink / raw)
To: hca, gor, borntraeger, gregkh, jirislaby, vneethv, dsterba,
oberpar
Cc: linux-s390, linux-kernel, Zou Wei
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>
---
drivers/s390/char/sclp_tty.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
index 162127f..6be9de8 100644
--- a/drivers/s390/char/sclp_tty.c
+++ b/drivers/s390/char/sclp_tty.c
@@ -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);
--
2.6.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH -next] s390/sclp: convert list_for_each to entry variant
2021-06-15 6:57 [PATCH -next] s390/sclp: convert list_for_each to entry variant Zou Wei
@ 2021-06-15 23:05 ` Vasily Gorbik
0 siblings, 0 replies; 2+ messages in thread
From: Vasily Gorbik @ 2021-06-15 23:05 UTC (permalink / raw)
To: Zou Wei
Cc: hca, borntraeger, gregkh, jirislaby, vneethv, dsterba, oberpar,
linux-s390, linux-kernel
On Tue, Jun 15, 2021 at 02:57:00PM +0800, Zou Wei wrote:
> 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>
> ---
> drivers/s390/char/sclp_tty.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-15 23:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-15 6:57 [PATCH -next] s390/sclp: convert list_for_each to entry variant Zou Wei
2021-06-15 23:05 ` Vasily Gorbik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox