aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/sm_ftl.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-08-07 03:10:21 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-08-30 16:51:25 -0400
commit582b2ffcaa4bd2f39801d6ffe9d076a5c555952a (patch)
tree4597d29f4aa11e09812a694f2ad1248cca35521a /drivers/mtd/sm_ftl.c
parenta3d7ee9ff80949e8786072eaf0b267499aec3d05 (diff)
mtd: sm_ftl: Staticize local symbols
These local symbols are used only in this file. Fix the following sparse warnings: drivers/mtd/sm_ftl.c:25:25: warning: symbol 'cache_flush_workqueue' was not declared. Should it be static? drivers/mtd/sm_ftl.c:44:9: warning: symbol 'sm_attr_show' was not declared. Should it be static? drivers/mtd/sm_ftl.c:57:24: warning: symbol 'sm_create_sysfs_attributes' was not declared. Should it be static? drivers/mtd/sm_ftl.c:110:6: warning: symbol 'sm_delete_sysfs_attributes' was not declared. Should it be static? drivers/mtd/sm_ftl.c:574:5: warning: symbol 'sm_get_media_info' was not declared. Should it be static? drivers/mtd/sm_ftl.c:881:17: warning: symbol 'sm_get_zone' was not declared. Should it be static? drivers/mtd/sm_ftl.c:902:6: warning: symbol 'sm_cache_init' was not declared. Should it be static? drivers/mtd/sm_ftl.c:912:6: warning: symbol 'sm_cache_put' was not declared. Should it be static? drivers/mtd/sm_ftl.c:920:5: warning: symbol 'sm_cache_get' was not declared. Should it be static? drivers/mtd/sm_ftl.c:931:5: warning: symbol 'sm_cache_flush' was not declared. Should it be static? Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/sm_ftl.c')
-rw-r--r--drivers/mtd/sm_ftl.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index 3441e73ae819..4b8e89583f2a 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -22,7 +22,7 @@
22 22
23 23
24 24
25struct workqueue_struct *cache_flush_workqueue; 25static struct workqueue_struct *cache_flush_workqueue;
26 26
27static int cache_timeout = 1000; 27static int cache_timeout = 1000;
28module_param(cache_timeout, int, S_IRUGO); 28module_param(cache_timeout, int, S_IRUGO);
@@ -41,7 +41,7 @@ struct sm_sysfs_attribute {
41 int len; 41 int len;
42}; 42};
43 43
44ssize_t sm_attr_show(struct device *dev, struct device_attribute *attr, 44static ssize_t sm_attr_show(struct device *dev, struct device_attribute *attr,
45 char *buf) 45 char *buf)
46{ 46{
47 struct sm_sysfs_attribute *sm_attr = 47 struct sm_sysfs_attribute *sm_attr =
@@ -54,7 +54,7 @@ ssize_t sm_attr_show(struct device *dev, struct device_attribute *attr,
54 54
55#define NUM_ATTRIBUTES 1 55#define NUM_ATTRIBUTES 1
56#define SM_CIS_VENDOR_OFFSET 0x59 56#define SM_CIS_VENDOR_OFFSET 0x59
57struct attribute_group *sm_create_sysfs_attributes(struct sm_ftl *ftl) 57static struct attribute_group *sm_create_sysfs_attributes(struct sm_ftl *ftl)
58{ 58{
59 struct attribute_group *attr_group; 59 struct attribute_group *attr_group;
60 struct attribute **attributes; 60 struct attribute **attributes;
@@ -107,7 +107,7 @@ error1:
107 return NULL; 107 return NULL;
108} 108}
109 109
110void sm_delete_sysfs_attributes(struct sm_ftl *ftl) 110static void sm_delete_sysfs_attributes(struct sm_ftl *ftl)
111{ 111{
112 struct attribute **attributes = ftl->disk_attributes->attrs; 112 struct attribute **attributes = ftl->disk_attributes->attrs;
113 int i; 113 int i;
@@ -571,7 +571,7 @@ static const uint8_t cis_signature[] = {
571}; 571};
572/* Find out media parameters. 572/* Find out media parameters.
573 * This ideally has to be based on nand id, but for now device size is enough */ 573 * This ideally has to be based on nand id, but for now device size is enough */
574int sm_get_media_info(struct sm_ftl *ftl, struct mtd_info *mtd) 574static int sm_get_media_info(struct sm_ftl *ftl, struct mtd_info *mtd)
575{ 575{
576 int i; 576 int i;
577 int size_in_megs = mtd->size / (1024 * 1024); 577 int size_in_megs = mtd->size / (1024 * 1024);
@@ -878,7 +878,7 @@ static int sm_init_zone(struct sm_ftl *ftl, int zone_num)
878} 878}
879 879
880/* Get and automatically initialize an FTL mapping for one zone */ 880/* Get and automatically initialize an FTL mapping for one zone */
881struct ftl_zone *sm_get_zone(struct sm_ftl *ftl, int zone_num) 881static struct ftl_zone *sm_get_zone(struct sm_ftl *ftl, int zone_num)
882{ 882{
883 struct ftl_zone *zone; 883 struct ftl_zone *zone;
884 int error; 884 int error;
@@ -899,7 +899,7 @@ struct ftl_zone *sm_get_zone(struct sm_ftl *ftl, int zone_num)
899/* ----------------- cache handling ------------------------------------------*/ 899/* ----------------- cache handling ------------------------------------------*/
900 900
901/* Initialize the one block cache */ 901/* Initialize the one block cache */
902void sm_cache_init(struct sm_ftl *ftl) 902static void sm_cache_init(struct sm_ftl *ftl)
903{ 903{
904 ftl->cache_data_invalid_bitmap = 0xFFFFFFFF; 904 ftl->cache_data_invalid_bitmap = 0xFFFFFFFF;
905 ftl->cache_clean = 1; 905 ftl->cache_clean = 1;
@@ -909,7 +909,7 @@ void sm_cache_init(struct sm_ftl *ftl)
909} 909}
910 910
911/* Put sector in one block cache */ 911/* Put sector in one block cache */
912void sm_cache_put(struct sm_ftl *ftl, char *buffer, int boffset) 912static void sm_cache_put(struct sm_ftl *ftl, char *buffer, int boffset)
913{ 913{
914 memcpy(ftl->cache_data + boffset, buffer, SM_SECTOR_SIZE); 914 memcpy(ftl->cache_data + boffset, buffer, SM_SECTOR_SIZE);
915 clear_bit(boffset / SM_SECTOR_SIZE, &ftl->cache_data_invalid_bitmap); 915 clear_bit(boffset / SM_SECTOR_SIZE, &ftl->cache_data_invalid_bitmap);
@@ -917,7 +917,7 @@ void sm_cache_put(struct sm_ftl *ftl, char *buffer, int boffset)
917} 917}
918 918
919/* Read a sector from the cache */ 919/* Read a sector from the cache */
920int sm_cache_get(struct sm_ftl *ftl, char *buffer, int boffset) 920static int sm_cache_get(struct sm_ftl *ftl, char *buffer, int boffset)
921{ 921{
922 if (test_bit(boffset / SM_SECTOR_SIZE, 922 if (test_bit(boffset / SM_SECTOR_SIZE,
923 &ftl->cache_data_invalid_bitmap)) 923 &ftl->cache_data_invalid_bitmap))
@@ -928,7 +928,7 @@ int sm_cache_get(struct sm_ftl *ftl, char *buffer, int boffset)
928} 928}
929 929
930/* Write the cache to hardware */ 930/* Write the cache to hardware */
931int sm_cache_flush(struct sm_ftl *ftl) 931static int sm_cache_flush(struct sm_ftl *ftl)
932{ 932{
933 struct ftl_zone *zone; 933 struct ftl_zone *zone;
934 934