summaryrefslogtreecommitdiff
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-11-02 23:16:08 +0300
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-12-08 00:49:39 +0300
commit5796aa7b11a6ba9d28a523fc82dddbc96c1a175e (patch)
tree6eb5a670cd0bd8aa6e5cd9521d9f9aad695ed322 /drivers/ieee1394/sbp2.c
parente8ca5668f1546dacc85abcc06511ed113fd929c3 (diff)
downloadlinux-5796aa7b11a6ba9d28a523fc82dddbc96c1a175e.tar.xz
ieee1394: sbp2: some conditions in queue_command are unlikely
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 625f1eb80698..96a743d9b5d5 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -1910,12 +1910,12 @@ static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt,
struct sbp2scsi_host_info *hi;
int result = DID_NO_CONNECT << 16;
- if (!sbp2util_node_is_available(scsi_id))
+ if (unlikely(!sbp2util_node_is_available(scsi_id)))
goto done;
hi = scsi_id->hi;
- if (!hi) {
+ if (unlikely(!hi)) {
SBP2_ERR("sbp2scsi_host_info is NULL - this is bad!");
goto done;
}
@@ -1923,7 +1923,7 @@ static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt,
/* Multiple units are currently represented to the SCSI core as separate
* targets, not as one target with multiple LUs. Therefore return
* selection time-out to any IO directed at non-zero LUNs. */
- if (SCpnt->device->lun)
+ if (unlikely(SCpnt->device->lun))
goto done;
/* handle the request sense command here (auto-request sense) */
@@ -1934,7 +1934,7 @@ static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt,
return 0;
}
- if (!hpsb_node_entry_valid(scsi_id->ne)) {
+ if (unlikely(!hpsb_node_entry_valid(scsi_id->ne))) {
SBP2_ERR("Bus reset in progress - rejecting command");
result = DID_BUS_BUSY << 16;
goto done;
@@ -1942,7 +1942,7 @@ static int sbp2scsi_queuecommand(struct scsi_cmnd *SCpnt,
/* Bidirectional commands are not yet implemented,
* and unknown transfer direction not handled. */
- if (SCpnt->sc_data_direction == DMA_BIDIRECTIONAL) {
+ if (unlikely(SCpnt->sc_data_direction == DMA_BIDIRECTIONAL)) {
SBP2_ERR("Cannot handle DMA_BIDIRECTIONAL - rejecting command");
result = DID_ERROR << 16;
goto done;