]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Fri, 31 Jul 2020 14:43:12 +0000 (16:43 +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 49ccbd9022f6114d4e2d323dd84e8ea555e755bf..92f5a259e25171e34b370323f5be6f2a4396a4ab 100644 (file)
@@ -716,7 +716,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