From: Johannes Thumshirn <jthumshirn@suse.de>
To: Ching Huang <ching2048@areca.com.tw>,
thenzl@redhat.com, hch@infradead.org, jbottomley@parallels.com,
dan.carpenter@oracle.com, agordeev@redhat.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
hare@suse.de
Cc: hch@lst.de
Subject: Re: [PATCH 1/3] arcmsr: modify codes for more readable
Date: Tue, 01 Dec 2015 14:40:41 +0100 [thread overview]
Message-ID: <1448977241.3103.30.camel@suse.de> (raw)
In-Reply-To: <1448537636.10768.39.camel@Centos6.3-64>
On Thu, 2015-11-26 at 19:33 +0800, Ching Huang wrote:
> From: Ching Huang <ching2048@areca.com.tw>
>
> modify codes for more readable
>
> Signed-of-by: Ching Huang <ching2048@areca.com.tw>
>
> ---
>
> 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 18:08:52.000000000
> +0800
> +++ b/drivers/scsi/arcmsr/arcmsr_hba.c 2015-11-26 15:52:54.000000000
> +0800
> @@ -2814,53 +2814,32 @@ static bool arcmsr_hbaD_get_config(struc
> acb->dma_coherent2 = dma_coherent2;
> reg = (struct MessageUnit_D *)dma_coherent2;
> acb->pmuD = reg;
> - reg->chip_id = acb->mem_base0 + ARCMSR_ARC1214_CHIP_ID;
> - reg->cpu_mem_config = acb->mem_base0 +
> - ARCMSR_ARC1214_CPU_MEMORY_CONFIGURATION;
> - reg->i2o_host_interrupt_mask = acb->mem_base0 +
> - ARCMSR_ARC1214_I2_HOST_INTERRUPT_MASK;
> - reg->sample_at_reset = acb->mem_base0 + ARCMSR_ARC1214_SAMPLE_RESET;
> - reg->reset_request = acb->mem_base0 + ARCMSR_ARC1214_RESET_REQUEST;
> - reg->host_int_status = acb->mem_base0 +
> - ARCMSR_ARC1214_MAIN_INTERRUPT_STATUS;
> - reg->pcief0_int_enable = acb->mem_base0 +
> - ARCMSR_ARC1214_PCIE_F0_INTERRUPT_ENABLE;
> - reg->inbound_msgaddr0 = acb->mem_base0 +
> - ARCMSR_ARC1214_INBOUND_MESSAGE0;
> - reg->inbound_msgaddr1 = acb->mem_base0 +
> - ARCMSR_ARC1214_INBOUND_MESSAGE1;
> - reg->outbound_msgaddr0 = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_MESSAGE0;
> - reg->outbound_msgaddr1 = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_MESSAGE1;
> - reg->inbound_doorbell = acb->mem_base0 +
> - ARCMSR_ARC1214_INBOUND_DOORBELL;
> - reg->outbound_doorbell = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_DOORBELL;
> - reg->outbound_doorbell_enable = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_DOORBELL_ENABLE;
> - reg->inboundlist_base_low = acb->mem_base0 +
> - ARCMSR_ARC1214_INBOUND_LIST_BASE_LOW;
> - reg->inboundlist_base_high = acb->mem_base0 +
> - ARCMSR_ARC1214_INBOUND_LIST_BASE_HIGH;
> - reg->inboundlist_write_pointer = acb->mem_base0 +
> - ARCMSR_ARC1214_INBOUND_LIST_WRITE_POINTER;
> - reg->outboundlist_base_low = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_LIST_BASE_LOW;
> - reg->outboundlist_base_high = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_LIST_BASE_HIGH;
> - reg->outboundlist_copy_pointer = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_LIST_COPY_POINTER;
> - reg->outboundlist_read_pointer = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_LIST_READ_POINTER;
> - reg->outboundlist_interrupt_cause = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_INTERRUPT_CAUSE;
> - reg->outboundlist_interrupt_enable = acb->mem_base0 +
> - ARCMSR_ARC1214_OUTBOUND_INTERRUPT_ENABLE;
> - reg->message_wbuffer = acb->mem_base0 +
> ARCMSR_ARC1214_MESSAGE_WBUFFER;
> - reg->message_rbuffer = acb->mem_base0 +
> ARCMSR_ARC1214_MESSAGE_RBUFFER;
> - reg->msgcode_rwbuffer = acb->mem_base0 +
> - ARCMSR_ARC1214_MESSAGE_RWBUFFER;
> + reg->chip_id = MEM_BASE0(ARCMSR_ARC1214_CHIP_ID);
> + reg->cpu_mem_config =
> MEM_BASE0(ARCMSR_ARC1214_CPU_MEMORY_CONFIGURATION);
> + reg->i2o_host_interrupt_mask =
> MEM_BASE0(ARCMSR_ARC1214_I2_HOST_INTERRUPT_MASK);
> + reg->sample_at_reset = MEM_BASE0(ARCMSR_ARC1214_SAMPLE_RESET);
> + reg->reset_request = MEM_BASE0(ARCMSR_ARC1214_RESET_REQUEST);
> + reg->host_int_status =
> MEM_BASE0(ARCMSR_ARC1214_MAIN_INTERRUPT_STATUS);
> + reg->pcief0_int_enable =
> MEM_BASE0(ARCMSR_ARC1214_PCIE_F0_INTERRUPT_ENABLE);
> + reg->inbound_msgaddr0 = MEM_BASE0(ARCMSR_ARC1214_INBOUND_MESSAGE0);
> + reg->inbound_msgaddr1 = MEM_BASE0(ARCMSR_ARC1214_INBOUND_MESSAGE1);
> + reg->outbound_msgaddr0 =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_MESSAGE0);
> + reg->outbound_msgaddr1 =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_MESSAGE1);
> + reg->inbound_doorbell = MEM_BASE0(ARCMSR_ARC1214_INBOUND_DOORBELL);
> + reg->outbound_doorbell =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_DOORBELL);
> + reg->outbound_doorbell_enable =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_DOORBELL_ENABLE);
> + reg->inboundlist_base_low =
> MEM_BASE0(ARCMSR_ARC1214_INBOUND_LIST_BASE_LOW);
> + reg->inboundlist_base_high =
> MEM_BASE0(ARCMSR_ARC1214_INBOUND_LIST_BASE_HIGH);
> + reg->inboundlist_write_pointer =
> MEM_BASE0(ARCMSR_ARC1214_INBOUND_LIST_WRITE_POINTER);
> + reg->outboundlist_base_low =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_LIST_BASE_LOW);
> + reg->outboundlist_base_high =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_LIST_BASE_HIGH);
> + reg->outboundlist_copy_pointer =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_LIST_COPY_POINTER);
> + reg->outboundlist_read_pointer =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_LIST_READ_POINTER);
> + reg->outboundlist_interrupt_cause =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_INTERRUPT_CAUSE);
> + reg->outboundlist_interrupt_enable =
> MEM_BASE0(ARCMSR_ARC1214_OUTBOUND_INTERRUPT_ENABLE);
> + reg->message_wbuffer = MEM_BASE0(ARCMSR_ARC1214_MESSAGE_WBUFFER);
> + reg->message_rbuffer = MEM_BASE0(ARCMSR_ARC1214_MESSAGE_RBUFFER);
> + reg->msgcode_rwbuffer = MEM_BASE0(ARCMSR_ARC1214_MESSAGE_RWBUFFER);
> iop_firm_model = (char __iomem *)(®->msgcode_rwbuffer[15]);
> iop_firm_version = (char __iomem *)(®->msgcode_rwbuffer[17]);
> iop_device_map = (char __iomem *)(®->msgcode_rwbuffer[21]);
>
>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
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
prev parent reply other threads:[~2015-12-01 13:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 11:33 [PATCH 1/3] arcmsr: modify codes for more readable Ching Huang
2015-11-27 15:04 ` Tomas Henzl
2015-12-01 13:40 ` Johannes Thumshirn [this message]
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=1448977241.3103.30.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).