public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomas Henzl <thenzl@redhat.com>
To: Sumit.Saxena@avagotech.com, linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, hch@infradead.org,
	jbottomley@parallels.com, kashyap.desai@avagotech.com
Subject: Re: [PATCH RESEND 18/18] megaraid_sas : swap whole register in megasas_register_aen
Date: Tue, 21 Apr 2015 14:33:12 +0200	[thread overview]
Message-ID: <55364388.6040403@redhat.com> (raw)
In-Reply-To: <201504201237.t3KCbWt3016906@palmhbs0.lsi.com>

On 04/20/2015 02:35 PM, Sumit.Saxena@avagotech.com wrote:
> Swap the whole 32 bits we read from the hardware instead of swapping
> just the 16bits we care about in place later.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/scsi/megaraid/megaraid_sas_base.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index e863701..fa6c3c9 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -4923,8 +4923,9 @@ megasas_register_aen(struct megasas_instance *instance, u32 seq_num,
>  
>  	if (instance->aen_cmd) {
>  
> -		prev_aen.word = instance->aen_cmd->frame->dcmd.mbox.w[1];
> -		prev_aen.members.locale = le16_to_cpu(prev_aen.members.locale);
> +		prev_aen.word =
> +			le32_to_cpu(instance->aen_cmd->frame->dcmd.mbox.w[1]);
> +		prev_aen.members.locale = prev_aen.members.locale;

This^ looks odd, do we need the last assignment?

Tomas

>  
>  		/*
>  		 * A class whose enum value is smaller is inclusive of all


  parent reply	other threads:[~2015-04-21 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20 12:35 [PATCH RESEND 18/18] megaraid_sas : swap whole register in megasas_register_aen Sumit.Saxena
2015-04-21 10:33 ` Hannes Reinecke
2015-04-21 12:33 ` Tomas Henzl [this message]
2015-04-21 12:37   ` Christoph Hellwig
2015-04-21 12:42     ` Sumit Saxena

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=55364388.6040403@redhat.com \
    --to=thenzl@redhat.com \
    --cc=Sumit.Saxena@avagotech.com \
    --cc=hch@infradead.org \
    --cc=jbottomley@parallels.com \
    --cc=kashyap.desai@avagotech.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