From: Mike Christie <michaelc@cs.wisc.edu>
To: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Cc: James Bottomley <jbottomley@parallels.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [v2 PATCH 3/4] bnx2fc: cleanup task management IO when it times out.
Date: Mon, 07 May 2012 19:27:50 -0500 [thread overview]
Message-ID: <4FA86886.2060301@cs.wisc.edu> (raw)
In-Reply-To: <4FA86579.5080603@cs.wisc.edu>
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.
next prev parent reply other threads:[~2012-05-08 0:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4FA85912.2030800@broadcom.com>
2012-05-07 23:31 ` [v2 PATCH 3/4] bnx2fc: cleanup task management IO when it times out Bhanu Prakash Gollapudi
2012-05-08 0:14 ` Mike Christie
2012-05-08 0:27 ` Mike Christie [this message]
2012-05-08 0:36 ` Bhanu Prakash Gollapudi
2012-04-24 22:26 [v2 PATCH 0/4] bnx2fc version 1.0.11 Bhanu Prakash Gollapudi
2012-04-24 22:26 ` [v2 PATCH 3/4] bnx2fc: cleanup task management IO when it times out Bhanu Prakash Gollapudi
2012-05-04 8:49 ` Mike Christie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FA86886.2060301@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=bprakash@broadcom.com \
--cc=jbottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.