* [patch] ocfs2: double evaluation concerns in mlog_errno()
@ 2015-04-03 8:33 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-04-03 8:33 UTC (permalink / raw)
To: ocfs2-devel
It won't happen in real life, but for consistency etc then we should
only evaluate the "st" parameter once.
Also, since not all callers use the new return, it causes at static
checker warning:
fs/ocfs2/export.c:138 ocfs2_get_dentry() warn: unchecked 'PTR_ERR'
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h
index f96a51d..7fdc25a 100644
--- a/fs/ocfs2/cluster/masklog.h
+++ b/fs/ocfs2/cluster/masklog.h
@@ -202,7 +202,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
_st != AOP_TRUNCATED_PAGE && _st != -ENOSPC && \
_st != -EDQUOT) \
mlog(ML_ERROR, "status = %lld\n", (long long)_st); \
- st; \
+ _st; \
})
#define mlog_bug_on_msg(cond, fmt, args...) do { \
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Ocfs2-devel] [patch] ocfs2: double evaluation concerns in mlog_errno()
@ 2015-04-03 8:33 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-04-03 8:33 UTC (permalink / raw)
To: ocfs2-devel
It won't happen in real life, but for consistency etc then we should
only evaluate the "st" parameter once.
Also, since not all callers use the new return, it causes at static
checker warning:
fs/ocfs2/export.c:138 ocfs2_get_dentry() warn: unchecked 'PTR_ERR'
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h
index f96a51d..7fdc25a 100644
--- a/fs/ocfs2/cluster/masklog.h
+++ b/fs/ocfs2/cluster/masklog.h
@@ -202,7 +202,7 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits;
_st != AOP_TRUNCATED_PAGE && _st != -ENOSPC && \
_st != -EDQUOT) \
mlog(ML_ERROR, "status = %lld\n", (long long)_st); \
- st; \
+ _st; \
})
#define mlog_bug_on_msg(cond, fmt, args...) do { \
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-03 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-03 8:33 [patch] ocfs2: double evaluation concerns in mlog_errno() Dan Carpenter
2015-04-03 8:33 ` [Ocfs2-devel] " Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.