Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1250140

[PATCH 2/3] staging: lustre: make sptlrpc_flavor_has_bulk return boolean

From Geliang Tang <geliangtang@163.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] staging: lustre: make sptlrpc_flavor_has_bulk return boolean
Date 2015-10-18 16:40 +0200
Message-ID <qkXhT-809-17@gated-at.bofh.it> (permalink)
References <qkXhT-809-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h
index aaadf09..dd1033b 100644
--- a/drivers/staging/lustre/lustre/include/lustre_sec.h
+++ b/drivers/staging/lustre/lustre/include/lustre_sec.h
@@ -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)
 {
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c
index 34d1330..39f5261 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c
@@ -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);
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean Geliang Tang <geliangtang@163.com> - 2015-10-18 16:40 +0200
  [PATCH 3/3] staging: xgifb: make XGIfb_has_VB return boolean Geliang Tang <geliangtang@163.com> - 2015-10-18 16:40 +0200
  [PATCH 2/3] staging: lustre: make sptlrpc_flavor_has_bulk return boolean Geliang Tang <geliangtang@163.com> - 2015-10-18 16:40 +0200
  Re: [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers  return boolean Ian Abbott <abbotti@mev.co.uk> - 2015-10-21 18:50 +0200

csiph-web