ionic: remove useless return code
Subsystems (3)
PATCH 1/1 ionic: remove useless return code
The debugfs function was apparently changed from returning an error code to a void return, but the return code left in place, causing a warning from clang:
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:60:37: error: expression result unused [-Werror,-Wunused-value]
ionic, &identity_fops) ? 0 : -EOPNOTSUPP;
^~~~~~~~~~~--- drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c +1 -1
@@ -57,7 +57,7 @@ DEFINE_SHOW_ATTRIBUTE(identity);void ionic_debugfs_add_ident (struct ionic *ionic) {debugfs_create_file ("identity" ,0400 , ionic->dentry, - ionic, &identity_fops) ?0 : -EOPNOTSUPP ; + ionic, &identity_fops); }void ionic_debugfs_add_sizes (struct ionic *ionic)
Signature · 1 line
2.20.0
Quoted 19 lines · Arnd Bergmann
The debugfs function was apparently changed from returning an error code to a void return, but the return code left in place, causing a warning from clang:
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:60:37: error: expression result unused [-Werror,-Wunused-value]ionic, &identity_fops) ? 0 : -EOPNOTSUPP; ^~~~~~~~~~~Fixes fbfb8031533c ("ionic: Add hardware init and device commands")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/pensando/ionic/ionic_debugfs.c +0
-0
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c DEFINE_SHOW_ATTRIBUTE(identity); · line 63
Quoted 8 lines
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c +1
-1@@ -57,7 +57,7 @@ DEFINE_SHOW_ATTRIBUTE(identity);void ionic_debugfs_add_ident (struct ionic *ionic) {debugfs_create_file ("identity" ,0400 , ionic->dentry, - ionic, &identity_fops) ?0 : -EOPNOTSUPP ; + ionic, &identity_fops); }void ionic_debugfs_add_sizes (struct ionic *ionic)
This has just recently been addressed by Nathan Chancellor <[email protected]>
Either way,
sln
Quoted 27 lines · Shannon Nelson
Quoted 26 lines · Arnd Bergmann
The debugfs function was apparently changed from returning an error code to a void return, but the return code left in place, causing a warning from clang:
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:60:37: error: expression result unused [-Werror,-Wunused-value]ionic, &identity_fops) ? 0 : -EOPNOTSUPP; ^~~~~~~~~~~Fixes fbfb8031533c ("ionic: Add hardware init and device commands")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/pensando/ionic/ionic_debugfs.c +1
-1@@ -57,7 +57,7 @@ DEFINE_SHOW_ATTRIBUTE(identity);void ionic_debugfs_add_ident (struct ionic *ionic) {debugfs_create_file ("identity" ,0400 , ionic->dentry, - ionic, &identity_fops) ?0 : -EOPNOTSUPP ; + ionic, &identity_fops); }
Quoted 4 lines
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c DEFINE_SHOW_ATTRIBUTE(identity); · line 63
Quoted 1 line
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c +0
-0void ionic_debugfs_add_sizes (struct ionic *ionic)This has just recently been addressed by Nathan Chancellor <[email protected]>
Yup, should be in the net tree now.
Quoted 3 lines
Either way,
Acked-by Shannon Nelson <[email protected]>
Thanks for quick reviews!