From aef7fa62d90965810796835ba492a70071aa66d4 Mon Sep 17 00:00:00 2001 From: Dotan Barak Date: Thu, 14 Aug 2008 22:42:58 +0000 Subject: [PATCH] Fixed the following sparse warnings: warning: Using plain integer as NULL pointer warning: obsolete struct initializer, use C99 syntax warning: symbol 'hba_api_ioctl_operations' was not declared. Should it be static? Submitted-by: Dotan Barak git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@488 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla_isp/linux/isp_cb_ops.c | 15 +++++---------- qla_isp/linux/isp_linux.c | 2 +- qla_isp/linux/isp_pci.c | 10 +++++----- qla_isp/linux/isp_scst.c | 2 +- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/qla_isp/linux/isp_cb_ops.c b/qla_isp/linux/isp_cb_ops.c index a875849d9..3fcaee4fd 100644 --- a/qla_isp/linux/isp_cb_ops.c +++ b/qla_isp/linux/isp_cb_ops.c @@ -346,15 +346,10 @@ struct cdev isp_cdev = { ISP_CLASS *isp_class; struct file_operations isp_ioctl_operations = { - owner: THIS_MODULE, - open: isp_open, - release: isp_close, - ioctl: isp_ioctl, -}; - -struct file_operations hba_api_ioctl_operations = { - owner: THIS_MODULE, - ioctl: isp_qlogic_ext_ioctl, + .owner = THIS_MODULE, + .open = isp_open, + .release = isp_close, + .ioctl = isp_ioctl, }; static int @@ -787,7 +782,7 @@ static void *isp_exti_usrptr(UINT64, UINT16); static int isp_exti_passthru(EXT_IOCTL *); static int isp_run_cmd(ispsoftc_t *, isp_xcmd_t *); -int +static int isp_qlogic_ext_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) { EXT_IOCTL ext; diff --git a/qla_isp/linux/isp_linux.c b/qla_isp/linux/isp_linux.c index 675ac8362..ecdf77b1b 100644 --- a/qla_isp/linux/isp_linux.c +++ b/qla_isp/linux/isp_linux.c @@ -2571,7 +2571,7 @@ isp_complete_ctio(ispsoftc_t *isp, tmd_xact_t *xact) } -int +static int isp_fc_change_role(ispsoftc_t *isp, int chan, int new_role) { fcparam *fcp; diff --git a/qla_isp/linux/isp_pci.c b/qla_isp/linux/isp_pci.c index d5cffdd16..dfbb1cfaa 100644 --- a/qla_isp/linux/isp_pci.c +++ b/qla_isp/linux/isp_pci.c @@ -425,7 +425,7 @@ map_isp_io(struct isp_pcisoftc *isp_pci, u_short cmd, vm_offset_t io_base) return (0); } -void +static void isplinux_pci_release(struct Scsi_Host *host) { ispsoftc_t *isp = ISP_HOST2ISP(host); @@ -449,9 +449,9 @@ isplinux_pci_release(struct Scsi_Host *host) pci_disable_msi(isp_pci->pci_dev); isp_pci->msi_enabled = 0; } - if (isp_pci->vaddr != 0) { + if (isp_pci->vaddr != NULL) { unmap_pci_mem(isp_pci, 0xff); - isp_pci->vaddr = 0; + isp_pci->vaddr = NULL; } else if (isp_pci->port) { release_region(isp_pci->port, 0xff); isp_pci->port = 0; @@ -969,9 +969,9 @@ bad: isp_pci->msi_enabled = 0; pci_disable_msi(isp_pci->pci_dev); } - if (isp_pci->vaddr != 0) { + if (isp_pci->vaddr != NULL) { unmap_pci_mem(isp_pci, 0xff); - isp_pci->vaddr = 0; + isp_pci->vaddr = NULL; } else { release_region(isp_pci->port, 0xff); isp_pci->port = 0; diff --git a/qla_isp/linux/isp_scst.c b/qla_isp/linux/isp_scst.c index 29f8e7dbe..cfbc977fd 100644 --- a/qla_isp/linux/isp_scst.c +++ b/qla_isp/linux/isp_scst.c @@ -853,7 +853,7 @@ notify_ack: (*bp->h.r_action) (QIN_NOTIFY_ACK, np); } -void +static void scsi_target_handler(qact_e action, void *arg) { unsigned long flags;