Thursday, April 17, 2014

Removing CamelCase warnings in code given by

Before pushing you kernel code to GIT you need to make the code error and warning free.There are some standard scripts in linux kernel repository to point out the errors and warnings.One of them is script.

My shell scripts will try to clean some of these pointed error and warnings.

Here's my first script to remove CamelCase from kernel code.

Please refer to the link for details on CamelCase:

Shell Script for removing CamelCase from code:

#Here, arg#1 is string whose CamelCase needs to be removed.
#arg2 is the file in which CamelCase needs to be removed.
var2=$(echo $var1 | tr [:upper:] [:lower:])
sed -i "s/\<$var1\>/$var2/g" $2

Above scripts actually converts the CamelCases in your file to lower cases so you will not get any warning now with