linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [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
@ 2020-03-25 10:55 kbuild test robot
  2020-03-25 10:55 ` [PATCH] net: fix boolreturn.cocci warnings kbuild test robot
  2020-03-25 10:55 ` [PATCH] net: fix irqf_oneshot.cocci warnings kbuild test robot
  0 siblings, 2 replies; 3+ messages in thread
From: kbuild test robot @ 2020-03-25 10:55 UTC (permalink / raw)
  To: Russell King; +Cc: kbuild-all, linux-arm-kernel

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

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> 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
--
>> drivers/net/phy/qsfp.c:1750:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

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

* [PATCH] net: fix boolreturn.cocci warnings
  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
  2020-03-25 10:55 ` [PATCH] net: fix irqf_oneshot.cocci warnings kbuild test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-03-25 10:55 UTC (permalink / raw)
  To: Russell King; +Cc: kbuild-all, linux-arm-kernel

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

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

* [PATCH] net: fix irqf_oneshot.cocci warnings
  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 ` [PATCH] net: fix boolreturn.cocci warnings kbuild test robot
@ 2020-03-25 10:55 ` kbuild test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-03-25 10:55 UTC (permalink / raw)
  To: Russell King; +Cc: kbuild-all, linux-arm-kernel

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

drivers/net/phy/qsfp.c:1750:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

 Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests")
 threaded IRQs without a primary handler need to be requested with
 IRQF_ONESHOT, otherwise the request will fail.

 So pass the IRQF_ONESHOT flag in this case.

Generated by: scripts/coccinelle/misc/irqf_oneshot.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*]

Please take the patch only if it's a positive warning. Thanks!

 qsfp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/net/phy/qsfp.c
+++ b/drivers/net/phy/qsfp.c
@@ -1748,7 +1748,8 @@ static int qsfp_probe(struct platform_de
 		}
 
 		err = devm_request_threaded_irq(qsfp->dev, qsfp->gpio_irq[i],
-						NULL, irq_handler, irq_flags,
+						NULL, irq_handler,
+						irq_flags | IRQF_ONESHOT,
 						dev_name(qsfp->dev), qsfp);
 		if (err) {
 			qsfp->gpio_irq[i] = 0;

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

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

end of thread, other threads:[~2020-03-25 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] net: fix boolreturn.cocci warnings kbuild test robot
2020-03-25 10:55 ` [PATCH] net: fix irqf_oneshot.cocci warnings kbuild test robot

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).