diff options
| author | Björn Stenberg <bjorn@haxx.se> | 2002-05-14 12:28:48 +0000 |
|---|---|---|
| committer | Björn Stenberg <bjorn@haxx.se> | 2002-05-14 12:28:48 +0000 |
| commit | e5992829d7d66fed3812265a6a894c3ab4a71d7c (patch) | |
| tree | 76391215398b7e58c3b3441077ba9a854762ed8a | |
| parent | d71a2bceebc317a9fbf67fd041d458b156046c37 (diff) | |
| download | rockbox-e5992829d7d66fed3812265a6a894c3ab4a71d7c.zip rockbox-e5992829d7d66fed3812265a6a894c3ab4a71d7c.tar.gz rockbox-e5992829d7d66fed3812265a6a894c3ab4a71d7c.tar.bz2 rockbox-e5992829d7d66fed3812265a6a894c3ab4a71d7c.tar.xz | |
Fixed compiler warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@574 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/drivers/ata.c | 21 | ||||
| -rw-r--r-- | firmware/drivers/fat.c | 14 | ||||
| -rw-r--r-- | firmware/drivers/fat.h | 4 |
3 files changed, 6 insertions, 33 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index dd28585..0e0c488 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -189,21 +189,6 @@ static int check_registers(void) return 0; } -static int check_harddisk(void) -{ - if (!wait_for_rdy()) - return 0; - - if ((ATA_NSECTOR == 1) && - (ATA_SECTOR == 1) && - (ATA_LCYL == 0) && - (ATA_HCYL == 0) && - (ATA_SELECT == 0)) - return 1; - else - return 0; -} - static int freeze_lock(void) { if (!wait_for_rdy()) @@ -274,15 +259,9 @@ int ata_init(void) if (!check_registers()) return -2; -// if (!check_harddisk()) -// return -3; - if (freeze_lock() < 0) return -4; -// if(ata_spindown(-1) < 0) -// return -5; - ATA_SELECT = SELECT_LBA; ATA_CONTROL = CONTROL_nIEN; diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 68a1f14..15974f4 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -114,7 +114,7 @@ struct fsinfo { #define FSINFO_FREECOUNT 488 #define FSINFO_NEXTFREE 492 -static int first_sector_of_cluster(unsigned int cluster); +static int first_sector_of_cluster(int cluster); static int bpb_is_sane(void); static void *cache_fat_sector(int secnum); #ifdef DISK_WRITE @@ -143,13 +143,7 @@ struct fat_cache_entry fat_cache[FAT_CACHE_SIZE]; static unsigned char lastsector[SECTOR_SIZE]; static unsigned char lastsector2[SECTOR_SIZE]; -static unsigned int swap_fat_entry(unsigned int entry) -{ - SWAB32(entry); - return entry; -} - -static int sec2cluster(unsigned int sec) +static int sec2cluster(int sec) { if ( sec < fat_bpb.firstdatasector ) { @@ -160,7 +154,7 @@ static int sec2cluster(unsigned int sec) return ((sec - fat_bpb.firstdatasector) / fat_bpb.bpb_secperclus) + 2; } -static int cluster2sec(unsigned int cluster) +static int cluster2sec(int cluster) { int max_cluster = fat_bpb.totalsectors - fat_bpb.firstdatasector / fat_bpb.bpb_secperclus + 1; @@ -175,7 +169,7 @@ static int cluster2sec(unsigned int cluster) return first_sector_of_cluster(cluster); } -static int first_sector_of_cluster(unsigned int cluster) +static int first_sector_of_cluster(int cluster) { return (cluster - 2) * fat_bpb.bpb_secperclus + fat_bpb.firstdatasector; } diff --git a/firmware/drivers/fat.h b/firmware/drivers/fat.h index 3e8875f..463910d 100644 --- a/firmware/drivers/fat.h +++ b/firmware/drivers/fat.h @@ -88,8 +88,8 @@ struct fat_direntry struct fat_dir { int entry; - unsigned int cached_sec; - unsigned int num_sec; + int cached_sec; + int num_sec; unsigned char cached_buf[SECTOR_SIZE]; }; |