Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 172c122d authored by Harvey Harrison's avatar Harvey Harrison Committed by Linus Torvalds
Browse files

scsi: fix integer as NULL pointer warnings



drivers/scsi/aic7xxx/aic7770_osm.c:53:58: warning: Using plain integer as NULL pointer
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:355:47: warning: Using plain integer as NULL pointer
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:372:55: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:997:28: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:1003:28: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:1165:46: warning: Using plain integer as NULL pointer
drivers/scsi/fdomain.c:1446:40: warning: Using plain integer as NULL pointer
drivers/scsi/sym53c8xx_2/sym_hipd.c:1650:51: warning: Using plain integer as NULL pointer
drivers/scsi/sym53c8xx_2/sym_hipd.c:3171:42: warning: Using plain integer as NULL pointer
drivers/scsi/sym53c8xx_2/sym_hipd.c:5732:52: warning: Using plain integer as NULL pointer
drivers/scsi/ncr53c8xx.c:8189:31: warning: Using plain integer as NULL pointer
drivers/scsi/ncr53c8xx.c:8225:34: warning: Using plain integer as NULL pointer
drivers/scsi/dpt_i2o.c:156:32: warning: Using plain integer as NULL pointer
drivers/scsi/ultrastor.c:954:42: warning: Using plain integer as NULL pointer
drivers/scsi/ultrastor.c:1104:18: warning: Using plain integer as NULL pointer

Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8ab68ab4
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -994,13 +994,13 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct completion *complete,
	SCpnt->SCp.sent_command	= 0;
	SCpnt->SCp.sent_command	= 0;


	if(SCpnt->SCp.phase & (resetting|check_condition)) {
	if(SCpnt->SCp.phase & (resetting|check_condition)) {
		if(SCpnt->host_scribble==0 || SCSEM(SCpnt) || SCNEXT(SCpnt)) {
		if (!SCpnt->host_scribble || SCSEM(SCpnt) || SCNEXT(SCpnt)) {
			printk(ERR_LEAD "cannot reuse command\n", CMDINFO(SCpnt));
			printk(ERR_LEAD "cannot reuse command\n", CMDINFO(SCpnt));
			return FAILED;
			return FAILED;
		}
		}
	} else {
	} else {
		SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC);
		SCpnt->host_scribble = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC);
		if(SCpnt->host_scribble==0) {
		if(!SCpnt->host_scribble) {
			printk(ERR_LEAD "allocation failed\n", CMDINFO(SCpnt));
			printk(ERR_LEAD "allocation failed\n", CMDINFO(SCpnt));
			return FAILED;
			return FAILED;
		}
		}
@@ -1162,7 +1162,7 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
	}
	}


	DO_LOCK(flags);
	DO_LOCK(flags);
	issued       = remove_SC(&ISSUE_SC, SCpnt)==0;
	issued       = remove_SC(&ISSUE_SC, SCpnt) == NULL;
	disconnected = issued && remove_SC(&DISCONNECTED_SC, SCpnt);
	disconnected = issued && remove_SC(&DISCONNECTED_SC, SCpnt);
	DO_UNLOCK(flags);
	DO_UNLOCK(flags);


+1 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,7 @@ aic7770_map_registers(struct ahc_softc *ahc, u_int port)
	/*
	/*
	 * Lock out other contenders for our i/o space.
	 * Lock out other contenders for our i/o space.
	 */
	 */
	if (request_region(port, AHC_EISA_IOSIZE, "aic7xxx") == 0)
	if (!request_region(port, AHC_EISA_IOSIZE, "aic7xxx"))
		return (ENOMEM);
		return (ENOMEM);
	ahc->tag = BUS_SPACE_PIO;
	ahc->tag = BUS_SPACE_PIO;
	ahc->bsh.ioport = port;
	ahc->bsh.ioport = port;
+2 −2
Original line number Original line Diff line number Diff line
@@ -352,7 +352,7 @@ ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, resource_size_t *base)
	*base = pci_resource_start(ahc->dev_softc, 0);
	*base = pci_resource_start(ahc->dev_softc, 0);
	if (*base == 0)
	if (*base == 0)
		return (ENOMEM);
		return (ENOMEM);
	if (request_region(*base, 256, "aic7xxx") == 0)
	if (!request_region(*base, 256, "aic7xxx"))
		return (ENOMEM);
		return (ENOMEM);
	return (0);
	return (0);
}
}
@@ -369,7 +369,7 @@ ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
	start = pci_resource_start(ahc->dev_softc, 1);
	start = pci_resource_start(ahc->dev_softc, 1);
	if (start != 0) {
	if (start != 0) {
		*bus_addr = start;
		*bus_addr = start;
		if (request_mem_region(start, 0x1000, "aic7xxx") == 0)
		if (!request_mem_region(start, 0x1000, "aic7xxx"))
			error = ENOMEM;
			error = ENOMEM;
		if (error == 0) {
		if (error == 0) {
			*maddr = ioremap_nocache(start, 256);
			*maddr = ioremap_nocache(start, 256);
+1 −1
Original line number Original line Diff line number Diff line
@@ -153,7 +153,7 @@ static DEFINE_SPINLOCK(adpt_post_wait_lock);


static u8 adpt_read_blink_led(adpt_hba* host)
static u8 adpt_read_blink_led(adpt_hba* host)
{
{
	if(host->FwDebugBLEDflag_P != 0) {
	if (host->FwDebugBLEDflag_P) {
		if( readb(host->FwDebugBLEDflag_P) == 0xbc ){
		if( readb(host->FwDebugBLEDflag_P) == 0xbc ){
			return readb(host->FwDebugBLEDvalue_P);
			return readb(host->FwDebugBLEDvalue_P);
		}
		}
+1 −1
Original line number Original line Diff line number Diff line
@@ -1443,7 +1443,7 @@ static int fdomain_16x0_queue(struct scsi_cmnd *SCpnt,
	   current_SC->SCp.this_residual    = current_SC->SCp.buffer->length;
	   current_SC->SCp.this_residual    = current_SC->SCp.buffer->length;
	   current_SC->SCp.buffers_residual = scsi_sg_count(current_SC) - 1;
	   current_SC->SCp.buffers_residual = scsi_sg_count(current_SC) - 1;
   } else {
   } else {
	   current_SC->SCp.ptr              = 0;
	   current_SC->SCp.ptr              = NULL;
	   current_SC->SCp.this_residual    = 0;
	   current_SC->SCp.this_residual    = 0;
	   current_SC->SCp.buffer           = NULL;
	   current_SC->SCp.buffer           = NULL;
	   current_SC->SCp.buffers_residual = 0;
	   current_SC->SCp.buffers_residual = 0;
Loading