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

-Wunused-value in drivers/net/ethernet/pensando/ionic/ionic_debugfs.c #658

Closed
nathanchance opened this issue Sep 17, 2019 · 2 comments
Closed
Assignees
Labels
-Wunused-value [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.4 This bug was fixed in Linux 5.4

Comments

@nathanchance
Copy link
Member

../drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:60:37: warning: expression result unused [-Wunused-value]
                            ionic, &identity_fops) ? 0 : -EOPNOTSUPP;
                                                         ^~~~~~~~~~~
1 warning generated.

Patch submitted: https://lore.kernel.org/netdev/20190917232616.125261-1-natechancellor@gmail.com/

@nathanchance nathanchance added [PATCH] Submitted A patch has been submitted for review [BUG] linux-next This is an issue only seen in linux-next -Wunused-value labels Sep 17, 2019
@nathanchance nathanchance self-assigned this Sep 17, 2019
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Submitted A patch has been submitted for review labels Sep 20, 2019
fengguang pushed a commit to 0day-ci/linux that referenced this issue Sep 20, 2019
clang warns:

../drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:60:37: warning:
expression result unused [-Wunused-value]
                            ionic, &identity_fops) ? 0 : -EOPNOTSUPP;
                                                         ^~~~~~~~~~~
1 warning generated.

The return value of debugfs_create_file does not need to be checked [1]
and the function returns void so get rid of the ternary operator, it is
unnecessary.

[1]: https://lore.kernel.org/linux-mm/20150815160730.GB25186@kroah.com/

Fixes: fbfb803 ("ionic: Add hardware init and device commands")
Link: ClangBuiltLinux#658
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Shannon Nelson <snelson@pensando.io>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@nathanchance
Copy link
Member Author

Merged into mainline: https://git.kernel.org/torvalds/c/b47bea2b5c3bf17270defe8529774dad114bcee5

@nathanchance nathanchance added [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.4 This bug was fixed in Linux 5.4 and removed [BUG] linux-next This is an issue only seen in linux-next [PATCH] Accepted A submitted patch has been accepted upstream labels Sep 29, 2019
anlaneg pushed a commit to anlaneg/linux that referenced this issue Oct 3, 2019
clang warns:

../drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:60:37: warning:
expression result unused [-Wunused-value]
                            ionic, &identity_fops) ? 0 : -EOPNOTSUPP;
                                                         ^~~~~~~~~~~
1 warning generated.

The return value of debugfs_create_file does not need to be checked [1]
and the function returns void so get rid of the ternary operator, it is
unnecessary.

[1]: https://lore.kernel.org/linux-mm/20150815160730.GB25186@kroah.com/

Fixes: fbfb803 ("ionic: Add hardware init and device commands")
Link: ClangBuiltLinux#658
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Shannon Nelson <snelson@pensando.io>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wunused-value [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.4 This bug was fixed in Linux 5.4
Projects
None yet
Development

No branches or pull requests

1 participant