Re: [PATCH] media: staging: atomisp: add a blank line after declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 16, 2018 at 07:20:54PM +0900, 김준환 wrote:
> Thank you for attention :)
> 
> I knew what I forgot before doing contribute
> 
> I updated it 'TODAY' and I'll never repeat this mistake again!
> 

No rush.

This is a tiny mistake and doesn't affect runtime at all and we're all
human.  The thing to do is figure out which are avoidable mistakes,
right?

Like for me, when I was starting out I wrote some patches that added
some allocations but I forgot to add the kfree().  So then I made a QC
script that runs some static checkers over my patches and if I add any
line with "alloc" in it then my QC script asks me:

if git diff $fullname | grep ^+ | grep -qi alloc ; then
    qc "Have you freed all your mallocs?"
    qc "Have you checked all your mallocs for NULL returns?"
fi

And a couple weeks ago, I accidentally introduced a bug, which someone
caught during review, because I removed a cast that I thought was
unnecessary.

	for (i = 0; i < (int)limit; i++) {

I thought limit couldn't be negative but I was wrong.  So I wrote a
static checker test for that so I'll never do it again.  And I found
some similar bugs in other people's code and fixed those.  Static
analysis is sort of my thing but anyone could do it really.  Or ask
Julia and I to write a check.  But most people have the hardware and
could write a test program to trigger the bug and add it to their QC
process.

So making mistakes is fine and it's part of learning.  You should
definitely take the time to figure out where you went wrong and if it's
preventable.  But no one really gets annoyed about mistakes because it's
just part of life and being human.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux