[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a46f0c36-8fd2-4a85-880c-eb462d4a837b@suswa.mountain>
Date: Thu, 14 Dec 2023 11:00:46 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Charlie Jenkins <charlie@...osinc.com>
Cc: oe-kbuild@...ts.linux.dev, lkp@...el.com,
oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Palmer Dabbelt <palmer@...osinc.com>
Subject: Re: arch/riscv/kernel/module.c:639 process_accumulated_relocations()
error: uninitialized symbol 'curr_type'.
On Wed, Dec 13, 2023 at 11:27:02AM -0800, Charlie Jenkins wrote:
> > 8fd6c5142395a1 Charlie Jenkins 2023-11-01 638 }
> > 8fd6c5142395a1 Charlie Jenkins 2023-11-01 @639 reloc_handlers[curr_type].accumulate_handler(
> > ^^^^^^^^^
> > Can the list be empty? Uninitialized in that case.
>
> That's a tricky one, the list cannot be empty. Each bucket in the
> bucket_iter is guarunteed to have at least one rel_entry. I can probably
> resolve this by extracting this for loop into a do-while loop.
You can just ignore false positives. It's not really a fix to change it
to a do-while loop. I reviewed the do while code before reading this
email and I still wondered about empty lists, but just to hear that it's
not going to be empty is enough. Just the email was sufficient.
regards,
dan carpenter
Powered by blists - more mailing lists