Skip to content

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

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
Copy link
Copy Markdown

@hphilm hphilm commented Jun 1, 2026

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

Fixes error: cannot jump from switch statement to this case label
@hphilm
Copy link
Copy Markdown
Author

hphilm commented Jun 1, 2026

See also: hhd-dev/patchwork@590a164

@pastaq
Copy link
Copy Markdown
Member

pastaq commented Jun 2, 2026

Please format this patch IAW documentation.

@hphilm
Copy link
Copy Markdown
Author

hphilm commented Jun 2, 2026

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
Copy link
Copy Markdown
Member

pastaq commented Jun 3, 2026

@pastaq
Copy link
Copy Markdown
Member

pastaq commented Jun 3, 2026

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.

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