]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
BugLink: https://bugs.launchpad.net/bugs/1889669
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
arch/xtensa/kernel/setup.c

index e0e1e1892b86b3a2a040e95242041c3e759a92ed..d08172138369b77c39d09033238c58da4dfbe70d 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