• Du, Changbin's avatar
    debugobjects: make fixup functions return bool instead of int · b1e4d9d8
    Du, Changbin authored
    I am going to introduce debugobjects infrastructure to USB subsystem.
    But before this, I found the code of debugobjects could be improved.
    This patchset will make fixup functions return bool type instead of int.
    Because fixup only need report success or no.  boolean is the 'real'
    This patch (of 7):
    The object debugging infrastructure core provides some fixup callbacks
    for the subsystem who use it.  These callbacks are called from the debug
    code whenever a problem in debug_object_init is detected.  And
    debugobjects core suppose them returns 1 when the fixup was successful,
    otherwise 0.  So the return type is boolean.
    A bad thing is that debug_object_fixup use the return value for
    arithmetic operation.  It confused me that what is the reall return
    Reading over the whole code, I found some place do use the return value
    incorrectly(see next patch).  So why use bool type instead?
    Signed-off-by: default avatarDu, Changbin <changbin.du@intel.com>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Josh Triplett <josh@kernel.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Christian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>