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

Removed return value assignment for debugfs_create_u32 #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neon64
Copy link
Contributor

@neon64 neon64 commented Jul 10, 2020

Similar to the last pull request I made: #16

Trying to install on a newer kernel version (specifically 5.7.7-arch1-1), caused compilation errors with the assignment

dent = debugfs_create_u32("instances_count", S_IRUGO,
				 thinkpad->debug.root,
				 thinkpad->debug.root,
				 &thinkpad->debug.instances_count);

Removing dent = seems to fix this compilation error.

The patch is listed here: https://linuxlists.cc/l/1/linux-kernel/t/3537734/(patch)_debugfs:_remove_return_value_of_debugfs_create_u32()#post3537734 - but isn't reflected in the kernel docs (https://www.kernel.org/doc/Documentation/filesystems/debugfs.txt).

This may break older kernel versions, I don't have older devices to test on sorry.

@@ -1138,7 +1138,7 @@ static int thinkpad_wmi_debugfs_init(struct thinkpad_wmi *thinkpad)
thinkpad->debug.root,
&thinkpad->debug.instance);

dent = debugfs_create_u32("instances_count", S_IRUGO,
debugfs_create_u32("instances_count", S_IRUGO,
thinkpad->debug.root,
&thinkpad->debug.instances_count);
if (!dent)
Copy link
Owner

Choose a reason for hiding this comment

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

I think you want to remove this too no ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry I'm a bit confused - isn't line 1141 where I already removed dent = ?

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