linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Russell King <rmk+kernel@armlinux.org.uk>
Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH] net: fix boolreturn.cocci warnings
Date: Wed, 25 Mar 2020 18:55:57 +0800	[thread overview]
Message-ID: <20200325105557.GA4015@6d5c83dcba44> (raw)
In-Reply-To: <202003251849.wLfJ5mOC%lkp@intel.com>

From: kbuild test robot <lkp@intel.com>

drivers/net/phy/qsfp.c:872:8-9: WARNING: return of 0/1 in function 'sfp_los_event_active' with return type bool
drivers/net/phy/qsfp.c:877:8-9: WARNING: return of 0/1 in function 'sfp_los_event_inactive' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: e409cdeab751 ("net: add qsfp support                              [*experimental*]")
Signed-off-by: kbuild test robot <lkp@intel.com>
---

tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git cex7
head:   6edfcc6e759c8dd593c9079525e610919d680ae5
commit: e409cdeab75156478ac793528742274f6ad4be96 [142/143] net: add qsfp support                              [*experimental*]

 qsfp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/phy/qsfp.c
+++ b/drivers/net/phy/qsfp.c
@@ -869,12 +869,12 @@ static void sfp_sm_link_check_los(struct
 
 static bool sfp_los_event_active(struct qsfp *sfp, unsigned int event)
 {
-	return 0;
+	return false;
 }
 
 static bool sfp_los_event_inactive(struct qsfp *sfp, unsigned int event)
 {
-	return 0;
+	return false;
 }
 
 static int qsfp_set_tx_disable(struct qsfp *qsfp, unsigned int val)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-03-25 10:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 10:55 [arm:cex7 142/143] drivers/net/phy/qsfp.c:872:8-9: WARNING: return of 0/1 in function 'sfp_los_event_active' with return type bool kbuild test robot
2020-03-25 10:55 ` kbuild test robot [this message]
2020-03-25 10:55 ` [PATCH] net: fix irqf_oneshot.cocci warnings kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200325105557.GA4015@6d5c83dcba44 \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).