Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.

Removed return value assignment for debugfs_create_u32#18

Open
neon64 wants to merge 1 commit into
iksaif:masterfrom
neon64:master
Open

Removed return value assignment for debugfs_create_u32#18
neon64 wants to merge 1 commit into
iksaif:masterfrom
neon64:master

Conversation

@neon64

@neon64 neon64 commented Jul 10, 2020

Copy link
Copy Markdown
Contributor

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.

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

Copy link
Copy Markdown
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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants