Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes asm/unaligned.h related compile errors #72

Merged
merged 5 commits into from
Jan 16, 2025

Conversation

donrudo
Copy link
Contributor

@donrudo donrudo commented Jan 14, 2025

This will fix the compilation errors shown in recent kernel sources caused by the relocation of asm/unaligned.h to its new location at linux/unaligned.h

@jonasmalacofilho
Copy link
Member

The change completely slipped past me, thanks for letting me know.

However, these dkms modules can be used with older kernels, so the path needs to be adjusted according to the kernel version.

Also, could you please provide signed-off tags on your patches?

@donrudo
Copy link
Contributor Author

donrudo commented Jan 14, 2025

Oh, thanks for the observation. I added the kernel version validation and signed the commit

EDIT: I just noticed the build is failing. I'll take a look tonight.

…not part of linux-headers at some distributions

Signed-off-by: Don Rudo <[email protected]>
@jonasmalacofilho
Copy link
Member

jonasmalacofilho commented Jan 15, 2025

The 6.2 errors appear to be related to GCC 13; GitHub Actions have recently switched the default Ubuntu runner to 24.04, and it comes with GCC 13.2.

The issue (clearly) was fixed in later versions, possibly by torvalds/linux@afa4bb7 (although the commit message mentions 32-bit ARM, and a LKML thread linking to it mentions i386).

I think the easiest path forward is just to pin our "stable" build test against something newer. Following the rationale in #57 (comment), we should switch the stable build test to compile against 6.8, which is the kernel version that comes in the latest Ubuntu LTS (24.04). I'll do this now...

@donrudo
Copy link
Contributor Author

donrudo commented Jan 15, 2025

thanks! that was quite confusing indeed haha

@@ -33,7 +33,15 @@
* Copyright 2019-2021 Jonas Malaco <[email protected]>
*/

#include <generated/uapi/linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
// kernel before 6.12:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this and the other comment, on all files.

drivers/hwmon/nzxt-grid3.c Show resolved Hide resolved
@@ -33,7 +33,15 @@
* Copyright 2019-2021 Jonas Malaco <[email protected]>
*/

#include <generated/uapi/linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkpatch wants the constant operand on the right (on all files).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I see, applied the change

@jonasmalacofilho
Copy link
Member

thanks! that was quite confusing indeed haha

Yeah, especially since the error was in the middle of an output full other other errors, that somehow weren't errors (the build against master also shows most of them). Quite messy... sorry about that.

@jonasmalacofilho
Copy link
Member

By the way, the master branch already tests against kernel 6.8, and your next commit should™ no longer hit the workqueue issue with GCC 13.

@jonasmalacofilho jonasmalacofilho merged commit 4613127 into liquidctl:master Jan 16, 2025
11 checks passed
@jonasmalacofilho
Copy link
Member

Thanks!

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