Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1326944
| From | Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v7] SATA: OCTEON: support SATA on OCTEON platform |
| Date | 2016-02-04 17:10 +0100 |
| Message-ID | <qYuDM-4en-3@gated-at.bofh.it> (permalink) |
| References | <qY9zl-51l-11@gated-at.bofh.it> <qYrPB-Co-47@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
Thank-you for the review.
On 04/02/16 12:24, Aleksey Makarov wrote:
>
> Hi Zubair,
>
>> + void __iomem *base;
>
> [..]
>
>> + cfg = cvmx_read_csr((uint64_t)base + CVMX_SATA_UCTL_SHIM_CFG);
>
> sparse will complain here. See Documentation/sparse.txt
Yes. sparse says
...
CHECK drivers/ata/sata_octeon.c
drivers/ata/sata_octeon.c:50:30: warning: cast removes address space of expression
drivers/ata/sata_octeon.c:65:25: warning: cast removes address space of expression
...
Use of (__force uint64_t) removes the sparse warning. But it was
frowned upon by arnd.
He suggested a wrapper helper in asm/octeon/cvmx.h which handles iomem
addresses and __force behind the scenes rather than in the driver.
static inline void cvmx_write_csr_resource(void __iomem *csr_addr, uint64_t val)
{
cvmx_write_csr((__force uint64_t)csr_addr, val)
}
Alternatives? Or should I resend with the above wrapper?
Regards,
ZubairLK
>
> Thank you
> Aleksey Makarov
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v7] SATA: OCTEON: support SATA on OCTEON platform Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-02-03 18:40 +0100
Re: [PATCH v7] SATA: OCTEON: support SATA on OCTEON platform Aleksey Makarov <aleksey.makarov@caviumnetworks.com> - 2016-02-04 14:10 +0100
Re: [PATCH v7] SATA: OCTEON: support SATA on OCTEON platform Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> - 2016-02-04 17:10 +0100
Re: [PATCH v7] SATA: OCTEON: support SATA on OCTEON platform Arnd Bergmann <arnd@arndb.de> - 2016-02-05 16:20 +0100
Re: [PATCH v7] SATA: OCTEON: support SATA on OCTEON platform Rob Herring <robh@kernel.org> - 2016-02-08 18:50 +0100
csiph-web