Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

greybus: core: Make greybus_match_one_id() return bool

This routine always returns 0 or 1 and a return type of 'bool' suits it
the best. Update it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

authored by

Viresh Kumar and committed by
Greg Kroah-Hartman
129a6fbe aa62b5e4

+5 -5
+5 -5
drivers/staging/greybus/core.c
··· 31 31 } 32 32 EXPORT_SYMBOL_GPL(greybus_disabled); 33 33 34 - static int greybus_match_one_id(struct gb_bundle *bundle, 34 + static bool greybus_match_one_id(struct gb_bundle *bundle, 35 35 const struct greybus_bundle_id *id) 36 36 { 37 37 if ((id->match_flags & GREYBUS_ID_MATCH_VENDOR) && 38 38 (id->vendor != bundle->intf->vendor_id)) 39 - return 0; 39 + return false; 40 40 41 41 if ((id->match_flags & GREYBUS_ID_MATCH_PRODUCT) && 42 42 (id->product != bundle->intf->product_id)) 43 - return 0; 43 + return false; 44 44 45 45 if ((id->match_flags & GREYBUS_ID_MATCH_CLASS) && 46 46 (id->class != bundle->class)) 47 - return 0; 47 + return false; 48 48 49 - return 1; 49 + return true; 50 50 } 51 51 52 52 static const struct greybus_bundle_id *