On Fri, May 25, 2018 at 4:40 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > On Tue, May 22, 2018 at 02:57:06PM -0700, João Paulo Rechi Vita wrote: >> Hello Dan, >> >> On Tue, Feb 21, 2017 at 5:27 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: >> > >> > On Mon, Feb 20, 2017 at 02:22:38PM -0500, João Paulo Rechi Vita wrote: >> > > Hello Dan, >> > > >> > > On 18 February 2017 at 15:30, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: >> > > > Hello João Paulo Rechi Vita, >> > > > >> > > > The patch 2c1a49c96123: "asus-wireless: Toggle airplane mode LED" >> > > > from Jun 13, 2016, leads to the following static checker warning: >> > > > >> > > > drivers/platform/x86/asus-wireless.c:54 asus_wireless_method() >> > > > error: uninitialized symbol 'ret'. >> > > > >> > > >> > > I believe I have a fix for this, but I'm not able to reproduce this >> > > message with neither of the following: >> > > >> > > make C=2 CHECK="/usr/bin/sparse" drivers/platform/x86/asus-wireless.o >> > > make C=2 CHECK="../smatch/smatch -p=kernel" drivers/platform/x86/asus-wireless.o >> > > make C=2 CHECK="scripts/coccicheck" drivers/platform/x86/asus-wireless.o >> > > >> > > So I am not able to check the fix. How can I reproduce this? >> > > >> > >> > It's some unpublished Smatch stuff... I still have too many false >> > positives. >> > >> >> Is this still reproducible? If so, are the Smatch tests to reproduce >> it available somewhere (could not find on a quick look)? >> > > Yes. I published the Smatch check. You'll need to build the cross > function database though using the smatch_scripts/build_kernel_data.sh > script. Or you could just hack together a tiny cross function database > that has the acpi_evaluate_integer() function. > > kchecker --info drivers/acpi/utils.c > warns.txt > ~/progs/smatch/devel/smatch_data/db/create_db.sh -p=kernel warns.txt > kchecker drivers/platform/x86/asus-wireless.c > Finally was able to get back to this. I had to use the build_kernel_data.sh script to build the cross function db to reproduce the warning, and then had to run the script again to verify it got fixed. I guess it makes sense, although initially I thought I could simply call "make CHECK=..." after generating the DB once. Anyway, not a big deal. Thanks again for the report, I'm sending the fix as a reply to this message. -- João Paulo Rechi Vita http://about.me/jprvita