Skip to content

[NOT-FOR-UPSTREAM] platform/x86: msi-wmi-platform: Fix issue with LLVM#59

Open
hphilm wants to merge 1 commit into
ogc-7.0.yfrom
msi-wmi-platform-llvm-fix
Open

[NOT-FOR-UPSTREAM] platform/x86: msi-wmi-platform: Fix issue with LLVM#59
hphilm wants to merge 1 commit into
ogc-7.0.yfrom
msi-wmi-platform-llvm-fix

Conversation

@hphilm

@hphilm hphilm commented Jun 1, 2026

Copy link
Copy Markdown

When using LLVM you may get the following error otherwise:

│B│ drivers/platform/x86/msi-wmi-platform.c:718:3: error: cannot jump from switch statement to this case label
│B│   718 |                 default:
│B│       |                 ^
│B│ drivers/platform/x86/msi-wmi-platform.c:682:4: note: jump bypasses initialization of variable with __attribute__((cleanup))
│B│   682 |                         guard(mutex)(&data->wmi_lock);
│B│       |                         ^
│B│ ./include/linux/cleanup.h:419:2: note: expanded from macro 'guard'
│B│   419 |         CLASS(_name, __UNIQUE_ID(guard))
│B│       |         ^
│B│ ./include/linux/cleanup.h:300:3: note: expanded from macro 'CLASS'
│B│   300 |                 class_##_name##_constructor
│B│       |                 ^
│B│ <scratch space>:115:1: note: expanded from here
│B│   115 | class_mutex_constructor

@hphilm

hphilm commented Jun 1, 2026

Copy link
Copy Markdown
Author

See also: hhd-dev/patchwork@590a164

@pastaq

pastaq commented Jun 2, 2026

Copy link
Copy Markdown
Member

Please format this patch IAW documentation.

@hphilm

hphilm commented Jun 2, 2026

Copy link
Copy Markdown
Author

The linked patch by Antheas Kapenekakis already includes the fix I added in this separate patch. We could also pull in that updated version instead.

Can you point me to the IAW documentation? Since it is an addon of an existing patch it wasn't clear on which tag may fit or the exact formatting should be in that case ...

@pastaq

pastaq commented Jun 3, 2026

Copy link
Copy Markdown
Member

@pastaq

pastaq commented Jun 3, 2026

Copy link
Copy Markdown
Member

If there's an updated version of the patch set not yet on ML then we should just grab that instead, rather than diverge and need to maintain it.

Fixes error: cannot jump from switch statement to this case label
@hphilm hphilm force-pushed the msi-wmi-platform-llvm-fix branch from 5356576 to 280bbdd Compare June 8, 2026 04:53
@hphilm hphilm changed the title platform/x86: msi-wmi-platform: Fix issue with LLVM [NOT-FOR-UPSTREAM] platform/x86: msi-wmi-platform: Fix issue with LLVM Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants