diff options
-rw-r--r-- | drivers/scsi/aha152x.c | 6 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7770_osm.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 4 | ||||
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 2 | ||||
-rw-r--r-- | drivers/scsi/fdomain.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ncr53c8xx.c | 4 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_hipd.c | 6 | ||||
-rw-r--r-- | drivers/scsi/ultrastor.c | 4 |
8 files changed, 15 insertions, 15 deletions
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index a09b2d3fdf5a..f5215fd4b73d 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
@@ -994,13 +994,13 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete, | |||
994 | SCpnt->SCp.sent_command = 0; | 994 | SCpnt->SCp.sent_command = 0; |
995 | 995 | ||
996 | if(SCpnt->SCp.phase & (resetting|check_condition)) { | 996 | if(SCpnt->SCp.phase & (resetting|check_condition)) { |
997 | if(SCpnt->host_scribble==0 || SCSEM(SCpnt) || SCNEXT(SCpnt)) { | 997 | if (!SCpnt->host_scribble || SCSEM(SCpnt) || SCNEXT(SCpnt)) { |
998 | printk(ERR_LEAD "cannot reuse command\n", CMDINFO(SCpnt)); | 998 | printk(ERR_LEAD "cannot reuse command\n", CMDINFO(SCpnt)); |
999 | return FAILED; | 999 | return FAILED; |
1000 | } | 1000 | } |
1001 | } else { | 1001 | } else { |
1002 | SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC); | 1002 | SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC); |
1003 | if(SCpnt->host_scribble==0) { | 1003 | if(!SCpnt->host_scribble) { |
1004 | printk(ERR_LEAD "allocation failed\n", CMDINFO(SCpnt)); | 1004 | printk(ERR_LEAD "allocation failed\n", CMDINFO(SCpnt)); |
1005 | return FAILED; | 1005 | return FAILED; |
1006 | } | 1006 | } |
@@ -1162,7 +1162,7 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt) | |||
1162 | } | 1162 | } |
1163 | 1163 | ||
1164 | DO_LOCK(flags); | 1164 | DO_LOCK(flags); |
1165 | issued = remove_SC(&ISSUE_SC, SCpnt)==0; | 1165 | issued = remove_SC(&ISSUE_SC, SCpnt) == NULL; |
1166 | disconnected = issued && remove_SC(&DISCONNECTED_SC, SCpnt); | 1166 | disconnected = issued && remove_SC(&DISCONNECTED_SC, SCpnt); |
1167 | DO_UNLOCK(flags); | 1167 | DO_UNLOCK(flags); |
1168 | 1168 | ||
diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c index 1ac119733bac..f220e5e436ab 100644 --- a/drivers/scsi/aic7xxx/aic7770_osm.c +++ b/drivers/scsi/aic7xxx/aic7770_osm.c | |||
@@ -50,7 +50,7 @@ aic7770_map_registers(struct ahc_softc *ahc, u_int port) | |||
50 | /* | 50 | /* |
51 | * Lock out other contenders for our i/o space. | 51 | * Lock out other contenders for our i/o space. |
52 | */ | 52 | */ |
53 | if (request_region(port, AHC_EISA_IOSIZE, "aic7xxx") == 0) | 53 | if (!request_region(port, AHC_EISA_IOSIZE, "aic7xxx")) |
54 | return (ENOMEM); | 54 | return (ENOMEM); |
55 | ahc->tag = BUS_SPACE_PIO; | 55 | ahc->tag = BUS_SPACE_PIO; |
56 | ahc->bsh.ioport = port; | 56 | ahc->bsh.ioport = port; |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c index 0d7628f1f1ef..00f5b9868574 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | |||
@@ -352,7 +352,7 @@ ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, resource_size_t *base) | |||
352 | *base = pci_resource_start(ahc->dev_softc, 0); | 352 | *base = pci_resource_start(ahc->dev_softc, 0); |
353 | if (*base == 0) | 353 | if (*base == 0) |
354 | return (ENOMEM); | 354 | return (ENOMEM); |
355 | if (request_region(*base, 256, "aic7xxx") == 0) | 355 | if (!request_region(*base, 256, "aic7xxx")) |
356 | return (ENOMEM); | 356 | return (ENOMEM); |
357 | return (0); | 357 | return (0); |
358 | } | 358 | } |
@@ -369,7 +369,7 @@ ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc, | |||
369 | start = pci_resource_start(ahc->dev_softc, 1); | 369 | start = pci_resource_start(ahc->dev_softc, 1); |
370 | if (start != 0) { | 370 | if (start != 0) { |
371 | *bus_addr = start; | 371 | *bus_addr = start; |
372 | if (request_mem_region(start, 0x1000, "aic7xxx") == 0) | 372 | if (!request_mem_region(start, 0x1000, "aic7xxx")) |
373 | error = ENOMEM; | 373 | error = ENOMEM; |
374 | if (error == 0) { | 374 | if (error == 0) { |
375 | *maddr = ioremap_nocache(start, 256); | 375 | *maddr = ioremap_nocache(start, 256); |
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index c9dd8392aab2..ac92ac143b46 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -153,7 +153,7 @@ static DEFINE_SPINLOCK(adpt_post_wait_lock); | |||
153 | 153 | ||
154 | static u8 adpt_read_blink_led(adpt_hba* host) | 154 | static u8 adpt_read_blink_led(adpt_hba* host) |
155 | { | 155 | { |
156 | if(host->FwDebugBLEDflag_P != 0) { | 156 | if (host->FwDebugBLEDflag_P) { |
157 | if( readb(host->FwDebugBLEDflag_P) == 0xbc ){ | 157 | if( readb(host->FwDebugBLEDflag_P) == 0xbc ){ |
158 | return readb(host->FwDebugBLEDvalue_P); | 158 | return readb(host->FwDebugBLEDvalue_P); |
159 | } | 159 | } |
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c index 2cd6b4959eb2..c33bcb284df7 100644 --- a/drivers/scsi/fdomain.c +++ b/drivers/scsi/fdomain.c | |||
@@ -1443,7 +1443,7 @@ static int fdomain_16x0_queue(struct scsi_cmnd *SCpnt, | |||
1443 | current_SC->SCp.this_residual = current_SC->SCp.buffer->length; | 1443 | current_SC->SCp.this_residual = current_SC->SCp.buffer->length; |
1444 | current_SC->SCp.buffers_residual = scsi_sg_count(current_SC) - 1; | 1444 | current_SC->SCp.buffers_residual = scsi_sg_count(current_SC) - 1; |
1445 | } else { | 1445 | } else { |
1446 | current_SC->SCp.ptr = 0; | 1446 | current_SC->SCp.ptr = NULL; |
1447 | current_SC->SCp.this_residual = 0; | 1447 | current_SC->SCp.this_residual = 0; |
1448 | current_SC->SCp.buffer = NULL; | 1448 | current_SC->SCp.buffer = NULL; |
1449 | current_SC->SCp.buffers_residual = 0; | 1449 | current_SC->SCp.buffers_residual = 0; |
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index d89289400425..ceab4f73caf1 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c | |||
@@ -8186,7 +8186,7 @@ static void insert_into_waiting_list(struct ncb *np, struct scsi_cmnd *cmd) | |||
8186 | cmd->next_wcmd = NULL; | 8186 | cmd->next_wcmd = NULL; |
8187 | if (!(wcmd = np->waiting_list)) np->waiting_list = cmd; | 8187 | if (!(wcmd = np->waiting_list)) np->waiting_list = cmd; |
8188 | else { | 8188 | else { |
8189 | while ((wcmd->next_wcmd) != 0) | 8189 | while (wcmd->next_wcmd) |
8190 | wcmd = (struct scsi_cmnd *) wcmd->next_wcmd; | 8190 | wcmd = (struct scsi_cmnd *) wcmd->next_wcmd; |
8191 | wcmd->next_wcmd = (char *) cmd; | 8191 | wcmd->next_wcmd = (char *) cmd; |
8192 | } | 8192 | } |
@@ -8222,7 +8222,7 @@ static void process_waiting_list(struct ncb *np, int sts) | |||
8222 | #ifdef DEBUG_WAITING_LIST | 8222 | #ifdef DEBUG_WAITING_LIST |
8223 | if (waiting_list) printk("%s: waiting_list=%lx processing sts=%d\n", ncr_name(np), (u_long) waiting_list, sts); | 8223 | if (waiting_list) printk("%s: waiting_list=%lx processing sts=%d\n", ncr_name(np), (u_long) waiting_list, sts); |
8224 | #endif | 8224 | #endif |
8225 | while ((wcmd = waiting_list) != 0) { | 8225 | while (wcmd = waiting_list) { |
8226 | waiting_list = (struct scsi_cmnd *) wcmd->next_wcmd; | 8226 | waiting_list = (struct scsi_cmnd *) wcmd->next_wcmd; |
8227 | wcmd->next_wcmd = NULL; | 8227 | wcmd->next_wcmd = NULL; |
8228 | if (sts == DID_OK) { | 8228 | if (sts == DID_OK) { |
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c index 35142b5341b5..22a6aae78699 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c | |||
@@ -1647,7 +1647,7 @@ static void sym_flush_comp_queue(struct sym_hcb *np, int cam_status) | |||
1647 | SYM_QUEHEAD *qp; | 1647 | SYM_QUEHEAD *qp; |
1648 | struct sym_ccb *cp; | 1648 | struct sym_ccb *cp; |
1649 | 1649 | ||
1650 | while ((qp = sym_remque_head(&np->comp_ccbq)) != 0) { | 1650 | while ((qp = sym_remque_head(&np->comp_ccbq)) != NULL) { |
1651 | struct scsi_cmnd *cmd; | 1651 | struct scsi_cmnd *cmd; |
1652 | cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); | 1652 | cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); |
1653 | sym_insque_tail(&cp->link_ccbq, &np->busy_ccbq); | 1653 | sym_insque_tail(&cp->link_ccbq, &np->busy_ccbq); |
@@ -3168,7 +3168,7 @@ int sym_clear_tasks(struct sym_hcb *np, int cam_status, int target, int lun, int | |||
3168 | * the COMP queue and put back other ones into | 3168 | * the COMP queue and put back other ones into |
3169 | * the BUSY queue. | 3169 | * the BUSY queue. |
3170 | */ | 3170 | */ |
3171 | while ((qp = sym_remque_head(&qtmp)) != 0) { | 3171 | while ((qp = sym_remque_head(&qtmp)) != NULL) { |
3172 | struct scsi_cmnd *cmd; | 3172 | struct scsi_cmnd *cmd; |
3173 | cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); | 3173 | cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); |
3174 | cmd = cp->cmd; | 3174 | cmd = cp->cmd; |
@@ -5729,7 +5729,7 @@ void sym_hcb_free(struct sym_hcb *np) | |||
5729 | sym_mfree_dma(np->dqueue, sizeof(u32)*(MAX_QUEUE*2), "DQUEUE"); | 5729 | sym_mfree_dma(np->dqueue, sizeof(u32)*(MAX_QUEUE*2), "DQUEUE"); |
5730 | 5730 | ||
5731 | if (np->actccbs) { | 5731 | if (np->actccbs) { |
5732 | while ((qp = sym_remque_head(&np->free_ccbq)) != 0) { | 5732 | while ((qp = sym_remque_head(&np->free_ccbq)) != NULL) { |
5733 | cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); | 5733 | cp = sym_que_entry(qp, struct sym_ccb, link_ccbq); |
5734 | sym_mfree_dma(cp, sizeof(*cp), "CCB"); | 5734 | sym_mfree_dma(cp, sizeof(*cp), "CCB"); |
5735 | } | 5735 | } |
diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c index f385dce8dfbe..27aa40f3980e 100644 --- a/drivers/scsi/ultrastor.c +++ b/drivers/scsi/ultrastor.c | |||
@@ -951,7 +951,7 @@ static int ultrastor_abort(struct scsi_cmnd *SCpnt) | |||
951 | printk("abort: command mismatch, %p != %p\n", | 951 | printk("abort: command mismatch, %p != %p\n", |
952 | config.mscp[mscp_index].SCint, SCpnt); | 952 | config.mscp[mscp_index].SCint, SCpnt); |
953 | #endif | 953 | #endif |
954 | if (config.mscp[mscp_index].SCint == 0) | 954 | if (config.mscp[mscp_index].SCint == NULL) |
955 | return FAILED; | 955 | return FAILED; |
956 | 956 | ||
957 | if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); | 957 | if (config.mscp[mscp_index].SCint != SCpnt) panic("Bad abort"); |
@@ -1101,7 +1101,7 @@ static void ultrastor_interrupt(void *dev_id) | |||
1101 | SCtmp = mscp->SCint; | 1101 | SCtmp = mscp->SCint; |
1102 | mscp->SCint = NULL; | 1102 | mscp->SCint = NULL; |
1103 | 1103 | ||
1104 | if (SCtmp == 0) | 1104 | if (!SCtmp) |
1105 | { | 1105 | { |
1106 | #if ULTRASTOR_DEBUG & (UD_ABORT|UD_INTERRUPT) | 1106 | #if ULTRASTOR_DEBUG & (UD_ABORT|UD_INTERRUPT) |
1107 | printk("MSCP %d (%x): no command\n", mscp_index, (unsigned int) mscp); | 1107 | printk("MSCP %d (%x): no command\n", mscp_index, (unsigned int) mscp); |