* [Ocfs2-devel] [PATCH] ocfs2: Simplify the calculation of variables
@ 2021-02-02 3:10 Jiapeng Chong
2021-02-02 7:28 ` Joseph Qi
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-02-02 3:10 UTC (permalink / raw)
To: mark; +Cc: Jiapeng Chong, ocfs2-devel, linux-kernel
Fix the following coccicheck warnings:
./fs/ocfs2/refcounttree.c:981:16-18: WARNING !A || A && B is equivalent
to !A || B.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
fs/ocfs2/refcounttree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 3b397fa..115365e85 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -978,7 +978,7 @@ static int ocfs2_get_refcount_cpos_end(struct ocfs2_caching_info *ci,
return 0;
}
- if (!eb || (eb && !eb->h_next_leaf_blk)) {
+ if (!eb || !eb->h_next_leaf_blk) {
/*
* We are the last extent rec, so any high cpos should
* be stored in this leaf refcount block.
--
1.8.3.1
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Ocfs2-devel] [PATCH] ocfs2: Simplify the calculation of variables
2021-02-02 3:10 [Ocfs2-devel] [PATCH] ocfs2: Simplify the calculation of variables Jiapeng Chong
@ 2021-02-02 7:28 ` Joseph Qi
0 siblings, 0 replies; 2+ messages in thread
From: Joseph Qi @ 2021-02-02 7:28 UTC (permalink / raw)
To: Jiapeng Chong, akpm; +Cc: ocfs2-devel, linux-kernel
On 2/2/21 11:10 AM, Jiapeng Chong wrote:
> Fix the following coccicheck warnings:
>
> ./fs/ocfs2/refcounttree.c:981:16-18: WARNING !A || A && B is equivalent
> to !A || B.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/refcounttree.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
> index 3b397fa..115365e85 100644
> --- a/fs/ocfs2/refcounttree.c
> +++ b/fs/ocfs2/refcounttree.c
> @@ -978,7 +978,7 @@ static int ocfs2_get_refcount_cpos_end(struct ocfs2_caching_info *ci,
> return 0;
> }
>
> - if (!eb || (eb && !eb->h_next_leaf_blk)) {
> + if (!eb || !eb->h_next_leaf_blk) {
> /*
> * We are the last extent rec, so any high cpos should
> * be stored in this leaf refcount block.
>
_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-02 7:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 3:10 [Ocfs2-devel] [PATCH] ocfs2: Simplify the calculation of variables Jiapeng Chong
2021-02-02 7:28 ` Joseph Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).