Skip to contentSkip to conversation

xen-netback:Make the function xenvif_schedulable have a return type of bool

PATCH In review Nicholas Krause 2 participants 3 messages Jun 17, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen-netback:Make the function xenvif_schedulable have a return type of bool

This makes the function xenvif_sechedulable have a return type of bool now due to this particular function's return statement only ever evaluating to have a value of one or zero.

---
 drivers/net/xen-netback/common.h    | 2 +-
 drivers/net/xen-netback/interface.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/xen-netback/common.h +1 -1
index 8a495b3..c02cafb 100644
@@ -280,7 +280,7 @@ void xenvif_free(struct xenvif *vif);
 int xenvif_xenbus_init(void);
 void xenvif_xenbus_fini(void);
 
-int xenvif_schedulable(struct xenvif *vif);
+bool xenvif_schedulable(struct xenvif *vif);
 
 int xenvif_queue_stopped(struct xenvif_queue *queue);
 void xenvif_wake_queue(struct xenvif_queue *queue);
drivers/net/xen-netback/interface.c +1 -1
index 1a83e19..b5fcb52 100644
@@ -63,7 +63,7 @@ void xenvif_skb_zerocopy_complete(struct xenvif_queue *queue)
 	atomic_dec(&queue->inflight_packets);
 }
 
-int xenvif_schedulable(struct xenvif *vif)
+bool xenvif_schedulable(struct xenvif *vif)
 {
 	return netif_running(vif->dev) &&
 		test_bit(VIF_STATUS_CONNECTED, &vif->status) &&
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Nicholas Krause

This makes the function xenvif_sechedulable have a return type of bool now due to this particular function's return statement only ever evaluating to have a value of one or zero.

Quoted 33 lines
---
 drivers/net/xen-netback/common.h    | 2 +-
 drivers/net/xen-netback/interface.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/xen-netback/common.h +1 -1
index 8a495b3..c02cafb 100644
@@ -280,7 +280,7 @@ void xenvif_free(struct xenvif *vif);
 int xenvif_xenbus_init(void);
 void xenvif_xenbus_fini(void);
 
-int xenvif_schedulable(struct xenvif *vif);
+bool xenvif_schedulable(struct xenvif *vif);
 
 int xenvif_queue_stopped(struct xenvif_queue *queue);
 void xenvif_wake_queue(struct xenvif_queue *queue);
drivers/net/xen-netback/interface.c +1 -1
index 1a83e19..b5fcb52 100644
@@ -63,7 +63,7 @@ void xenvif_skb_zerocopy_complete(struct xenvif_queue *queue)
 	atomic_dec(&queue->inflight_packets);
 }
 
-int xenvif_schedulable(struct xenvif *vif)
+bool xenvif_schedulable(struct xenvif *vif)
 {
 	return netif_running(vif->dev) &&
 		test_bit(VIF_STATUS_CONNECTED, &vif->status) &&
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#2 lore raw
In reply to Nicholas Krause
Quoted 5 lines · Nicholas Krause

This makes the function xenvif_sechedulable have a return type of bool now due to this particular function's return statement only ever evaluating to have a value of one or zero.

Quoted 33 lines
---
 drivers/net/xen-netback/common.h    | 2 +-
 drivers/net/xen-netback/interface.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/xen-netback/common.h +1 -1
index 8a495b3..c02cafb 100644
@@ -280,7 +280,7 @@ void xenvif_free(struct xenvif *vif);
 int xenvif_xenbus_init(void);
 void xenvif_xenbus_fini(void);
 
-int xenvif_schedulable(struct xenvif *vif);
+bool xenvif_schedulable(struct xenvif *vif);
 
 int xenvif_queue_stopped(struct xenvif_queue *queue);
 void xenvif_wake_queue(struct xenvif_queue *queue);
drivers/net/xen-netback/interface.c +1 -1
index 1a83e19..b5fcb52 100644
@@ -63,7 +63,7 @@ void xenvif_skb_zerocopy_complete(struct xenvif_queue *queue)
 	atomic_dec(&queue->inflight_packets);
 }
 
-int xenvif_schedulable(struct xenvif *vif)
+bool xenvif_schedulable(struct xenvif *vif)
 {
 	return netif_running(vif->dev) &&
 		test_bit(VIF_STATUS_CONNECTED, &vif->status) &&
Signature · 1 line
2.1.4