
10 Jun
2010
10 Jun
'10
6:12 a.m.
On Jun 9, 2010, at 10:40 PM, Timur Tabi wrote:
On Wed, Jun 9, 2010 at 10:34 PM, Kumar Gala galak@kernel.crashing.org wrote:
+int is_core_disabled(int nr) {
volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
u32 coredisrl = in_be32(&gur->coredisrl);
You don't need to declare the variable as volatile if you use an I/O accessor.
+int is_core_disabled(int nr) {
volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
u32 devdisr = in_be32(&gur->devdisr);
Same thing here.
will fix.
switch (nr) {
case 0:
return (devdisr & MPC85xx_DEVDISR_CPU0);
break;
case 1:
return (devdisr & MPC85xx_DEVDISR_CPU1);
break;
And you don't need a 'break' after a 'return' in a switch-case statement. You also don't need parentheses around the expression in the 'return' statement.
Going to leave the parens for readability, will drop the break's.
- k