Re: [RESEND PATCH 1/1] staging:vt6655: remove checks around dev_kfree_skb

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

 



On Wed, Jul 15, 2015 at 08:52:51AM +0530, Maninder Singh wrote:
> dev_kfree_skb checks for NULL pointer itself,
> Thus no need of explicit NULL check.
> 

I hate these patches.  I have told Markus to stop sending them but he
has issues so now I only complain when they introduce a bug.  There was
one bug I have missed because it was a benchmark regression and I knew
it was theoretically possible but I didn't know the code well enough to
say which were fast paths...

My main objection is that relying on the sanity check inside the
function call makes the code more subtle to understand.  We know we need
a NULL check but it is hidden away in another file.  The motivation for
this patch you are sending is "There is a sanity check in dev_kfree_skb()
so let's do an insane thing and save some lines of code."

For this particular patch we assume throughout the whole driver that
"pTDInfo->skb" can be NULL so making it inconsistent in this one place
is wrong.

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