Re: [PATCH] Staging: slicoss: fix converting macros into functions

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

 



On 06/06/12 13:16, Dan Carpenter wrote:
On Fri, Jun 01, 2012 at 12:48:41PM +0100, Adnan Ali wrote:
  	prev = NULL;
+	pslic_handle = NULL;
  	tail = cmd;
  	while ((cmdcnt<  SLIC_CMDQ_CMDSINPAGE)&&
  	(adapter->slic_handle_ix<  256)) {
  		/* Allocate and initialize a SLIC_HANDLE for this command */
-		SLIC_GET_SLIC_HANDLE(adapter, pslic_handle);
+		slic_get_slic_handle(adapter, pslic_handle);
  		if (pslic_handle == NULL)
  			ASSERT(0);
With your change we will always hit this assert.  :/

Gar...  I don't know what to say.  This is the second fairly basic
bug I've found in your cleanup patches today.

I try to explain to people that it's better to send bug fix patches
than cleanup patches.  If you try to fix a bug and you accidentally
introduce a bug then it evens out.  If you send a cleanup patch and
it introduces a bug, then it is only downside.  Please fix bugs for
a bit and don't send more cleanup patches.  That's my advice.

  		ASSERT(pslic_handle ==
regards,
dan carpenter
Hi Dan

      The function   slic_get_slic_handle() initialises

      pslic_handle  =  padapter->pfree_slic_handles;

      before executing

       ASSERT(pslic_handle == NULL)


Thanks
Adnan Ali
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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