From: Dan Carpenter <dan.carpenter@oracle.com>
To: ching <ching2048@areca.com.tw>
Cc: jbottomley@parallels.com, thenzl@redhat.com,
linux-scsi@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1.0 16/16] arcmsr: support new adapter ARC12x4
Date: Fri, 2 May 2014 12:34:18 +0300 [thread overview]
Message-ID: <20140502093418.GH4963@mwanda> (raw)
In-Reply-To: <1398858378.6930.67.camel@localhost>
On Wed, Apr 30, 2014 at 07:46:18PM +0800, ching wrote:
> + acb->pmuD = reg;
> + reg->chip_id = (u32 __iomem *)((unsigned long)acb->mem_base0 +
> + ARCMSR_ARC1214_CHIP_ID);
> + reg->cpu_mem_config = (u32 __iomem *)((unsigned long)
> + acb->mem_base0 + ARCMSR_ARC1214_CPU_MEMORY_CONFIGURATION);
These casts aren't needed because acb->mem_base0 is a void __iomem *.
You could just do:
reg->cpu_mem_config = acb->mem_base0 + ARCMSR_ARC1214_CPU_MEMORY_CONFIGURATION;
Or you could change ARCMSR_ARC1214_CPU_MEMORY_CONFIGURATION to:
#define ARCMSR_ARC1214_CPU_MEMORY_CONFIGURATION(acb) (acb->mem_base0 + 0x00008)
So it would be:
reg->cpu_mem_config = ARCMSR_ARC1214_CPU_MEMORY_CONFIGURATION(acb);
> + reg->i2o_host_interrupt_mask = (u32 __iomem *)((unsigned long)
> + acb->mem_base0 + ARCMSR_ARC1214_I2_HOST_INTERRUPT_MASK);
> + reg->sample_at_reset = (u32 __iomem *)((unsigned long)
> + acb->mem_base0 + ARCMSR_ARC1214_SAMPLE_RESET);
> + reg->reset_request = (u32 __iomem *)((unsigned long)
regards,
dan carpenter
prev parent reply other threads:[~2014-05-02 9:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 11:46 [PATCH v1.0 16/16] arcmsr: support new adapter ARC12x4 ching
2014-05-02 9:34 ` Dan Carpenter [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=20140502093418.GH4963@mwanda \
--to=dan.carpenter@oracle.com \
--cc=ching2048@areca.com.tw \
--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