Message ID | 20160210022744.GA8648@lkp-nex05 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- a/drivers/input/rmi4/rmi_bus.c +++ b/drivers/input/rmi4/rmi_bus.c @@ -292,7 +292,7 @@ static struct rmi_function_handler *fn_h }; #define RMI_FN_HANDLER_ARRAY_SIZE \ - (sizeof(fn_handlers) / sizeof(struct rmi_function_handler *)) + ARRAY_SIZE(fn_handlers) static void __rmi_unregister_function_handlers(int start_idx) {
drivers/input/rmi4/rmi_bus.c:295:20-21: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci CC: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- rmi_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html