Re: hi, i want to use a script in kernel

2015-11-16 Thread NISHANTHA
Try something like this, scripts/checkpatch.pl --file --no-tree yourfile.c -madushan On Tue, Nov 17, 2015 at 10:57 AM, Chinmay V S wrote: > One can use checkptach -f to run the script on source files. > > For more details, check > ./scripts/checkpatch.pl --help > > On Tue, Nov 17, 2015 at 10:

Re: hi, i want to use a script in kernel

2015-11-16 Thread Chinmay V S
One can use checkptach -f to run the script on source files. For more details, check ./scripts/checkpatch.pl --help On Tue, Nov 17, 2015 at 10:46 AM, 慕冬亮 wrote: > checkpatch.pl is script to check your patch, not C file I think. > > 2015-11-17 13:01 GMT+08:00 Naver : >> hi, >> i want to use a s

i want to use the script in kernel script folder.

2015-11-16 Thread 윤영석
hi, i want to use a script in kernel, but i can't use this. in my terminal. yoon@pc:~/project/aosp/kernel/linux/scripts$ ./checkpatch.pl sortextable.c Must be run from the top-level dir. of a kernel tree Please let me know how to use this script.Thanks.__

Re: hi, i want to use a script in kernel

2015-11-16 Thread 慕冬亮
checkpatch.pl is script to check your patch, not C file I think. 2015-11-17 13:01 GMT+08:00 Naver : > hi, > i want to use a script in kernel, but i can't use this. > in my terminal. > yoon@pc:~/project/aosp/kernel/linux/scripts$ ./checkpatch.pl sortextable.c > Must be run from the top-level dir. o

Re: hi, i want to use a script in kernel

2015-11-16 Thread Nan Xiao
Hi Naver, The prompt has told you to run it on top-level of directory. Execute "./scripts/checkpatch.pl sortextable.c" Best Regards Nan Xiao On Tue, Nov 17, 2015 at 1:01 PM, Naver wrote: > hi, > i want to use a script in kernel, but i can't use this. > in my terminal. > yoon@pc:~/project/aosp/k

hi, i want to use a script in kernel

2015-11-16 Thread Naver
hi, i want to use a script in kernel, but i can't use this. in my terminal. yoon@pc:~/project/aosp/kernel/linux/scripts$ ./checkpatch.pl sortextable.c Must be run from the top-level dir. of a kernel tree Please let me know how to use this script. Thanks. __

Why does kernel provide "module" macro?

2015-11-16 Thread Nan Xiao
Hi all, I find there are some code in kernel likes this: #ifdef MODULE static struct net_device *dev_82596; .. #endif So I guess the function of "MODULE" is to build the code as a module. Why do we need this macro? Is some code need specific processing when building as a module or into kern

Correctly locking a Block Device Request Handler

2015-11-16 Thread Marcel Müller
Hello everyone, I'm currently writing a block device driver and got stuck at trying to understand how to correctly handle the locking in the reqfn one passes to `blk_init_queue`. My code looks like this: static DEFINE_SPINLOCK(rblk_lock); /* Code */ static void rblk_request_handler