From: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
To: Aleksey Makarov <aleksey.makarov@caviumnetworks.com>,
tj@kernel.org, hdegoede@redhat.com
Cc: david.daney@cavium.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH v7] SATA: OCTEON: support SATA on OCTEON platform
Date: Thu, 4 Feb 2016 16:05:34 +0000 [thread overview]
Message-ID: <56B376CE.9010600@imgtec.com> (raw)
In-Reply-To: <56B342FF.1090709@caviumnetworks.com>
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
>
WARNING: multiple messages have this Message-ID (diff)
From: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
To: Aleksey Makarov <aleksey.makarov@caviumnetworks.com>,
<tj@kernel.org>, <hdegoede@redhat.com>
Cc: <david.daney@cavium.com>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-ide@vger.kernel.org>
Subject: Re: [PATCH v7] SATA: OCTEON: support SATA on OCTEON platform
Date: Thu, 4 Feb 2016 16:05:34 +0000 [thread overview]
Message-ID: <56B376CE.9010600@imgtec.com> (raw)
In-Reply-To: <56B342FF.1090709@caviumnetworks.com>
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
>
next prev parent reply other threads:[~2016-02-04 16:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 17:35 [PATCH v7] SATA: OCTEON: support SATA on OCTEON platform Zubair Lutfullah Kakakhel
2016-02-03 17:35 ` Zubair Lutfullah Kakakhel
2016-02-04 12:24 ` Aleksey Makarov
2016-02-04 12:24 ` Aleksey Makarov
2016-02-04 16:05 ` Zubair Lutfullah Kakakhel [this message]
2016-02-04 16:05 ` Zubair Lutfullah Kakakhel
2016-02-05 15:10 ` Arnd Bergmann
2016-02-08 17:42 ` Rob Herring
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=56B376CE.9010600@imgtec.com \
--to=zubair.kakakhel@imgtec.com \
--cc=aleksey.makarov@caviumnetworks.com \
--cc=david.daney@cavium.com \
--cc=devicetree@vger.kernel.org \
--cc=hdegoede@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.