All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "bart.vanassche@gmail.com" <bart.vanassche@gmail.com>,
	"hch@infradead.org" <hch@infradead.org>,
	"himanshu.madhani@cavium.com" <himanshu.madhani@cavium.com>,
	"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
	"nab@linux-iscsi.org" <nab@linux-iscsi.org>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"giridhar.malavali@cavium.com" <giridhar.malavali@cavium.com>
Subject: Re: [PATCH v2 08/12] qla2xxx: Add framework for Async fabric discovery.
Date: Tue, 17 Jan 2017 22:12:16 +0000	[thread overview]
Message-ID: <1484691121.2729.13.camel@sandisk.com> (raw)
In-Reply-To: <1484598924-29066-9-git-send-email-himanshu.madhani@cavium.com>

On Mon, 2017-01-16 at 12:35 -0800, Himanshu Madhani wrote:
> -static void
> +void
>  qla2x00_async_iocb_timeout(void *data)
>  {
>  	srb_t *sp = (srb_t *)data;
>  	fc_port_t *fcport = sp->fcport;
> +	struct srb_iocb *lio = &sp->u.iocb_cmd;
> +	struct event_arg ea;
>  
>  	ql_dbg(ql_dbg_disc, fcport->vha, 0x2071,
> -	    "Async-%s timeout - hdl=%x portid=%02x%02x%02x.\n",
> +	    "Async-%s timeout - hdl=%x portid=%02x%02x%02x %8phC.\n",
>  	    sp->name, sp->handle, fcport->d_id.b.domain, fcport->d_id.b.area,
> -	    fcport->d_id.b.al_pa);
> +		fcport->d_id.b.al_pa, fcport->port_name);
>  
> -	fcport->flags &= ~FCF_ASYNC_SENT;
> -	if (sp->type == SRB_LOGIN_CMD) {
> -		struct srb_iocb *lio = &sp->u.iocb_cmd;
> -		qla2x00_post_async_logout_work(fcport->vha, fcport, NULL);
> +	if (fcport)
> +		fcport->flags &= ~FCF_ASYNC_SENT;

This code triggers a new static checker warning because the fcport pointer
is dereferenced before it is used. Please review the code.

Thanks,

Bart.

  reply	other threads:[~2017-01-17 22:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 20:35 [PATCH v2 00/12] qla2xxx: Feature updates for target Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 01/12] qla2xxx: Remove direct access of scsi_status field in se_cmd Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 02/12] qla2xxx: Cleanup TMF code translation from qla_target Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 03/12] qla2xxx: Make trace flags more readable Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 04/12] qla2xxx: Remove SRR code Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 05/12] qla2xxx: Fix wrong argument in sp done callback Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 06/12] qla2xxx: Use d_id instead of s_id for more clarity Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 07/12] qla2xxx: Track I-T nexus as single fc_port struct Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 08/12] qla2xxx: Add framework for Async fabric discovery Himanshu Madhani
2017-01-17 22:12   ` Bart Van Assche [this message]
2017-01-17 22:14   ` Bart Van Assche
2017-01-17 22:17   ` Bart Van Assche
2017-01-17 22:27   ` Bart Van Assche
2017-01-17 22:31     ` Madhani, Himanshu
2017-01-16 20:35 ` [PATCH v2 09/12] qla2xxx: Add Dual mode support in the driver Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 10/12] qla2xxx: Remove unused reverse_ini_mode Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 11/12] qla2xxx: Improve RSCN handling in driver Himanshu Madhani
2017-01-16 20:35 ` [PATCH v2 12/12] qla2xxx: Simplify usage of SRB structure " Himanshu Madhani
2017-01-17 16:56 ` [PATCH v2 00/12] qla2xxx: Feature updates for target Bart Van Assche
2017-01-17 17:28   ` Madhani, Himanshu

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=1484691121.2729.13.camel@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=bart.vanassche@gmail.com \
    --cc=giridhar.malavali@cavium.com \
    --cc=hch@infradead.org \
    --cc=himanshu.madhani@cavium.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=target-devel@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.