Re: [v2 PATCH 3/4] bnx2fc: cleanup task management IO when it times out.

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

 



On 5/7/2012 5:27 PM, Mike Christie wrote:
On 05/07/2012 07:14 PM, Mike Christie wrote:
On 05/07/2012 06:31 PM, Bhanu Prakash Gollapudi wrote:
On  05/04/2012 08:49 AM, Mike Christie wrote:
On 04/24/2012 05:26 PM, Bhanu Prakash Gollapudi wrote:
  >  diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c
b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
  >  index d3ee231..082a25c 100644
  >  --- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c
  >  +++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
  >  @@ -185,6 +185,16 @@ void bnx2fc_flush_active_ios(struct bnx2fc_rport
*tgt)
  >  BUG_ON(rc);
  >  }
  >
  >  + list_for_each_safe(list, tmp,&tgt->active_tm_queue) {
  >  + i++;
  >  + io_req = (struct bnx2fc_cmd *)list;

Why didn't you use list_for_each_entry_safe()? Or, when using
list_for_each_safe, instead of the cast are we supposed to be using
list_entry()?

Mike, the list is the first field in the structure, so the cast here is
right.


I am saying that normally if there is a function that does the same
thing we are supposed to use that instead.

I think though since it works and it used throughout the driver already
it is ok to do. But I think in a patch later it should be changed.


Thanks Mike. In my next opportunity to submit the code, I'll remember to do this.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux