All of lore.kernel.org
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Martin Petersen <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Quinn Tran <qutran@marvell.com>,
	Michael Christie <michael.christie@oracle.com>,
	Daniel Wagner <dwagner@suse.de>
Subject: Re: [PATCH 3/7] qla2xxx: Fix endianness annotations
Date: Tue, 16 Mar 2021 16:27:01 +0000	[thread overview]
Message-ID: <E14899CE-78D3-4F9D-99CD-051DF7E0891B@oracle.com> (raw)
In-Reply-To: <20210316035655.2835-4-bvanassche@acm.org>



> On Mar 15, 2021, at 10:56 PM, Bart Van Assche <bvanassche@acm.org> wrote:
> 
> Fix all recently introduced endianness annotation issues.
> 
> Cc: Quinn Tran <qutran@marvell.com>
> Cc: Mike Christie <michael.christie@oracle.com>
> Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
> Cc: Daniel Wagner <dwagner@suse.de>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/scsi/qla2xxx/qla_def.h  | 2 +-
> drivers/scsi/qla2xxx/qla_iocb.c | 3 ++-
> drivers/scsi/qla2xxx/qla_isr.c  | 2 +-
> drivers/scsi/qla2xxx/qla_sup.c  | 9 +++++----
> 4 files changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
> index 3bdf55bb0833..52ba75591f9a 100644
> --- a/drivers/scsi/qla2xxx/qla_def.h
> +++ b/drivers/scsi/qla2xxx/qla_def.h
> @@ -1527,7 +1527,7 @@ struct init_sf_cb {
> 	 * BIT_12 = Remote Write Optimization (1 - Enabled, 0 - Disabled)
> 	 * BIT 11-0 = Reserved
> 	 */
> -	uint16_t flags;
> +	__le16	flags;
> 	uint8_t	reserved1[32];
> 	uint16_t discard_OHRB_timeout_value;
> 	uint16_t remote_write_opt_queue_num;
> diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
> index 8b41cbaf8535..eb2376b138c1 100644
> --- a/drivers/scsi/qla2xxx/qla_iocb.c
> +++ b/drivers/scsi/qla2xxx/qla_iocb.c
> @@ -2379,7 +2379,8 @@ qla24xx_prli_iocb(srb_t *sp, struct logio_entry_24xx *logio)
> 				cpu_to_le32(NVME_PRLI_SP_FIRST_BURST);
> 		if (sp->vha->flags.nvme2_enabled) {
> 			/* Set service parameter BIT_7 for NVME CONF support */
> -			logio->io_parameter[0] |= NVME_PRLI_SP_CONF;
> +			logio->io_parameter[0] |=
> +				cpu_to_le32(NVME_PRLI_SP_CONF);
> 			/* Set service parameter BIT_8 for SLER support */
> 			logio->io_parameter[0] |=
> 				cpu_to_le32(NVME_PRLI_SP_SLER);
> diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
> index 27165abda96d..0fa7082f3cc8 100644
> --- a/drivers/scsi/qla2xxx/qla_isr.c
> +++ b/drivers/scsi/qla2xxx/qla_isr.c
> @@ -3440,7 +3440,7 @@ qla24xx_abort_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
> 		return;
> 
> 	abt = &sp->u.iocb_cmd;
> -	abt->u.abt.comp_status = le16_to_cpu(pkt->comp_status);
> +	abt->u.abt.comp_status = pkt->comp_status;
> 	orig_sp = sp->cmd_sp;
> 	/* Need to pass original sp */
> 	if (orig_sp)
> diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c
> index f771fabcba59..060c89237777 100644
> --- a/drivers/scsi/qla2xxx/qla_sup.c
> +++ b/drivers/scsi/qla2xxx/qla_sup.c
> @@ -2621,10 +2621,11 @@ qla24xx_read_optrom_data(struct scsi_qla_host *vha, void *buf,
> }
> 
> static int
> -qla28xx_extract_sfub_and_verify(struct scsi_qla_host *vha, uint32_t *buf,
> +qla28xx_extract_sfub_and_verify(struct scsi_qla_host *vha, __le32 *buf,
>     uint32_t len, uint32_t buf_size_without_sfub, uint8_t *sfub_buf)
> {
> -	uint32_t *p, check_sum = 0;
> +	uint32_t check_sum = 0;
> +	__le32 *p;
> 	int i;
> 
> 	p = buf + buf_size_without_sfub;
> @@ -2790,8 +2791,8 @@ qla28xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, uint32_t faddr,
> 			goto done;
> 		}
> 
> -		rval = qla28xx_extract_sfub_and_verify(vha, dwptr, dwords,
> -			buf_size_without_sfub, (uint8_t *)sfub);
> +		rval = qla28xx_extract_sfub_and_verify(vha, (__le32 *)dwptr,
> +			dwords, buf_size_without_sfub, (uint8_t *)sfub);
> 
> 		if (rval != QLA_SUCCESS)
> 			goto done;

Looks Good.

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


  parent reply	other threads:[~2021-03-16 16:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16  3:56 [PATCH 0/7] qla2xxx patches for kernel v5.12 and v5.13 Bart Van Assche
2021-03-16  3:56 ` [PATCH 1/7] Revert "qla2xxx: Make sure that aborted commands are freed" Bart Van Assche
2021-03-16  8:25   ` Daniel Wagner
2021-03-16 20:36     ` Bart Van Assche
2021-03-17  8:56       ` Daniel Wagner
2021-03-16 16:25   ` Himanshu Madhani
2021-03-16 20:28     ` Bart Van Assche
2021-03-17 17:37       ` Himanshu Madhani
2021-03-16  3:56 ` [PATCH 2/7] qla2xxx: Constify struct qla_tgt_func_tmpl Bart Van Assche
2021-03-16  8:25   ` Daniel Wagner
2021-03-16 16:23   ` Himanshu Madhani
2021-03-16  3:56 ` [PATCH 3/7] qla2xxx: Fix endianness annotations Bart Van Assche
2021-03-16  8:32   ` Daniel Wagner
2021-03-16 16:27   ` Himanshu Madhani [this message]
2021-03-16  3:56 ` [PATCH 4/7] qla2xxx: qla82xx_pinit_from_rom(): Initialize 'n' before using it Bart Van Assche
2021-03-16  8:36   ` Daniel Wagner
2021-03-16 20:39     ` Bart Van Assche
2021-03-16 16:27   ` Himanshu Madhani
2021-03-16  3:56 ` [PATCH 5/7] qla2xxx: Suppress Coverity complaints about dseg_r* Bart Van Assche
2021-03-16  8:37   ` Daniel Wagner
2021-03-16 16:28   ` Himanshu Madhani
2021-03-16  3:56 ` [PATCH 6/7] qla2xxx: Simplify qla8044_minidump_process_control() Bart Van Assche
2021-03-16  8:45   ` Daniel Wagner
2021-03-16 16:29   ` Himanshu Madhani
2021-03-16  3:56 ` [PATCH 7/7] qla2xxx: Always check the return value of qla24xx_get_isp_stats() Bart Van Assche
2021-03-16  8:48   ` Daniel Wagner
2021-03-16 20:40     ` Bart Van Assche
2021-03-16 16:30   ` Himanshu Madhani

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=E14899CE-78D3-4F9D-99CD-051DF7E0891B@oracle.com \
    --to=himanshu.madhani@oracle.com \
    --cc=bvanassche@acm.org \
    --cc=dwagner@suse.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=qutran@marvell.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.