linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Donald.Huang@ite.com.tw, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] iteraid: fix trivial sparse warnings
Date: Sat, 18 Jun 2005 02:40:29 +0400	[thread overview]
Message-ID: <200506180240.29240.adobriyan@gmail.com> (raw)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 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;

                 reply	other threads:[~2005-06-17 22:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200506180240.29240.adobriyan@gmail.com \
    --to=adobriyan@gmail.com \
    --cc=Donald.Huang@ite.com.tw \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).