[OpenBIOS] r293 - openbios-devel/drivers

svn at openbios.org svn at openbios.org
Sat Dec 20 16:05:43 CET 2008


Author: blueswirl
Date: 2008-12-20 16:05:43 +0100 (Sat, 20 Dec 2008)
New Revision: 293

Modified:
   openbios-devel/drivers/ide.c
   openbios-devel/drivers/ide.h
Log:
IDE: silence compiler warnings

Modified: openbios-devel/drivers/ide.c
===================================================================
--- openbios-devel/drivers/ide.c	2008-12-20 14:48:40 UTC (rev 292)
+++ openbios-devel/drivers/ide.c	2008-12-20 15:05:43 UTC (rev 293)
@@ -217,7 +217,7 @@
  */
 static int
 ob_ide_wait_stat(struct ide_drive *drive, unsigned char ok_stat,
-		 unsigned char bad_stat, char *ret_stat)
+                 unsigned char bad_stat, unsigned char *ret_stat)
 {
 	unsigned char stat;
 	int i;
@@ -700,8 +700,8 @@
  * read from an atapi device, using READ_10
  */
 static int
-ob_ide_read_atapi(struct ide_drive *drive, unsigned long long block, char *buf,
-		  unsigned int sectors)
+ob_ide_read_atapi(struct ide_drive *drive, unsigned long long block,
+                  unsigned char *buf, unsigned int sectors)
 {
 	struct atapi_command *cmd = &drive->channel->atapi_cmd;
 
@@ -730,7 +730,7 @@
 
 static int
 ob_ide_read_ata_chs(struct ide_drive *drive, unsigned long long block,
-		    char *buf, unsigned int sectors)
+                    unsigned char *buf, unsigned int sectors)
 {
 	struct ata_command *cmd = &drive->channel->ata_cmd;
 	unsigned int track = (block / drive->sect);
@@ -759,7 +759,7 @@
 
 static int
 ob_ide_read_ata_lba28(struct ide_drive *drive, unsigned long long block,
-		      char *buf, unsigned int sectors)
+                      unsigned char *buf, unsigned int sectors)
 {
 	struct ata_command *cmd = &drive->channel->ata_cmd;
 
@@ -785,7 +785,7 @@
 
 static int
 ob_ide_read_ata_lba48(struct ide_drive *drive, unsigned long long block,
-		      char *buf, unsigned int sectors)
+                      unsigned char *buf, unsigned int sectors)
 {
 	struct ata_command *cmd = &drive->channel->ata_cmd;
 	struct ata_sector ata_sector;
@@ -818,8 +818,8 @@
  * read 'sectors' sectors from ata device
  */
 static int
-ob_ide_read_ata(struct ide_drive *drive, unsigned long long block, char *buf,
-		unsigned int sectors)
+ob_ide_read_ata(struct ide_drive *drive, unsigned long long block,
+                unsigned char *buf, unsigned int sectors)
 {
 	unsigned long long end_block = block + sectors;
 	const int need_lba48 = (end_block > (1ULL << 28)) || (sectors > 255);
@@ -842,7 +842,7 @@
 
 static int
 ob_ide_read_sectors(struct ide_drive *drive, unsigned long long block,
-		    char *buf, unsigned int sectors)
+                    unsigned char *buf, unsigned int sectors)
 {
 	if (!sectors)
 		return 1;
@@ -958,7 +958,7 @@
 		drive->sect = id.sectors;
 	}
 
-	strcpy(drive->model, id.model);
+	strcpy(drive->model, (char *)id.model);
 	return 0;
 }
 
@@ -1161,11 +1161,12 @@
 {
 	cell n = POP(), cnt=n;
 	ucell blk = POP();
-	char *dest = (char*)POP();
+        unsigned char *dest = (unsigned char *)POP();
 	struct ide_drive *drive=&ob_ide_channels[idx[1]].drives[idx[0]];
 
 #ifdef CONFIG_DEBUG_IDE
-	printk("ob_ide_read_blocks %x block=%d n=%d\n", (unsigned long)dest, blk, n );
+        printk("ob_ide_read_blocks %lx block=%ld n=%ld\n", (unsigned long)dest,
+               (unsigned long)blk, (long)n);
 #endif
 
 	while (n) {

Modified: openbios-devel/drivers/ide.h
===================================================================
--- openbios-devel/drivers/ide.h	2008-12-20 14:48:40 UTC (rev 292)
+++ openbios-devel/drivers/ide.h	2008-12-20 15:05:43 UTC (rev 293)
@@ -97,7 +97,7 @@
  * simple ata command that works for everything (except 48-bit lba commands)
  */
 struct ata_command {
-	char *buffer;
+        unsigned char *buffer;
 	unsigned int buflen;
 
 	/*




More information about the OpenBIOS mailing list