aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/request.h
diff options
context:
space:
mode:
authorBartosz Barcinski <Bartosz.Barcinski@intel.com>2011-04-12 20:28:43 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:00:37 -0400
commit6cb4d6b382be6345c2d0c4b1b90dfdf9af32da7e (patch)
tree9d9849a1557888051429a36d4ffa2cbd2dd3591e /drivers/scsi/isci/request.h
parent467e855a0331f619f41fbf7391bc29ec0ca923a0 (diff)
isci: audit usage of BUG_ON macro in isci driver
Removes unnecessary usage of BUG_ON macro, excluding core directory. In some cases macro is unnecesary, check is done in caller function. In other cases macro is replaced by if construction with appropriate warning. Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com> [changed some survivable bug conditions to WARN_ONCE] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.h')
-rw-r--r--drivers/scsi/isci/request.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index 0c08da6bcd8a..642b21166fc6 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -193,8 +193,6 @@ static inline enum isci_request_status isci_request_change_started_to_newstate(
193 enum isci_request_status old_state; 193 enum isci_request_status old_state;
194 unsigned long flags; 194 unsigned long flags;
195 195
196 BUG_ON(isci_request == NULL);
197
198 spin_lock_irqsave(&isci_request->state_lock, flags); 196 spin_lock_irqsave(&isci_request->state_lock, flags);
199 197
200 old_state = isci_request->status; 198 old_state = isci_request->status;
@@ -243,7 +241,8 @@ static inline void isci_request_free(
243 struct isci_host *isci_host, 241 struct isci_host *isci_host,
244 struct isci_request *isci_request) 242 struct isci_request *isci_request)
245{ 243{
246 BUG_ON(isci_request == NULL); 244 if (!isci_request)
245 return;
247 246
248 /* release the dma memory if we fail. */ 247 /* release the dma memory if we fail. */
249 dma_pool_free(isci_host->dma_pool, isci_request, 248 dma_pool_free(isci_host->dma_pool, isci_request,