<div dir="auto"><span style="color:rgb(40,38,37);font-family:"source sans pro","open sans",georgia,serif;font-size:15px;white-space:pre-wrap;background-color:rgb(255,255,255)">Hi,  for the past three years I have been trying hard to do Linux kernel development, but, with No success.</span><div dir="auto"><span style="color:rgb(40,38,37);font-family:"source sans pro","open sans",georgia,serif;font-size:15px;white-space:pre-wrap;background-color:rgb(255,255,255)"><br></span></div><div dir="auto"><span style="color:rgb(40,38,37);font-family:"source sans pro","open sans",georgia,serif;font-size:15px;white-space:pre-wrap;background-color:rgb(255,255,255)"> I don't know what is the exact reason...maybe, I</span><span style="background-color:rgb(255,255,255);color:rgb(40,38,37);font-family:"source sans pro","open sans",georgia,serif;font-size:15px;white-space:pre-wrap"> didn't do much practical,  all the times I was only reading reading reading... so you can understand my frustration, that I wanted to submit my first patch asap...and then slowly I can do concentrate on other areas of kernel development... ok thank you.</span></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu 13 Sep, 2018, 11:37 AM Nicholas Mc Guire, <<a href="mailto:der.herr@hofr.at">der.herr@hofr.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Sep 13, 2018 at 09:12:32AM +0530, inventsekar wrote:<br>
> >>> A brute force grep in the kernel shows that there are 130493 " const "<br>
> in there<br>
> Hi Hofrat,<br>
> 1. may i know the command to do this above grep please..<br>
<br>
$ grep -cre " const " * | more<br>
<br>
will give you the " const " count per file - and then put a shell loop around it<br>
<br>
$ SUM=0 ; for N in `grep -cre " const " * | cut -f 2 -d ":" ` ; do let SUM=$SUM+$N ; done ; echo $SUM<br>
<br>
...as noted "brute force"<br>
<br>
> 2. (and the opposite) may i know the command to grep other type of<br>
> variables/structures<br>
<br>
well if you want to know how to do that then you do need to look at basics<br>
if regular expressions are not clear then you might want to look at<br>
those first. And grep really is not the right tool to search for specific<br>
structures and their use use something like cscope.<br>
<br>
Try to focus on doing work you understand including the tools and processes<br>
around it - if you just are looking for a fast way of getting X patches<br>
into the kernel you are wasting your time. What the work from Bhumika Goyal<br>
shows is that its not about the complexity of the change but about the <br>
systematic approach based on using understanding a problem class, translating<br>
it to an abstract representation amenable to tools (coccinelle in this case)<br>
and documenting her understanding in the commit messages to each patch. <br>
<br>
thx!<br>
hofrat <br>
</blockquote></div>