public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"himanshu.madhani@cavium.com" <himanshu.madhani@cavium.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH v2 6/6] qla2xxx: Refactor usage of Active command arrays
Date: Fri, 21 Jul 2017 23:11:51 +0000	[thread overview]
Message-ID: <1500678710.2545.8.camel@wdc.com> (raw)
In-Reply-To: <20170721163228.32339-7-himanshu.madhani@cavium.com>

On Fri, 2017-07-21 at 09:32 -0700, Himanshu Madhani wrote:
> From: Quinn Tran <quinn.tran@cavium.com>

Thank you for having done this work!

> +#define SRB_TO_U(_p) container_of(_p, struct unify_cmd, srb)
> +#define TCMD_TO_U(_p) container_of(_p, struct unify_cmd, tcmd)

If you have to repost this patch, please change these macros into inline
functions such that the compiler can check the type of the argument (_p).

> @@ -2799,7 +2800,7 @@ qla2x00_alloc_outstanding_cmds(struct qla_hw_data *ha, struct req_que *req)
>                         req->num_outstanding_cmds = ha->cur_fw_iocb_count;
>         }
>  
> -       req->outstanding_cmds = kzalloc(sizeof(srb_t *) *
> +       req->outstanding_cmds = kzalloc(sizeof(struct unify_cmd *) *
>             req->num_outstanding_cmds, GFP_KERNEL);
>  
>         if (!req->outstanding_cmds) {
> @@ -2808,7 +2809,7 @@ qla2x00_alloc_outstanding_cmds(struct qla_hw_data *ha, struct req_que *req)
>                  * initialization.
>                  */
>                 req->num_outstanding_cmds = MIN_OUTSTANDING_COMMANDS;
> -               req->outstanding_cmds = kzalloc(sizeof(srb_t *) *
> +               req->outstanding_cmds = kzalloc(sizeof(struct unify_cmd *) *
>                     req->num_outstanding_cmds, GFP_KERNEL);
>  
>                 if (!req->outstanding_cmds) {

Please use kcalloc() instead of kzalloc(... * ..., ...).

> @@ -2165,6 +2170,7 @@ qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
>  	struct fc_bsg_reply *bsg_reply;
>  	sts_entry_t *sts;
>  	struct sts_entry_24xx *sts24;
> +	struct unify_cmd *u;
>  	sts = (sts_entry_t *) pkt;
>  	sts24 = (struct sts_entry_24xx *) pkt;

Please leave a blank line between declarations and code.
 
Anyway, whether or not these comments get addressed:

Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>

  reply	other threads:[~2017-07-21 23:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 16:32 [PATCH v2 0/6] qla2xxx: Bug fixes for driver Himanshu Madhani
2017-07-21 16:32 ` [PATCH v2 1/6] qla2xxx: Cleanup FC-NVMe code Himanshu Madhani
2017-07-21 16:32 ` [PATCH v2 2/6] qla2xxx: Move function prototype to correct header Himanshu Madhani
2017-07-25  8:13   ` Johannes Thumshirn
2017-07-21 16:32 ` [PATCH v2 3/6] qla2xxx: Added change to enable ZIO for FC-NVMe devices Himanshu Madhani
2017-07-25  8:17   ` Johannes Thumshirn
2017-07-21 16:32 ` [PATCH v2 4/6] qla2xxx: Simpify unregistration of FC-NVMe local/remote ports Himanshu Madhani
2017-07-25  8:17   ` Johannes Thumshirn
2017-07-21 16:32 ` [PATCH v2 5/6] qla2xxx: Fix remoteport disconnect for FC-NVMe Himanshu Madhani
2017-07-21 16:32 ` [PATCH v2 6/6] qla2xxx: Refactor usage of Active command arrays Himanshu Madhani
2017-07-21 23:11   ` Bart Van Assche [this message]
2017-07-25  8:19   ` Johannes Thumshirn
2017-07-27  1:58 ` [PATCH v2 0/6] qla2xxx: Bug fixes for driver Martin K. Petersen
2017-07-27  3:59   ` Madhani, Himanshu
2017-07-27 12:49     ` Martin K. Petersen
2017-07-27 15:20       ` 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=1500678710.2545.8.camel@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=himanshu.madhani@cavium.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox