-
Notifications
You must be signed in to change notification settings - Fork 26
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
Toss4 cleanup #166
Conversation
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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),\ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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),\ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes
Per Stephanie's comments.
- add new lines between function definitions - use 4 instead of 8 spaces for indents
ffd7036
to
fcc68be
Compare
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.