Patch for PowerPC
David Woodhouse
dwmw2 at infradead.org
Wed Jan 19 05:15:24 EST 2000
pavel_roskin at geocities.com said:
> - Some macros are not constants on PPC and cannot be used after "case".
> Converted to if-else chains.
Then either the cpu_to_le16 macro is buggy, gcc is buggy,
or we should be using __constant_cpu_to_le16 or some such routine.
I don't think reverting to if-else chains is the right thing to do.
Comments, anyone?
- switch(bci.Status) {
- case cpu_to_le16(BLOCK_FREE):
+ if (bci.Status == cpu_to_le16(BLOCK_FREE))
thisEUN = 0;
- break;
- case cpu_to_le16(BLOCK_USED):
+ else if (bci.Status == cpu_to_le16(BLOCK_USED))
lastgoodEUN = thisEUN;
- break;
- case cpu_to_le16(BLOCK_IGNORE):
- case cpu_to_le16(BLOCK_DELETED):
- break;
- default:
+ else if (bci.Status != cpu_to_le16(BLOCK_IGNORE) &&
+ bci.Status != cpu_to_le16(BLOCK_DELETED))
printk("Unknown status for block %d in EUN %d: %x\n",block,thisEUN, bci.Status);
- }
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list