Signed-off-by: Rasmus Villemoes <rv@xxxxxxxxxxxxxxxxxx> --- check_kernel_printf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/check_kernel_printf.c b/check_kernel_printf.c index 7bef7e7d..fb8d3049 100644 --- a/check_kernel_printf.c +++ b/check_kernel_printf.c @@ -639,8 +639,13 @@ static void flag_string(const char *fmt, struct symbol *type, struct symbol *bas static void device_node_string(const char *fmt, struct symbol *type, struct symbol *basetype, int vaidx) { - if (fmt[1] != 'F') + if (fmt[1] != 'F') { sm_msg("error: %%pO can only be followed by 'F'"); + return; + } + if (!is_struct_tag(basetype, "device_node")) + sm_msg("error: '%%pOF' expects argument of type 'struct device_node*', argument %d has type '%s'", + vaidx, type_to_str(type)); } static void -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe smatch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html