From mboxrd@z Thu Jan 1 00:00:00 1970 From: xerofoify@gmail.com (nick) Date: Wed, 17 Sep 2014 08:09:36 -0400 Subject: A quick guide to why stand-alone checkpatch patches suck... In-Reply-To: <9984728c-5f68-49b2-bb04-f040c371c494@email.android.com> References: <140649.1410913551@turing-police.cc.vt.edu> <153669.1410925338@turing-police.cc.vt.edu> <20140917045628.GB19159@kroah.com> <541972B5.3060403@gmail.com> <54197634.2050307@gmail.com> <9984728c-5f68-49b2-bb04-f040c371c494@email.android.com> Message-ID: <54197A00.1090606@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On 14-09-17 08:05 AM, Greg Freemyer wrote: > > > On September 17, 2014 7:53:24 AM EDT, nick wrote: >> >> >> On 14-09-17 07:51 AM, Sudip Mukherjee wrote: >>> On Wed, Sep 17, 2014 at 5:08 PM, nick wrote: >>>> >>>> >>>> On 14-09-17 07:20 AM, Robert P. J. Day wrote: >>> >>>>> anyway, it's time for coffee. >>>>> >>>>> rday >>>>> >>>> Rday and others, >>>> That's not what I wanted I was trying to improve my rep after >> getting banned from vger.org and now it seems >>>> I can't even get a patch right. In addition I was trying to do check >> patch because it was easier for me >>>> due to not understanding some parts of the code. >>>> Nick >>>> >>> >>> try to understand the code first. if you do not understand the code >>> how do you know that your patch will not break any part of the logic >> . >>> ok , by adding blank lines you will not break the logic. >>> but yesterday in your other patch you removed an error message . may >> i >>> ask why did you think that error message is not required ? >>> >>> thanks >>> sudip >>> >>>> _______________________________________________ >>>> Kernelnewbies mailing list >>>> Kernelnewbies at kernelnewbies.org >>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> I thought that the return statement of NULL to a caller was enough. >> Nick > > Uh... > > I don't know that chunk of code, but error messages that go to the kernel log exist for a specific reason. Taking them out requires a specific reason. > > Ie. This would make a good commit message "At this point the condition is well understood and the code that handles it is well tested and has been stable for 3 years, thus removing the error message." > > Greg > Thanks Greg Again, This is what I meant with my patch, why have a unneeded error message if the code is already tested and only uses the return value in that function. Cheers Nick