Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1250138 > unrolled thread
| Started by | Geliang Tang <geliangtang@163.com> |
|---|---|
| First post | 2015-10-18 16:40 +0200 |
| Last post | 2015-10-21 18:50 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[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
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-10-18 16:40 +0200 |
| Subject | [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean |
| Message-ID | <qkXhT-809-3@gated-at.bofh.it> |
This patch makes ni_tio_has_gate2_registers 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/comedi/drivers/ni_tio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
index c20c51b..b74e44e 100644
--- a/drivers/staging/comedi/drivers/ni_tio.c
+++ b/drivers/staging/comedi/drivers/ni_tio.c
@@ -167,15 +167,15 @@ static inline unsigned GI_HW_ARM_SEL_MASK(enum ni_gpct_variant variant)
}
}
-static int ni_tio_has_gate2_registers(const struct ni_gpct_device *counter_dev)
+static bool ni_tio_has_gate2_registers(const struct ni_gpct_device *counter_dev)
{
switch (counter_dev->variant) {
case ni_gpct_variant_e_series:
default:
- return 0;
+ return false;
case ni_gpct_variant_m_series:
case ni_gpct_variant_660x:
- return 1;
+ return true;
}
}
--
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/
[toc] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-10-18 16:40 +0200 |
| Subject | [PATCH 3/3] staging: xgifb: make XGIfb_has_VB return boolean |
| Message-ID | <qkXhT-809-9@gated-at.bofh.it> |
| In reply to | #1250138 |
This patch makes XGIfb_has_VB 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/xgifb/XGI_main_26.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 5a6251a4..89f5b55 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1548,7 +1548,7 @@ static void XGIfb_detect_VB(struct xgifb_video_info *xgifb_info)
}
}
-static int XGIfb_has_VB(struct xgifb_video_info *xgifb_info)
+static bool XGIfb_has_VB(struct xgifb_video_info *xgifb_info)
{
u8 vb_chipid;
@@ -1562,9 +1562,9 @@ static int XGIfb_has_VB(struct xgifb_video_info *xgifb_info)
break;
default:
xgifb_info->hasVB = HASVB_NONE;
- return 0;
+ return false;
}
- return 1;
+ return true;
}
static void XGIfb_get_VB_type(struct xgifb_video_info *xgifb_info)
--
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/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-10-18 16:40 +0200 |
| Subject | [PATCH 2/3] staging: lustre: make sptlrpc_flavor_has_bulk return boolean |
| Message-ID | <qkXhT-809-17@gated-at.bofh.it> |
| In reply to | #1250138 |
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/
[toc] | [prev] | [next] | [standalone]
| From | Ian Abbott <abbotti@mev.co.uk> |
|---|---|
| Date | 2015-10-21 18:50 +0200 |
| Subject | Re: [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean |
| Message-ID | <qm4Km-nt-1@gated-at.bofh.it> |
| In reply to | #1250138 |
On 18/10/15 15:35, Geliang Tang wrote:
> This patch makes ni_tio_has_gate2_registers 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/comedi/drivers/ni_tio.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
> index c20c51b..b74e44e 100644
> --- a/drivers/staging/comedi/drivers/ni_tio.c
> +++ b/drivers/staging/comedi/drivers/ni_tio.c
> @@ -167,15 +167,15 @@ static inline unsigned GI_HW_ARM_SEL_MASK(enum ni_gpct_variant variant)
> }
> }
>
> -static int ni_tio_has_gate2_registers(const struct ni_gpct_device *counter_dev)
> +static bool ni_tio_has_gate2_registers(const struct ni_gpct_device *counter_dev)
> {
> switch (counter_dev->variant) {
> case ni_gpct_variant_e_series:
> default:
> - return 0;
> + return false;
> case ni_gpct_variant_m_series:
> case ni_gpct_variant_660x:
> - return 1;
> + return true;
> }
> }
>
>
Looks okay!
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web