
In message 465CD759.9090303@gmail.com you wrote:
Question for Wolfgang D:
It looks like the error messages originally only used puts() and, I would speculate, printf()s were added later. I'm deducing this from the original, the CONFIG_BZIP2 addition does a printf() on the error:
The general rule is to use puts() for printing constant strings without formatting.
370 printf ("BUNZIP2 ERROR %d - must RESET board to recover\n", i);
Here we have the "%d", thus we need printf().
Is printf() safe in this delicate condition? Should I strip all
It's not safe in the sense that I would rely my life on it. It's an attempt to get the error message out and may or may not work. puts() requires a little less code so it is a little more likely to work, but that doesn't make much of a difference.
Should I strip out the udelay()s too? As you pointed out previously, udelay() is not safe on some boards that use interrupts to measure the delay.
Yes, please do - especially as I see no reason what the udelay() could be useful for.
Best regards,
Wolfgang Denk