* [PATCH net-next] xen-netback: use true and false for boolean values
@ 2018-08-02 0:31 Gustavo A. R. Silva
2018-08-02 7:55 ` Wei Liu
2018-08-02 21:43 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-02 0:31 UTC (permalink / raw)
To: Wei Liu, Paul Durrant, David S. Miller
Cc: xen-devel, netdev, linux-kernel, Gustavo A. R. Silva
Return statements in functions returning bool should use true or false
instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/net/xen-netback/netback.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index a27daa2..3621e05 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1603,9 +1603,9 @@ static void xenvif_ctrl_action(struct xenvif *vif)
static bool xenvif_ctrl_work_todo(struct xenvif *vif)
{
if (likely(RING_HAS_UNCONSUMED_REQUESTS(&vif->ctrl)))
- return 1;
+ return true;
- return 0;
+ return false;
}
irqreturn_t xenvif_ctrl_irq_fn(int irq, void *data)
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] xen-netback: use true and false for boolean values
2018-08-02 0:31 [PATCH net-next] xen-netback: use true and false for boolean values Gustavo A. R. Silva
@ 2018-08-02 7:55 ` Wei Liu
2018-08-02 21:43 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Wei Liu @ 2018-08-02 7:55 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Wei Liu, Paul Durrant, David S. Miller, xen-devel, netdev, linux-kernel
On Wed, Aug 01, 2018 at 07:31:01PM -0500, Gustavo A. R. Silva wrote:
> Return statements in functions returning bool should use true or false
> instead of an integer value.
>
> This issue was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Thanks for the patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] xen-netback: use true and false for boolean values
2018-08-02 0:31 [PATCH net-next] xen-netback: use true and false for boolean values Gustavo A. R. Silva
2018-08-02 7:55 ` Wei Liu
@ 2018-08-02 21:43 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-08-02 21:43 UTC (permalink / raw)
To: gustavo; +Cc: wei.liu2, paul.durrant, xen-devel, netdev, linux-kernel
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Wed, 1 Aug 2018 19:31:01 -0500
> Return statements in functions returning bool should use true or false
> instead of an integer value.
>
> This issue was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-02 21:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-02 0:31 [PATCH net-next] xen-netback: use true and false for boolean values Gustavo A. R. Silva
2018-08-02 7:55 ` Wei Liu
2018-08-02 21:43 ` David Miller
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).