diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-04-20 19:54:48 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-04-24 18:11:22 -0400 |
commit | 144b139c96200c51248b8701a1ef4a6bebd3dc8c (patch) | |
tree | 9a1627f8e648ee9d5259e59a69139a742f30d429 /drivers/scsi | |
parent | 45c80be614b094459f2c699353080e4f8059f610 (diff) | |
download | op-kernel-dev-144b139c96200c51248b8701a1ef4a6bebd3dc8c.zip op-kernel-dev-144b139c96200c51248b8701a1ef4a6bebd3dc8c.tar.gz |
scsi: pmcraid: fix minor sparse warnings
pmcraid_minor is only used in this one file and should be 'static' as suggested
by sparse:
drivers/scsi/pmcraid.c:80:1: warning: symbol 'pmcraid_minor' was not declared. Should it be static?
In Linux coding style, a literal '0' integer should not be used to represent
a NULL pointer:
drivers/scsi/pmcraid.c:348:29: warning: Using plain integer as NULL pointer
drivers/scsi/pmcraid.c:4824:49: warning: Using plain integer as NULL pointer
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/pmcraid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 35a2b36..94f71ae 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c @@ -77,7 +77,7 @@ static atomic_t pmcraid_adapter_count = ATOMIC_INIT(0); */ static unsigned int pmcraid_major; static struct class *pmcraid_class; -DECLARE_BITMAP(pmcraid_minor, PMCRAID_MAX_ADAPTERS); +static DECLARE_BITMAP(pmcraid_minor, PMCRAID_MAX_ADAPTERS); /* * Module parameters @@ -345,7 +345,7 @@ static void pmcraid_init_cmdblk(struct pmcraid_cmd *cmd, int index) cmd->scsi_cmd = NULL; cmd->release = 0; cmd->completion_req = 0; - cmd->sense_buffer = 0; + cmd->sense_buffer = NULL; cmd->sense_buffer_dma = 0; cmd->dma_handle = 0; init_timer(&cmd->timer); @@ -4818,7 +4818,7 @@ static int pmcraid_allocate_host_rrqs(struct pmcraid_instance *pinstance) buffer_size, &(pinstance->hrrq_start_bus_addr[i])); - if (pinstance->hrrq_start[i] == 0) { + if (!pinstance->hrrq_start[i]) { pmcraid_err("pci_alloc failed for hrrq vector : %d\n", i); pmcraid_release_host_rrqs(pinstance, i); |