From: Andrew Morton Cc: Mathieu Desnoyers Signed-off-by: Andrew Morton --- diff -puN samples/markers/marker-example.c~linux-kernel-markers-samples-checkpatch-fixes samples/markers/marker-example.c --- a/samples/markers/marker-example.c~linux-kernel-markers-samples-checkpatch-fixes +++ a/samples/markers/marker-example.c @@ -13,16 +13,15 @@ #include #include -struct proc_dir_entry *pentry_example = NULL; +struct proc_dir_entry *pentry_example; static int my_open(struct inode *inode, struct file *file) { int i; trace_mark(subsystem_event, "%d %s", 123, "example string"); - for (i=0; i<10; i++) { + for (i = 0; i < 10; i++) trace_mark(subsystem_eventb, MARK_NOARGS); - } return -EPERM; } diff -puN samples/markers/probe-example.c~linux-kernel-markers-samples-checkpatch-fixes samples/markers/probe-example.c --- a/samples/markers/probe-example.c~linux-kernel-markers-samples-checkpatch-fixes +++ a/samples/markers/probe-example.c @@ -34,7 +34,7 @@ void probe_subsystem_event(const struct mystr = va_arg(ap, typeof(mystr)); /* Call printk */ - printk("Value %u, string %s\n", value, mystr); + printk(KERN_DEBUG "Value %u, string %s\n", value, mystr); /* or count, check rights, serialize data in a buffer */ @@ -84,10 +84,10 @@ static void __exit probe_fini(void) { int i; - for (i = 0; i < ARRAY_SIZE(probe_array); i++) { + for (i = 0; i < ARRAY_SIZE(probe_array); i++) marker_probe_unregister(probe_array[i].name); - } - printk("Number of event b : %u\n", atomic_read(&eventb_count)); + printk(KERN_INFO "Number of event b : %u\n", + atomic_read(&eventb_count)); } module_init(probe_init); _