aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mm/isram-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mm/isram-driver.c')
-rw-r--r--arch/blackfin/mm/isram-driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/blackfin/mm/isram-driver.c b/arch/blackfin/mm/isram-driver.c
index 84cdc5a1c139..9213e2357888 100644
--- a/arch/blackfin/mm/isram-driver.c
+++ b/arch/blackfin/mm/isram-driver.c
@@ -62,7 +62,7 @@ static void isram_write(const void *addr, uint64_t data)
62 uint32_t cmd; 62 uint32_t cmd;
63 unsigned long flags; 63 unsigned long flags;
64 64
65 if (addr >= (void *)(L1_CODE_START + L1_CODE_LENGTH)) 65 if (unlikely(addr >= (void *)(L1_CODE_START + L1_CODE_LENGTH)))
66 return; 66 return;
67 67
68 cmd = IADDR2DTEST(addr) | 2; /* write */ 68 cmd = IADDR2DTEST(addr) | 2; /* write */
@@ -93,7 +93,7 @@ static uint64_t isram_read(const void *addr)
93 unsigned long flags; 93 unsigned long flags;
94 uint64_t ret; 94 uint64_t ret;
95 95
96 if (addr > (void *)(L1_CODE_START + L1_CODE_LENGTH)) 96 if (unlikely(addr > (void *)(L1_CODE_START + L1_CODE_LENGTH)))
97 return 0; 97 return 0;
98 98
99 cmd = IADDR2DTEST(addr) | 0; /* read */ 99 cmd = IADDR2DTEST(addr) | 0; /* read */
@@ -120,7 +120,7 @@ static bool isram_check_addr(const void *addr, size_t n)
120{ 120{
121 if ((addr >= (void *)L1_CODE_START) && 121 if ((addr >= (void *)L1_CODE_START) &&
122 (addr < (void *)(L1_CODE_START + L1_CODE_LENGTH))) { 122 (addr < (void *)(L1_CODE_START + L1_CODE_LENGTH))) {
123 if ((addr + n) > (void *)(L1_CODE_START + L1_CODE_LENGTH)) { 123 if (unlikely((addr + n) > (void *)(L1_CODE_START + L1_CODE_LENGTH))) {
124 show_stack(NULL, NULL); 124 show_stack(NULL, NULL);
125 pr_err("copy involving %p length (%zu) too long\n", addr, n); 125 pr_err("copy involving %p length (%zu) too long\n", addr, n);
126 } 126 }