aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-02-21 03:28:00 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-03-11 12:12:36 -0400
commit862794fa3fd4c8a44ee22582418736c93e0d3c3a (patch)
treeeb387c2f57c22a93cdb770a9c93e63bd4ef47e19 /drivers/s390/scsi
parentbe521466feb3bb1cd89de82a2b1d080e9ebd3cb6 (diff)
[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/scsi')
-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)
299 } 299 }
300 300
301 /* log additional information provided by FSF (if any) */ 301 /* log additional information provided by FSF (if any) */
302 if (unlikely(qtcb->header.log_length)) { 302 if (likely(qtcb->header.log_length)) {
303 /* do not trust them ;-) */ 303 /* do not trust them ;-) */
304 if (qtcb->header.log_start > sizeof(struct fsf_qtcb)) { 304 if (unlikely(qtcb->header.log_start >
305 sizeof(struct fsf_qtcb))) {
305 ZFCP_LOG_NORMAL 306 ZFCP_LOG_NORMAL
306 ("bug: ULP (FSF logging) log data starts " 307 ("bug: ULP (FSF logging) log data starts "
307 "beyond end of packet header. Ignored. " 308 "beyond end of packet header. Ignored. "
@@ -310,8 +311,9 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
310 sizeof(struct fsf_qtcb)); 311 sizeof(struct fsf_qtcb));
311 goto forget_log; 312 goto forget_log;
312 } 313 }
313 if ((size_t) (qtcb->header.log_start + qtcb->header.log_length) 314 if (unlikely((size_t) (qtcb->header.log_start +
314 > sizeof(struct fsf_qtcb)) { 315 qtcb->header.log_length) >
316 sizeof(struct fsf_qtcb))) {
315 ZFCP_LOG_NORMAL("bug: ULP (FSF logging) log data ends " 317 ZFCP_LOG_NORMAL("bug: ULP (FSF logging) log data ends "
316 "beyond end of packet header. Ignored. " 318 "beyond end of packet header. Ignored. "
317 "(start=%i, length=%i, size=%li)\n", 319 "(start=%i, length=%i, size=%li)\n",