A number of coding style cleanups for the netcat kernel module#11
Merged
blucia0a merged 10 commits intousrbinnc:masterfrom Apr 23, 2014
gregkh:codingstyle
Merged
A number of coding style cleanups for the netcat kernel module#11blucia0a merged 10 commits intousrbinnc:masterfrom gregkh:codingstyle
blucia0a merged 10 commits intousrbinnc:masterfrom
gregkh:codingstyle
Conversation
Linux kernel code has a specific style, so fix up the basic whitespace issues here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This is C, not C++ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
So there's no need to do it again. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don't rely on the 2.2 module init function naming, tell the world exactly what the module init/exit functions are, and make them static. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Some more whitespace cleanups to make the checkpatch.pl tool happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Member
|
Thanks! Will test later today and merge these style changes in. |
Use the "proper" pr_*() calls instead, which adds the format string correectly. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Also put the mode in the initializer, no need to specify it later on. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
If it tries to do its own reference count, it is too late, the race could have already happened. That's why the kernel does it automatically for you if you set the .owner field in the fops structure, so do that instead. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0 is "good", -SOMETHING is always bad, no need to use a define for 0. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Contributor
Author
|
Thanks. I can add multi-user playback pretty easily on top of this patch series, no need for static variables :) |
No need for forward declarations, just move the code around a bit, saving us a number of lines. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Contributor
|
After this pull request is accepted I can say I and @gregkh contributed to the same project. |
blucia0a
added a commit
that referenced
this pull request
Apr 23, 2014
A number of coding style cleanups for the netcat kernel module
Member
|
Thanks a lot, Greg! I would love to see how to enable multi-user playback. I haven't done much kernel hacking before, so just getting the original version built was a fun exercise. |
Contributor
Author
|
Ok, I'll work on it this afternoon, should make the code a bit simpler. And for a "first time kernel module", it's a very nice job. |
Member
|
Thanks a lot! Glad to have your contributions to make our album release better! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some basic whitespace and other formatting tweaks to get the netcat kernel module
to abide by the basic Linux kernel coding style rules.