staging: lustre: make sptlrpc_flavor_has_bulk return boolean
authorGeliang Tang <geliangtang@163.com>
Sun, 18 Oct 2015 14:35:31 +0000 (22:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 01:41:09 +0000 (18:41 -0700)
This patch makes sptlrpc_flavor_has_bulk return boolean, since
this function only uses either one or zero as its return value.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_sec.h
drivers/staging/lustre/lustre/ptlrpc/sec.c

index aaadf098989f552b099879c071a57fbc74ce4fbb..dd1033be6bfab046bb717ab5504f4f14e6e46e17 100644 (file)
@@ -322,7 +322,7 @@ struct sptlrpc_rule_set {
 };
 
 int sptlrpc_parse_flavor(const char *str, struct sptlrpc_flavor *flvr);
-int sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr);
+bool sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr);
 
 static inline void sptlrpc_rule_set_init(struct sptlrpc_rule_set *set)
 {
index 34d13307530233d7993ee6aad4d0df80fc2c987c..39f5261c9854184a48d4d42a917a754b436ef3fc 100644 (file)
@@ -2261,14 +2261,14 @@ EXPORT_SYMBOL(sec2target_str);
 /*
  * return true if the bulk data is protected
  */
-int sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr)
+bool sptlrpc_flavor_has_bulk(struct sptlrpc_flavor *flvr)
 {
        switch (SPTLRPC_FLVR_BULK_SVC(flvr->sf_rpc)) {
        case SPTLRPC_BULK_SVC_INTG:
        case SPTLRPC_BULK_SVC_PRIV:
-               return 1;
+               return true;
        default:
-               return 0;
+               return false;
        }
 }
 EXPORT_SYMBOL(sptlrpc_flavor_has_bulk);