Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1270924 > unrolled thread
| Started by | Yaowei Bai <baiyaowei@cmss.chinamobile.com> |
|---|---|
| First post | 2015-11-17 08:00 +0100 |
| Last post | 2015-11-17 15:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] fs/ceph: ceph_frag_contains_value can be boolean Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2015-11-17 08:00 +0100
Re: [PATCH 2/2] fs/ceph: ceph_frag_contains_value can be boolean "Yan, Zheng" <zyan@redhat.com> - 2015-11-17 15:10 +0100
| From | Yaowei Bai <baiyaowei@cmss.chinamobile.com> |
|---|---|
| Date | 2015-11-17 08:00 +0100 |
| Subject | [PATCH 2/2] fs/ceph: ceph_frag_contains_value can be boolean |
| Message-ID | <qvIpc-1tW-1@gated-at.bofh.it> |
This patch makes ceph_frag_contains_value return bool to improve
readability due to this particular function only using either one or
zero as its return value.
No functional change.
Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
---
include/linux/ceph/ceph_frag.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/ceph/ceph_frag.h b/include/linux/ceph/ceph_frag.h
index 970ba5c..b827e06 100644
--- a/include/linux/ceph/ceph_frag.h
+++ b/include/linux/ceph/ceph_frag.h
@@ -40,7 +40,7 @@ static inline __u32 ceph_frag_mask_shift(__u32 f)
return 24 - ceph_frag_bits(f);
}
-static inline int ceph_frag_contains_value(__u32 f, __u32 v)
+static inline bool ceph_frag_contains_value(__u32 f, __u32 v)
{
return (v & ceph_frag_mask(f)) == ceph_frag_value(f);
}
--
1.9.1
--
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 | "Yan, Zheng" <zyan@redhat.com> |
|---|---|
| Date | 2015-11-17 15:10 +0100 |
| Message-ID | <qvP7m-64d-63@gated-at.bofh.it> |
| In reply to | #1270924 |
> On Nov 17, 2015, at 14:52, Yaowei Bai <baiyaowei@cmss.chinamobile.com> wrote:
>
> This patch makes ceph_frag_contains_value return bool to improve
> readability due to this particular function only using either one or
> zero as its return value.
>
> No functional change.
>
> Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
> ---
> include/linux/ceph/ceph_frag.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/ceph/ceph_frag.h b/include/linux/ceph/ceph_frag.h
> index 970ba5c..b827e06 100644
> --- a/include/linux/ceph/ceph_frag.h
> +++ b/include/linux/ceph/ceph_frag.h
> @@ -40,7 +40,7 @@ static inline __u32 ceph_frag_mask_shift(__u32 f)
> return 24 - ceph_frag_bits(f);
> }
>
> -static inline int ceph_frag_contains_value(__u32 f, __u32 v)
> +static inline bool ceph_frag_contains_value(__u32 f, __u32 v)
> {
> return (v & ceph_frag_mask(f)) == ceph_frag_value(f);
> }
> --
> 1.9.1
both applied
Thanks
Yan, Zheng
>
>
>
--
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