Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

OMAP3/4: l3: minor cleanup for parenthesis and extra spaces

Removing extra lines, spaces and unneeded parenthesis.
Collapsing an if statement to detect the type of error.

l3_smx:
- Fixing the message printed on error.

So now: looks like:
"No Error Error seen..." "No Error seen..."
"In-Band Error Error seen..." "In-Band Error seen..."

Other messages are self explanatory, no "Error" added to them.
(E.g.: "Address Hole seen...")

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>

authored by

omar ramirez and committed by
Tony Lindgren
35f7b961 7529b703

+12 -24
+7 -10
arch/arm/mach-omap2/omap_l3_noc.c
··· 63 63 char *source_name; 64 64 65 65 /* Get the Type of interrupt */ 66 - if (irq == l3->app_irq) 67 - inttype = L3_APPLICATION_ERROR; 68 - else 69 - inttype = L3_DEBUG_ERROR; 66 + inttype = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR; 70 67 71 68 for (i = 0; i < L3_MODULES; i++) { 72 69 /* ··· 81 84 82 85 err_src = j; 83 86 /* Read the stderrlog_main_source from clk domain */ 84 - std_err_main_addr = base + (*(l3_targ[i] + err_src)); 85 - std_err_main = readl(std_err_main_addr); 87 + std_err_main_addr = base + *(l3_targ[i] + err_src); 88 + std_err_main = readl(std_err_main_addr); 86 89 87 - switch ((std_err_main & CUSTOM_ERROR)) { 90 + switch (std_err_main & CUSTOM_ERROR) { 88 91 case STANDARD_ERROR: 89 92 source_name = 90 93 l3_targ_stderrlog_main_name[i][err_src]; ··· 140 143 } 141 144 142 145 l3->l3_base[0] = ioremap(res->start, resource_size(res)); 143 - if (!(l3->l3_base[0])) { 146 + if (!l3->l3_base[0]) { 144 147 dev_err(&pdev->dev, "ioremap failed\n"); 145 148 ret = -ENOMEM; 146 149 goto err0; ··· 154 157 } 155 158 156 159 l3->l3_base[1] = ioremap(res->start, resource_size(res)); 157 - if (!(l3->l3_base[1])) { 160 + if (!l3->l3_base[1]) { 158 161 dev_err(&pdev->dev, "ioremap failed\n"); 159 162 ret = -ENOMEM; 160 163 goto err1; ··· 168 171 } 169 172 170 173 l3->l3_base[2] = ioremap(res->start, resource_size(res)); 171 - if (!(l3->l3_base[2])) { 174 + if (!l3->l3_base[2]) { 172 175 dev_err(&pdev->dev, "ioremap failed\n"); 173 176 ret = -ENOMEM; 174 177 goto err2;
+5 -14
arch/arm/mach-omap2/omap_l3_smx.c
··· 155 155 u8 multi = error & L3_ERROR_LOG_MULTI; 156 156 u32 address = omap3_l3_decode_addr(error_addr); 157 157 158 - WARN(true, "%s Error seen by %s %s at address %x\n", 158 + WARN(true, "%s seen by %s %s at address %x\n", 159 159 omap3_l3_code_string(code), 160 160 omap3_l3_initiator_string(initid), 161 161 multi ? "Multiple Errors" : "", ··· 167 167 static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) 168 168 { 169 169 struct omap3_l3 *l3 = _l3; 170 - 171 170 u64 status, clear; 172 171 u64 error; 173 172 u64 error_addr; 174 173 u64 err_source = 0; 175 174 void __iomem *base; 176 175 int int_type; 177 - 178 176 irqreturn_t ret = IRQ_NONE; 179 177 180 - if (irq == l3->app_irq) 181 - int_type = L3_APPLICATION_ERROR; 182 - else 183 - int_type = L3_DEBUG_ERROR; 184 - 178 + int_type = irq == l3->app_irq ? L3_APPLICATION_ERROR : L3_DEBUG_ERROR; 185 179 if (!int_type) { 186 180 status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0); 187 181 /* ··· 196 202 for (err_source = 0; !(status & (1 << err_source)); err_source++) 197 203 ; 198 204 error = omap3_l3_readll(base, L3_ERROR_LOG); 199 - 200 205 if (error) { 201 206 error_addr = omap3_l3_readll(base, L3_ERROR_LOG_ADDR); 202 207 ··· 203 210 } 204 211 205 212 /* Clear the status register */ 206 - clear = ((L3_AGENT_STATUS_CLEAR_IA << int_type) | 207 - (L3_AGENT_STATUS_CLEAR_TA)); 208 - 213 + clear = (L3_AGENT_STATUS_CLEAR_IA << int_type) | 214 + L3_AGENT_STATUS_CLEAR_TA; 209 215 omap3_l3_writell(base, L3_AGENT_STATUS, clear); 210 216 211 217 /* clear the error log register */ ··· 232 240 goto err0; 233 241 } 234 242 l3->rt = ioremap(res->start, resource_size(res)); 235 - if (!(l3->rt)) { 243 + if (!l3->rt) { 236 244 dev_err(&pdev->dev, "ioremap failed\n"); 237 245 ret = -ENOMEM; 238 246 goto err0; ··· 251 259 ret = request_irq(l3->app_irq, omap3_l3_app_irq, 252 260 IRQF_DISABLED | IRQF_TRIGGER_RISING, 253 261 "l3-app-irq", l3); 254 - 255 262 if (ret) { 256 263 dev_err(&pdev->dev, "couldn't request app irq\n"); 257 264 goto err2;