On Sat, 03 Jan 2015 18:54:00 -0500, John de la Garza said: > It should not be assumed that true will always be 1 as defined in > include/linux/stddef.h, right?
No, I mean use an actual 'bool' type rather than 'int'. Consider this from
kernel/softirq.c:
static inline bool lockdep_softirq_start(void)
{
bool in_hardirq = false;
if (trace_hardirq_context(current)) {
in_hardirq = true;
trace_hardirq_exit();
}
lockdep_softirq_enter();
return in_hardirq;
}
However, this will require actual code analysis to make sure that it's
*really* being used as a boolean, not an int. In particular, assignments
to/from the variable need to be audited for casting issues (and possibly
the correct rework is to convert *several* variables to bool at once).
pgp88Voyj8_BP.pgp
Description: PGP signature
_______________________________________________ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
