netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ionic: remove useless return code
@ 2019-09-18 19:57 Arnd Bergmann
  2019-09-18 20:46 ` Shannon Nelson
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2019-09-18 19:57 UTC (permalink / raw)
  To: Shannon Nelson, Pensando Drivers, David S. Miller
  Cc: Arnd Bergmann, netdev, linux-kernel, clang-built-linux

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 <arnd@arndb.de>
---
 drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
index 7afc4a365b75..bc03cecf80cc 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
@@ -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)
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ionic: remove useless return code
  2019-09-18 19:57 [PATCH] ionic: remove useless return code Arnd Bergmann
@ 2019-09-18 20:46 ` Shannon Nelson
  2019-09-20  0:21   ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Shannon Nelson @ 2019-09-18 20:46 UTC (permalink / raw)
  To: Arnd Bergmann, Pensando Drivers, David S. Miller
  Cc: netdev, linux-kernel, clang-built-linux

On 9/18/19 12:57 PM, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
> ---
>   drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> index 7afc4a365b75..bc03cecf80cc 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> @@ -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 
<natechancellor@gmail.com>

Either way,

Acked-by: Shannon Nelson <snelson@pensando.io>

sln


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ionic: remove useless return code
  2019-09-18 20:46 ` Shannon Nelson
@ 2019-09-20  0:21   ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2019-09-20  0:21 UTC (permalink / raw)
  To: Shannon Nelson
  Cc: Arnd Bergmann, Pensando Drivers, David S. Miller, netdev,
	linux-kernel, clang-built-linux

On Wed, 18 Sep 2019 13:46:34 -0700, Shannon Nelson wrote:
> On 9/18/19 12:57 PM, Arnd Bergmann wrote:
> > 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 <arnd@arndb.de>
> > ---
> >   drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> > index 7afc4a365b75..bc03cecf80cc 100644
> > --- a/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> > +++ b/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
> > @@ -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 
> <natechancellor@gmail.com>

Yup, should be in the net tree now.

> Either way,
> 
> Acked-by: Shannon Nelson <snelson@pensando.io>

Thanks for quick reviews!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-20  0:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 19:57 [PATCH] ionic: remove useless return code Arnd Bergmann
2019-09-18 20:46 ` Shannon Nelson
2019-09-20  0:21   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).