All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@logfs.org>
To: Hannes Reinecke <hare@suse.de>
Cc: linux-scsi@vger.kernel.org, Ewan Milne <emilne@redhat.com>,
	James Smart <james.smart@emulex.com>,
	Bryn Reeves <bmr@redhat.com>,
	Roland Dreier <roland@purestorage.com>
Subject: Re: [PATCH 1/4] scsi: move initialization of scmd->eh_entry
Date: Fri, 24 May 2013 12:57:40 -0400	[thread overview]
Message-ID: <20130524165739.GC30270@logfs.org> (raw)
In-Reply-To: <1369389050-118628-2-git-send-email-hare@suse.de>

On Fri, 24 May 2013 11:50:47 +0200, Hannes Reinecke wrote:
> 
> The 'eh_entry' list might be used even before scsi_softirq_done()
> is called. Hence we should rather initialize it together with
> the other eh-related variables.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  drivers/scsi/scsi_lib.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index c31187d..a5515ec 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -318,6 +318,8 @@ static void scsi_init_cmd_errh(struct scsi_cmnd *cmd)
>  	memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
>  	if (cmd->cmd_len == 0)
>  		cmd->cmd_len = scsi_command_size(cmd->cmnd);
> +	INIT_LIST_HEAD(&cmd->eh_entry);
> +	cmd->eh_eflags = 0;

I always suspect something subtle going on when a variable is
initialized to 0 three lines below a memset.  Can line this go away?

Jörn

--
Those who come seeking peace without a treaty are plotting.
-- Sun Tzu
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-05-24 18:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24  9:50 [PATCH 0/4] New FC timeout handler Hannes Reinecke
2013-05-24  9:50 ` [PATCH 1/4] scsi: move initialization of scmd->eh_entry Hannes Reinecke
2013-05-24 16:57   ` Jörn Engel [this message]
2013-05-25  8:47     ` Christoph Hellwig
2013-05-24  9:50 ` [PATCH 2/4] blk-timeout: add BLK_EH_SCHEDULED return code Hannes Reinecke
2013-05-24  9:50 ` [PATCH 3/4] scsi: export functions for new fc timeout handler Hannes Reinecke
2013-05-24  9:50 ` [PATCH 4/4] scsi_transport_fc: FC " Hannes Reinecke
2013-05-25  5:08   ` Christoph Hellwig
2013-05-25  9:38     ` Hannes Reinecke
2013-05-25  8:42       ` Christoph Hellwig
2013-05-25  9:55         ` Hannes Reinecke
2013-06-05 21:55           ` Jörn Engel
2013-05-30  8:37 ` [PATCH 0/4] New " Ren Mingxin
2013-05-30 12:01   ` Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2013-06-06  9:43 [PATCH 0/4] New SCSI command " Hannes Reinecke
2013-06-06  9:43 ` [PATCH 1/4] scsi: move initialization of scmd->eh_entry Hannes Reinecke
2013-06-06 16:14   ` Jörn Engel

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=20130524165739.GC30270@logfs.org \
    --to=joern@logfs.org \
    --cc=bmr@redhat.com \
    --cc=emilne@redhat.com \
    --cc=hare@suse.de \
    --cc=james.smart@emulex.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=roland@purestorage.com \
    /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.