Blackfin arch: rename blackfin_sram.c to sram-alloc.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, October 13, 2008 - 11:20 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e9532...
Commit:     5e95320f9fb7a3171bb75eba15acb745c6e43805
Parent:     763e63c640ae799e3ce6495e71832744bffc661b
Author:     Robin Getz <rgetz@blackfin.uclinux.org>
AuthorDate: Wed Oct 8 17:22:49 2008 +0800
Committer:  Bryan Wu <cooloney@kernel.org>
CommitDate: Wed Oct 8 17:22:49 2008 +0800

    Blackfin arch: rename blackfin_sram.c to sram-alloc.c
    
    rename blackfin_sram.c to sram-alloc.c (we know it is a blackfin file,
    since it is in arch/blackfin) - and there is no "driver" code in there,
    it is just an allocator/deallocator for L1 and L2 sram.
    
    Also fix a problem that checkpatch pointed out
    
    Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
    Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 arch/blackfin/mm/Makefile                          |    2 +-
 arch/blackfin/mm/{blackfin_sram.c => sram-alloc.c} |   31 +++++++++++---------
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/arch/blackfin/mm/Makefile b/arch/blackfin/mm/Makefile
index 2a7202c..81aacbc 100644
--- a/arch/blackfin/mm/Makefile
+++ b/arch/blackfin/mm/Makefile
@@ -2,4 +2,4 @@
 # arch/blackfin/mm/Makefile
 #
 
-obj-y := blackfin_sram.o init.o
+obj-y := sram-alloc.o init.o
diff --git a/arch/blackfin/mm/blackfin_sram.c b/arch/blackfin/mm/sram-alloc.c
similarity index 96%
rename from arch/blackfin/mm/blackfin_sram.c
rename to arch/blackfin/mm/sram-alloc.c
index 4f5e887..0f1ca69 100644
--- a/arch/blackfin/mm/blackfin_sram.c
+++ b/arch/blackfin/mm/sram-alloc.c
@@ -1,13 +1,13 @@
 /*
- * File:         arch/blackfin/mm/blackfin_sram.c
+ * File:         arch/blackfin/mm/sram-alloc.c
  * Based on:
  * Author:
  *
  * Created:
- * Description:  SRAM driver for Blackfin ADSP-BF5xx
+ * Description:  SRAM allocator for Blackfin L1 and L2 memory
  *
  * Modified:
- *               Copyright 2004-2007 Analog Devices Inc.
+ *               Copyright 2004-2008 Analog Devices Inc.
  *
  * Bugs:         Enter bugs at http://blackfin.uclinux.org/
  *
@@ -78,7 +78,7 @@ static void __init l1sram_init(void)
 	free_l1_ssram_head.next =
 		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
 	if (!free_l1_ssram_head.next) {
-		printk(KERN_INFO"Fail to initialize Scratchpad data SRAM.\n");
+		printk(KERN_INFO "Failed to initialize Scratchpad data SRAM\n");
 		return;
 	}
 
@@ -102,7 +102,7 @@ static void __init l1_data_sram_init(void)
 	free_l1_data_A_sram_head.next =
 		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
 	if (!free_l1_data_A_sram_head.next) {
-		printk(KERN_INFO"Fail to initialize L1 Data A SRAM.\n");
+		printk(KERN_INFO "Failed to initialize L1 Data A SRAM\n");
 		return;
 	}
 
@@ -123,7 +123,7 @@ static void __init l1_data_sram_init(void)
 	free_l1_data_B_sram_head.next =
 		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
 	if (!free_l1_data_B_sram_head.next) {
-		printk(KERN_INFO"Fail to initialize L1 Data B SRAM.\n");
+		printk(KERN_INFO "Failed to initialize L1 Data B SRAM\n");
 		return;
 	}
 
@@ -151,7 +151,7 @@ static void __init l1_inst_sram_init(void)
 	free_l1_inst_sram_head.next =
 		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
 	if (!free_l1_inst_sram_head.next) {
-		printk(KERN_INFO"Fail to initialize L1 Instruction SRAM.\n");
+		printk(KERN_INFO "Failed to initialize L1 Instruction SRAM\n");
 		return;
 	}
 
@@ -179,7 +179,7 @@ static void __init l2_sram_init(void)
 	free_l2_sram_head.next =
 		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
 	if (!free_l2_sram_head.next) {
-		printk(KERN_INFO"Fail to initialize L2 SRAM.\n");
+		printk(KERN_INFO "Failed to initialize L2 SRAM\n");
 		return;
 	}
 
@@ -351,28 +351,31 @@ static int _sram_free(const void *addr,
 
 int sram_free(const void *addr)
 {
-	if (0) {}
+
 #if L1_CODE_LENGTH != 0
-	else if (addr >= (void *)L1_CODE_START
+	if (addr >= (void *)L1_CODE_START
 		 && addr < (void *)(L1_CODE_START + L1_CODE_LENGTH))
 		return l1_inst_sram_free(addr);
+	else
 #endif
 #if L1_DATA_A_LENGTH != 0
-	else if (addr >= (void *)L1_DATA_A_START
+	if (addr >= (void *)L1_DATA_A_START
 		 && addr < (void *)(L1_DATA_A_START + L1_DATA_A_LENGTH))
 		return l1_data_A_sram_free(addr);
+	else
 #endif
 #if L1_DATA_B_LENGTH != 0
-	else if (addr >= (void *)L1_DATA_B_START
+	if (addr >= (void *)L1_DATA_B_START
 		 && addr < (void *)(L1_DATA_B_START + L1_DATA_B_LENGTH))
 		return l1_data_B_sram_free(addr);
+	else
 #endif
 #if L2_LENGTH != 0
-	else if (addr >= (void *)L2_START
+	if (addr >= (void *)L2_START
 		 && addr < (void *)(L2_START + L2_LENGTH))
 		return l2_sram_free(addr);
-#endif
 	else
+#endif
 		return -1;
 }
 EXPORT_SYMBOL(sram_free);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Blackfin arch: rename blackfin_sram.c to sram-alloc.c, Linux Kernel Mailing ..., (Mon Oct 13, 11:20 am)