[PATCH 1/3] iteraid: fix trivial sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alexey Dobriyan <[email protected]>
---

 drivers/scsi/iteraid.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

Index: linux-iteraid/drivers/scsi/iteraid.c
===================================================================
--- linux-iteraid.orig/drivers/scsi/iteraid.c	2005-06-17 23:58:33.000000000 +0400
+++ linux-iteraid/drivers/scsi/iteraid.c	2005-06-18 00:53:07.000000000 +0400
@@ -269,16 +269,16 @@ MODULE_LICENSE("GPL");
 
 #define	PRD_BYTES		8	/* PRD table size               */
 #define PRD_ENTRIES		(PAGE_SIZE / (2 * PRD_BYTES))
-struct Scsi_Host *ite_vhost = 0;	/* SCSI virtual host            */
-Scsi_Cmnd *it8212_req_last = 0;	/* SRB request list             */
-unsigned int NumAdapters = 0;	/* Adapters number              */
-PITE_ADAPTER ite_adapters[2];	/* How many adapters support    */
+static struct Scsi_Host *ite_vhost = NULL;	/* SCSI virtual host    */
+static Scsi_Cmnd *it8212_req_last = NULL;	/* SRB request list     */
+static unsigned int NumAdapters = 0;	/* Adapters number              */
+static PITE_ADAPTER ite_adapters[2];	/* How many adapters support    */
 
 /************************************************************************
  * Notifier blockto get a notify on system shutdown/halt/reboot.
  ************************************************************************/
 static int ite_halt(struct notifier_block *nb, ulong event, void *buf);
-struct notifier_block ite_notifier = { ite_halt, NULL, 0
+static struct notifier_block ite_notifier = { ite_halt, NULL, 0
 };
 static struct semaphore mimd_entry_mtx;
 static spinlock_t queue_request_lock = SPIN_LOCK_UNLOCKED;
@@ -967,7 +967,7 @@ IdeSetupDma(PChannel pChan, unsigned lon
 /************************************************************************
  * This will be only used in RAID mode.
  ************************************************************************/
-void IT8212ReconfigChannel(PChannel pChan, u8 ArrayId, u8 Operation)
+static void IT8212ReconfigChannel(PChannel pChan, u8 ArrayId, u8 Operation)
 {
 	u8 enableVirtualChannel;
 	struct pci_dev *pPciDev = pChan->pPciDev;
@@ -999,7 +999,7 @@ void IT8212ReconfigChannel(PChannel pCha
  * Only after receiving SET CHIP STATUS command, the corresponding virtual
  * device will be active.
  ************************************************************************/
-u8 IT8212GetChipStatus(uioctl_t * ioc)
+static u8 IT8212GetChipStatus(uioctl_t * ioc)
 {
 	u8 PriMasterIsNull = FALSE;
 	u8 statusByte;
@@ -1128,7 +1128,7 @@ exit:
 /************************************************************************
  * Erase the partition table.
  ************************************************************************/
-unsigned char IT8212ErasePartition(uioctl_t * pioc)
+static unsigned char IT8212ErasePartition(uioctl_t * pioc)
 {
 	unsigned char drvSelect;
 	unsigned char statusByte = 0;
@@ -1880,7 +1880,7 @@ static u8 IT8212ResetAdapter(PITE_ADAPTE
 /************************************************************************
  * Rebuild disk array.
  ************************************************************************/
-u8 IT8212Rebuild(uioctl_t * pioc)
+static u8 IT8212Rebuild(uioctl_t * pioc)
 {
 	u8 rebuildDirection;
 	u8 statusByte = 0;
@@ -3299,7 +3299,7 @@ static u8 IdeVerify(PChannel pChan, PSCS
  * This function is used to copy memory with overlapped destination and
  * source. I guess ScsiPortMoveMemory cannot handle this well. Can it?
  ************************************************************************/
-void
+static void
 IT8212MoveMemory(unsigned char *DestAddr, unsigned char *SrcAddr, u32 ByteCount)
 {
 	long i;
@@ -5321,7 +5321,7 @@ exit:
 		/*
 		 * Return TURE or FALSE to user space.
 		 */
-		put_user(status, (u8 *) arg);
+		put_user(status, (u8 __user *) arg);
 		return 0;
 	case ITE_IOC_GET_DRIVER_VERSION:
 		dprintk("ITE_IOC_GET_DRIVER_VERSION\n");
@@ -5329,7 +5329,7 @@ exit:
 		/*
 		 * Get the current driver version.
 		 */
-		put_user(driver_ver, (int *)arg);
+		put_user(driver_ver, (int __user *)arg);
 		return 0;
 	default:
 		return -EINVAL;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux