summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-02-21 09:28:00 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-03-11 11:12:36 -0500
commit862794fa3fd4c8a44ee22582418736c93e0d3c3a (patch)
treeeb387c2f57c22a93cdb770a9c93e63bd4ef47e19 /drivers/s390
parentbe521466feb3bb1cd89de82a2b1d080e9ebd3cb6 (diff)
downloadlinux-862794fa3fd4c8a44ee22582418736c93e0d3c3a.tar.gz
linux-862794fa3fd4c8a44ee22582418736c93e0d3c3a.tar.bz2
linux-862794fa3fd4c8a44ee22582418736c93e0d3c3a.zip
[SCSI] zfcp: fix likely/unlikely usage
zfcp_fsf_protstatus_eval() takes always the 'wrong' branch. Likely Profiling Results --------------------------------------------------------- [+- ] Type | # True | # False | Function:Filename@Line +unlikely | 11042| 0 zfcp_fsf_protstatus_eval() Acked-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index ef16f7ca4bb1..4c0a59afd5c8 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -299,9 +299,10 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
}
/* log additional information provided by FSF (if any) */
- if (unlikely(qtcb->header.log_length)) {
+ if (likely(qtcb->header.log_length)) {
/* do not trust them ;-) */
- if (qtcb->header.log_start > sizeof(struct fsf_qtcb)) {
+ if (unlikely(qtcb->header.log_start >
+ sizeof(struct fsf_qtcb))) {
ZFCP_LOG_NORMAL
("bug: ULP (FSF logging) log data starts "
"beyond end of packet header. Ignored. "
@@ -310,8 +311,9 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
sizeof(struct fsf_qtcb));
goto forget_log;
}
- if ((size_t) (qtcb->header.log_start + qtcb->header.log_length)
- > sizeof(struct fsf_qtcb)) {
+ if (unlikely((size_t) (qtcb->header.log_start +
+ qtcb->header.log_length) >
+ sizeof(struct fsf_qtcb))) {
ZFCP_LOG_NORMAL("bug: ULP (FSF logging) log data ends "
"beyond end of packet header. Ignored. "
"(start=%i, length=%i, size=%li)\n",