lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6146d57b-f855-40b1-a644-3af6b28ceea4@gmx.de>
Date: Thu, 2 Oct 2025 20:41:19 +0200
From: Armin Wolf <W_Armin@....de>
To: kernel test robot <lkp@...el.com>, ilpo.jarvinen@...ux.intel.com,
 hdegoede@...hat.com, chumuzero@...il.com, corbet@....net, cs@...edo.de,
 wse@...edocomputers.com, ggo@...edocomputers.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
 linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
 platform-driver-x86@...r.kernel.org, rdunlap@...radead.org,
 alok.a.tiwari@...cle.com, linux-leds@...r.kernel.org, lee@...nel.org,
 pobrn@...tonmail.com
Subject: Re: [PATCH v4 1/2] platform/x86: Add Uniwill laptop driver

Am 28.09.25 um 22:42 schrieb kernel test robot:

> Hi Armin,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on lwn/docs-next]
> [also build test WARNING on linus/master v6.17-rc7 next-20250926]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Armin-Wolf/platform-x86-Add-Uniwill-laptop-driver/20250928-093543
> base:   git://git.lwn.net/linux.git docs-next
> patch link:    https://lore.kernel.org/r/20250928013253.10869-2-W_Armin%40gmx.de
> patch subject: [PATCH v4 1/2] platform/x86: Add Uniwill laptop driver
> config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250929/202509290415.uez00SgW-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250929/202509290415.uez00SgW-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202509290415.uez00SgW-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/platform/x86/uniwill/uniwill-acpi.c:1243:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
>      1243 |                 guard(mutex)(&data->battery_lock);
>           |                 ^
>     include/linux/cleanup.h:401:2: note: expanded from macro 'guard'
>       401 |         CLASS(_name, __UNIQUE_ID(guard))
>           |         ^
>     include/linux/cleanup.h:290:2: note: expanded from macro 'CLASS'
>       290 |         class_##_name##_t var __cleanup(class_##_name##_destructor) =   \
>           |         ^
>     <scratch space>:49:1: note: expanded from here
>        49 | class_mutex_t
>           | ^
>     drivers/platform/x86/uniwill/uniwill-acpi.c:1250:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
>      1250 |                 guard(mutex)(&data->input_lock);
>           |                 ^
>     include/linux/cleanup.h:401:2: note: expanded from macro 'guard'
>       401 |         CLASS(_name, __UNIQUE_ID(guard))
>           |         ^
>     include/linux/cleanup.h:290:2: note: expanded from macro 'CLASS'
>       290 |         class_##_name##_t var __cleanup(class_##_name##_destructor) =   \
>           |         ^
>     <scratch space>:60:1: note: expanded from here
>        60 | class_mutex_t
>           | ^
>     drivers/platform/x86/uniwill/uniwill-acpi.c:1249:2: error: cannot jump from switch statement to this case label
>      1249 |         default:
>           |         ^
>     drivers/platform/x86/uniwill/uniwill-acpi.c:1243:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
>      1243 |                 guard(mutex)(&data->battery_lock);
>           |                 ^
>     include/linux/cleanup.h:401:15: note: expanded from macro 'guard'
>       401 |         CLASS(_name, __UNIQUE_ID(guard))
>           |                      ^
>     include/linux/compiler.h:166:29: note: expanded from macro '__UNIQUE_ID'
>       166 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
>           |                             ^
>     include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE'
>        84 | #define __PASTE(a,b) ___PASTE(a,b)
>           |                      ^
>     include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE'
>        83 | #define ___PASTE(a,b) a##b
>           |                       ^
>     <scratch space>:47:1: note: expanded from here
>        47 | __UNIQUE_ID_guard1072
>           | ^
>     2 warnings and 1 error generated.
>
Hi,

i think this is a problem inside the clang compiler. I did not encounter this warning when
build for x86-64 using gcc.

Thanks,
Armin Wolf

> vim +1243 drivers/platform/x86/uniwill/uniwill-acpi.c
>
>    1235	
>    1236	static int uniwill_notifier_call(struct notifier_block *nb, unsigned long action, void *dummy)
>    1237	{
>    1238		struct uniwill_data *data = container_of(nb, struct uniwill_data, nb);
>    1239		struct uniwill_battery_entry *entry;
>    1240	
>    1241		switch (action) {
>    1242		case UNIWILL_OSD_BATTERY_ALERT:
>> 1243			guard(mutex)(&data->battery_lock);
>    1244			list_for_each_entry(entry, &data->batteries, head) {
>    1245				power_supply_changed(entry->battery);
>    1246			}
>    1247	
>    1248			return NOTIFY_OK;
>    1249		default:
>    1250			guard(mutex)(&data->input_lock);
>    1251			sparse_keymap_report_event(data->input_device, action, 1, true);
>    1252	
>    1253			return NOTIFY_OK;
>    1254		}
>    1255	}
>    1256	
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ