From: Johannes Thumshirn <jthumshirn@suse.de>
To: Ching Huang <ching2048@areca.com.tw>
Cc: hch@lst.de, hch@infradead.org, thenzl@redhat.com,
jbottomley@parallels.com, dan.carpenter@oracle.com,
agordeev@redhat.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, hare@suse.de
Subject: Re: [PATCH v3 3/5] arcmsr: modifies codes for more readable
Date: Wed, 25 Nov 2015 13:00:37 +0100 [thread overview]
Message-ID: <1448452837.2877.76.camel@suse.de> (raw)
In-Reply-To: <1448451916.4670.39.camel@Centos6.3-64>
On Wed, 2015-11-25 at 19:45 +0800, Ching Huang wrote:
> From: Ching Huang <ching2048@areca.com.tw>
>
> Modifies codes for more readable
>
> Signed-of-by: Ching Huang <ching2048@areca.com.tw>
>
> ---
>
> diff -uprN a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h
> --- a/drivers/scsi/arcmsr/arcmsr.h 2015-11-25 10:52:16.286470000 +0800
> +++ b/drivers/scsi/arcmsr/arcmsr.h 2015-11-25 19:10:21.309960000 +0800
> @@ -288,6 +288,9 @@ struct FIRMWARE_INFO
> #define ARCMSR_MESSAGE_RBUFFER 0x0000ff00
> /* iop message_rwbuffer for message command */
> #define ARCMSR_MESSAGE_RWBUFFER 0x0000fa00
> +
> +#define MEM_BASE0(x) (u32 __iomem *)((unsigned long)acb->mem_base0 +
> x)
> +#define MEM_BASE1(x) (u32 __iomem *)((unsigned long)acb->mem_base1 +
> x)
> /*
> ************************************************************************
> ** SPEC. for Areca HBC adapter
> diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c
> b/drivers/scsi/arcmsr/arcmsr_hba.c
> --- a/drivers/scsi/arcmsr/arcmsr_hba.c 2015-11-25 19:04:44.590970000
> +0800
> +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2015-11-25 19:11:27.679958000
> +0800
> @@ -2649,13 +2649,13 @@ static bool arcmsr_hbaB_get_config(struc
> acb->dma_coherent2 = dma_coherent;
> reg = (struct MessageUnit_B *)dma_coherent;
> acb->pmuB = reg;
> - reg->drv2iop_doorbell= (uint32_t __iomem *)((unsigned long)acb-
> >mem_base0 + ARCMSR_DRV2IOP_DOORBELL);
> - reg->drv2iop_doorbell_mask = (uint32_t __iomem *)((unsigned
> long)acb->mem_base0 + ARCMSR_DRV2IOP_DOORBELL_MASK);
> - reg->iop2drv_doorbell = (uint32_t __iomem *)((unsigned long)acb-
> >mem_base0 + ARCMSR_IOP2DRV_DOORBELL);
> - reg->iop2drv_doorbell_mask = (uint32_t __iomem *)((unsigned
> long)acb->mem_base0 + ARCMSR_IOP2DRV_DOORBELL_MASK);
> - reg->message_wbuffer = (uint32_t __iomem *)((unsigned long)acb-
> >mem_base1 + ARCMSR_MESSAGE_WBUFFER);
> - reg->message_rbuffer = (uint32_t __iomem *)((unsigned long)acb-
> >mem_base1 + ARCMSR_MESSAGE_RBUFFER);
> - reg->message_rwbuffer = (uint32_t __iomem *)((unsigned long)acb-
> >mem_base1 + ARCMSR_MESSAGE_RWBUFFER);
> + reg->drv2iop_doorbell= MEM_BASE0(ARCMSR_DRV2IOP_DOORBELL);
> + reg->drv2iop_doorbell_mask =
> MEM_BASE0(ARCMSR_DRV2IOP_DOORBELL_MASK);
> + reg->iop2drv_doorbell = MEM_BASE0(ARCMSR_IOP2DRV_DOORBELL);
> + reg->iop2drv_doorbell_mask =
> MEM_BASE0(ARCMSR_IOP2DRV_DOORBELL_MASK);
> + reg->message_wbuffer = MEM_BASE1(ARCMSR_MESSAGE_WBUFFER);
> + reg->message_rbuffer = MEM_BASE1(ARCMSR_MESSAGE_RBUFFER);
> + reg->message_rwbuffer = MEM_BASE1(ARCMSR_MESSAGE_RWBUFFER);
> iop_firm_model = (char __iomem *)(®->message_rwbuffer[15]);
> /*firm_model,15,60-67*/
> iop_firm_version = (char __iomem *)(®->message_rwbuffer[17]);
> /*firm_version,17,68-83*/
> iop_device_map = (char __iomem *)(®->message_rwbuffer[21]);
> /*firm_version,21,84-99*/
>
>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
next prev parent reply other threads:[~2015-11-25 12:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 11:45 [PATCH v3 3/5] arcmsr: modifies codes for more readable Ching Huang
2015-11-25 12:00 ` Johannes Thumshirn [this message]
2015-11-25 12:05 ` Hannes Reinecke
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=1448452837.2877.76.camel@suse.de \
--to=jthumshirn@suse.de \
--cc=agordeev@redhat.com \
--cc=ching2048@areca.com.tw \
--cc=dan.carpenter@oracle.com \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=jbottomley@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=thenzl@redhat.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;
as well as URLs for NNTP newsgroup(s).