what's the total number of "u"s in:
on sun, nov 20, 2005 at 04:16:41pm +0100, anders gavare wrote: > basically, the frombcd macro is misused if it is given a function call > as an argument, instead of a plain variable. a quick idutils run showed at least the following broken uses: arch/evbarm/tsarm/tsrtc.c arch/next68k/next68k/rtc.c arch/prep/isa/mcclock_isa.c arch/sh3/sh3/clock.c dev/ic/mm58167.c imho the callers should be fixed, but the question is how to make sure we catch them. maybe we could define a different version for diagnostic or debug kernels that takes the address of the arg, so it fails compilation for the broken usage - something like this (untested): #if defined(__gnuc__) && defined(diagnostic) #define frombcd(x) ({ \ __typeof(x) *v = &x; \ (((*v) >> 4) * 10 + ((*v) & 0xf)); \ } #else #define frombcd(x) (((x) >> 4) * 10 + ((x) & 0xf)) #endif and i think we should eliminate all duplicate definitions of this macro, no matter what solution we go for, which seem to happen at least in: arch/mvme68k/stand/libsa/chiptotime.c arch/mvme68k/stand/libsa/clock.c arch/mvmeppc/stand/libsa/clock.c martin
user
I found 20 "u"s in the provided passage.
assistant