linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / s390 / block / dasd_erp.c
index 58a6509..8fd71ab 100644 (file)
@@ -9,6 +9,7 @@
  *
  */
 
+#include <linux/config.h>
 #include <linux/ctype.h>
 #include <linux/init.h>
 
@@ -31,8 +32,9 @@ dasd_alloc_erp_request(char *magic, int cplength, int datasize,
        int size;
 
        /* Sanity checks */
-       BUG_ON( magic == NULL || datasize > PAGE_SIZE ||
-            (cplength*sizeof(struct ccw1)) > PAGE_SIZE);
+       if ( magic == NULL || datasize > PAGE_SIZE ||
+            (cplength*sizeof(struct ccw1)) > PAGE_SIZE)
+               BUG();
 
        size = (sizeof(struct dasd_ccw_req) + 7L) & -8L;
        if (cplength > 0)
@@ -89,7 +91,7 @@ dasd_default_erp_action(struct dasd_ccw_req * cqr)
 
         /* just retry - there is nothing to save ... I got no sense data.... */
         if (cqr->retries > 0) {
-               DEV_MESSAGE (KERN_DEBUG, device,
+                DEV_MESSAGE (KERN_DEBUG, device, 
                              "default ERP called (%i retries left)",
                              cqr->retries);
                cqr->lpm    = LPM_ANYPATH;
@@ -123,7 +125,8 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr)
        struct dasd_device *device;
        int success;
 
-       BUG_ON(cqr->refers == NULL || cqr->function == NULL);
+       if (cqr->refers == NULL || cqr->function == NULL)
+               BUG();
 
        device = cqr->device;
        success = cqr->status == DASD_CQR_DONE;
@@ -154,7 +157,7 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr)
 
 /*
  * Print the hex dump of the memory used by a request. This includes
- * all error recovery ccws that have been chained in from of the
+ * all error recovery ccws that have been chained in from of the 
  * real request.
  */
 static inline void
@@ -226,12 +229,12 @@ dasd_log_ccw(struct dasd_ccw_req * cqr, int caller, __u32 cpa)
                /*
                 * Log bytes arround failed CCW but only if we did
                 * not log the whole CP of the CCW is outside the
-                * logged CP.
+                * logged CP. 
                 */
                if (cplength > 40 ||
                    ((addr_t) cpa < (addr_t) lcqr->cpaddr &&
                     (addr_t) cpa > (addr_t) (lcqr->cpaddr + cplength + 4))) {
-
+                       
                        DEV_MESSAGE(KERN_ERR, device,
                                    "Failed CCW (%p) (area):",
                                    (void *) (long) cpa);