From mboxrd@z Thu Jan 1 00:00:00 1970 From: hdarwin89@gmail.com (hdarwin) Date: Tue, 16 Sep 2014 10:04:27 +0900 Subject: any hint? Message-ID: <00c201cfd14a$2c01bc10$84053430$@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi there. I'm playing kernel module development challenge. I read http://lxr.free-electrons.com/source/Documentation/CodingStyle and learn how to write right code. I am sure that there's no coding style error in following files. But challenge system say that there are coding style error. Any hint for me? Ps: I tried to submit answer without meaningless comment. but It's not correct. File1.c > #include > #include > > int hello(void) > { > printk(KERN_DEBUG "Hello World!\n"); > return 0; > } > > module_init(hello); > MODULE_LICENSE("GPL"); File2.c > #include > #include > #include > #include > > int do_work(int *my_int, int retval) > { > int x; > int y = *my_int; > int z; > > for (x = 0; x < *my_int; ++x) > udelay(10); > > if (y < 10) > /* That was a long sleep, tell userspace about it */ > printk("We slept a long time!"); > > z = x * y; > > return z; > } > > int my_init(void) > { > int x = 10; > > x = do_work(&x, x); > > return x; > } > > void my_exit(void) > { > return; > } > > module_init(my_init); > module_exit(my_exit);