]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
xtensa: update *pos in cpuinfo_op.next
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 2 Jul 2020 15:32:25 +0000 (08:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 05:42:51 +0000 (07:42 +0200)
[ Upstream commit 0d5ab144429e8bd80889b856a44d56ab4a5cd59b ]

Increment *pos in the cpuinfo_op.next to fix the following warning
triggered by cat /proc/cpuinfo:

  seq_file: buggy .next function c_next did not update position index

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/xtensa/kernel/setup.c

index 92fb20777bb0ea1071bdb5768c24f97b662746b3..a19c61b2614222e8a5ab442d82ca26874907e074 100644 (file)
@@ -711,7 +711,8 @@ c_start(struct seq_file *f, loff_t *pos)
 static void *
 c_next(struct seq_file *f, void *v, loff_t *pos)
 {
-       return NULL;
+       ++*pos;
+       return c_start(f, pos);
 }
 
 static void