From: Max Filippov Date: Thu, 2 Jul 2020 15:32:25 +0000 (-0700) Subject: xtensa: update *pos in cpuinfo_op.next X-Git-Tag: v4.4.232~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a0f6e6d2252ff938af94fcc8404fc4ac21de2a1;p=thirdparty%2Fkernel%2Fstable.git xtensa: update *pos in cpuinfo_op.next [ 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 Signed-off-by: Sasha Levin --- diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 49ccbd9022f61..92f5a259e2517 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -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