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

Toss4 cleanup #166

Merged
merged 6 commits into from
Sep 23, 2024
Merged

Toss4 cleanup #166

merged 6 commits into from
Sep 23, 2024

Conversation

rountree
Copy link
Collaborator

Replaces #define around msr_devnode with _Generic.

The type of (((struct class *)0)->devnode) has changed at least
twice in the mainline kernel. Coding based on mainline kernel
versions has repeatedly run into the problem of distros backporting
features to older kernels.

Solved here using _Generic and multiple function definitions.

The type of (((struct class *)0)->devnode) has changed at least
twice in the mainline kernel.  Coding based on mainline kernel
versions has repeatedly run into the problem of distros backporting
features to older kernels.

Solved here using _Generic and multiple function definitions.
msr_batch.c Outdated
@@ -1,4 +1,4 @@
// Copyright 2011-2021 Lawrence Livermore National Security, LLC and other
// Copyright 2012-2021 Lawrence Livermore National Security, LLC and other
Copy link
Collaborator

Choose a reason for hiding this comment

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

Start copyright year at 2011

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if this file existed in 2011. Github history doesn't go back that far and.... never mind. 2011 it is.

msr_allowlist.c Outdated
#endif

#define msr_allowlist_nodename_selector _Generic(\
(((struct class *)0)->devnode),\
Copy link
Collaborator

@slabasan slabasan Sep 17, 2024

Choose a reason for hiding this comment

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

Use 4 spaces instead of 8 for indent

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

msr_batch.c Outdated
#endif
#endif
#define msrbatch_nodename_selector _Generic(\
(((struct class *)0)->devnode),\
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use 4 spaces instead of 8 for indent

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Collaborator

@slabasan slabasan left a comment

Choose a reason for hiding this comment

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

Minor changes

rountree-alt and others added 2 commits September 19, 2024 11:55
- add new lines between function definitions
- use 4 instead of 8 spaces for indents
@slabasan slabasan merged commit d9fd51a into LLNL:main Sep 23, 2024
2 checks passed
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.

3 participants