diff options
author | Thomas Jarosch <tomj@simonv.com> | 2015-01-05 18:44:36 +0100 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2015-01-05 18:44:36 +0100 |
commit | fdd4aef34003587d7fd9ed754dd35ce901b639bf (patch) | |
tree | d129b8b8e587d4a1a7215c2226bfafe55f6dd643 /firmware/drivers/ata_flash.c | |
parent | c907e127f8b1d267e91e82d28cdb210288852b82 (diff) | |
download | rockbox-fdd4aef34003587d7fd9ed754dd35ce901b639bf.tar.gz rockbox-fdd4aef34003587d7fd9ed754dd35ce901b639bf.zip |
Make thirty functions static to reduce binary size
If any of those functions should be (unused) API functions,
they can easily be turned back once really needed.
Detected using a new cppcheck check that
uses the internal symbol database to catch
functions that are only used in the current file.
Change-Id: Ic2b1e5b8020b76397f11cefc4e205f3b7ac1f184
Diffstat (limited to 'firmware/drivers/ata_flash.c')
-rw-r--r-- | firmware/drivers/ata_flash.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/drivers/ata_flash.c b/firmware/drivers/ata_flash.c index de2988b9be..96ea1cfa68 100644 --- a/firmware/drivers/ata_flash.c +++ b/firmware/drivers/ata_flash.c | |||
@@ -73,7 +73,7 @@ struct flash_disk | |||
73 | 73 | ||
74 | static struct flash_disk flash_disk; | 74 | static struct flash_disk flash_disk; |
75 | 75 | ||
76 | void flash_select_chip(int no, int sel) | 76 | static void flash_select_chip(int no, int sel) |
77 | { | 77 | { |
78 | #if CONFIG_FLASH == FLASH_IFP7XX | 78 | #if CONFIG_FLASH == FLASH_IFP7XX |
79 | if (sel) | 79 | if (sel) |
@@ -115,7 +115,7 @@ static void flash_wait_ready(void) | |||
115 | 115 | ||
116 | static unsigned char model_n_sectors_order[] = {0, 19, 20}; | 116 | static unsigned char model_n_sectors_order[] = {0, 19, 20}; |
117 | 117 | ||
118 | int flash_map_sector(int sector, int* chip, int* chip_sector) | 118 | static int flash_map_sector(int sector, int* chip, int* chip_sector) |
119 | { | 119 | { |
120 | int ord, c; | 120 | int ord, c; |
121 | if (flash_disk.model == FLASH_MODEL_NONE) | 121 | if (flash_disk.model == FLASH_MODEL_NONE) |
@@ -132,7 +132,7 @@ int flash_map_sector(int sector, int* chip, int* chip_sector) | |||
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | 134 | ||
135 | int flash_read_id(int no) { | 135 | static int flash_read_id(int no) { |
136 | int id; | 136 | int id; |
137 | 137 | ||
138 | flash_select_chip(no, 1); | 138 | flash_select_chip(no, 1); |
@@ -146,7 +146,7 @@ int flash_read_id(int no) { | |||
146 | return id; | 146 | return id; |
147 | } | 147 | } |
148 | 148 | ||
149 | int flash_read_sector(int sector, unsigned char* buf, | 149 | static int flash_read_sector(int sector, unsigned char* buf, |
150 | unsigned char* oob) | 150 | unsigned char* oob) |
151 | { | 151 | { |
152 | unsigned long *bufl = (unsigned long *)buf; | 152 | unsigned long *bufl = (unsigned long *)buf; |
@@ -204,7 +204,7 @@ int flash_read_sector(int sector, unsigned char* buf, | |||
204 | return 0; | 204 | return 0; |
205 | } | 205 | } |
206 | 206 | ||
207 | int flash_read_sector_oob(int sector, unsigned char* oob) | 207 | static int flash_read_sector_oob(int sector, unsigned char* oob) |
208 | { | 208 | { |
209 | int chip, chip_sector; | 209 | int chip, chip_sector; |
210 | int i; | 210 | int i; |
@@ -294,7 +294,7 @@ static int flash_get_logical_block_no(unsigned char* oob) | |||
294 | return -1; | 294 | return -1; |
295 | } | 295 | } |
296 | 296 | ||
297 | int flash_disk_scan(void) | 297 | static int flash_disk_scan(void) |
298 | { | 298 | { |
299 | int n_segments, n_phblocks; | 299 | int n_segments, n_phblocks; |
300 | unsigned char oob[16]; | 300 | unsigned char oob[16]; |
@@ -327,7 +327,7 @@ int flash_disk_scan(void) | |||
327 | return 0; | 327 | return 0; |
328 | } | 328 | } |
329 | 329 | ||
330 | int flash_disk_find_block(int block) | 330 | static int flash_disk_find_block(int block) |
331 | { | 331 | { |
332 | int seg, bmod, phb; | 332 | int seg, bmod, phb; |
333 | unsigned char oob[16]; | 333 | unsigned char oob[16]; |
@@ -356,7 +356,7 @@ int flash_disk_find_block(int block) | |||
356 | return flash_disk.cur_phblock_start; | 356 | return flash_disk.cur_phblock_start; |
357 | } | 357 | } |
358 | 358 | ||
359 | int flash_disk_read_sectors(unsigned long start, | 359 | static int flash_disk_read_sectors(unsigned long start, |
360 | int count, | 360 | int count, |
361 | void* buf) | 361 | void* buf) |
362 | { | 362 | { |