mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
usb: isp1760: use relaxed primitives
Use io relaxed access memory primitives to satisfy strict type checking (__force). This will fix some existing sparse warnings: sparse: warning: cast to restricted __le32 Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Link: https://lore.kernel.org/r/20210513084717.2487366-4-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1da9e1c068
commit
03e28d5233
1 changed files with 4 additions and 4 deletions
|
@ -246,7 +246,7 @@ static void bank_reads8(void __iomem *src_base, u32 src_offset, u32 bank_addr,
|
||||||
|
|
||||||
if (src_offset < PAYLOAD_OFFSET) {
|
if (src_offset < PAYLOAD_OFFSET) {
|
||||||
while (bytes >= 4) {
|
while (bytes >= 4) {
|
||||||
*dst = le32_to_cpu(__raw_readl(src));
|
*dst = readl_relaxed(src);
|
||||||
bytes -= 4;
|
bytes -= 4;
|
||||||
src++;
|
src++;
|
||||||
dst++;
|
dst++;
|
||||||
|
@ -267,7 +267,7 @@ static void bank_reads8(void __iomem *src_base, u32 src_offset, u32 bank_addr,
|
||||||
* allocated.
|
* allocated.
|
||||||
*/
|
*/
|
||||||
if (src_offset < PAYLOAD_OFFSET)
|
if (src_offset < PAYLOAD_OFFSET)
|
||||||
val = le32_to_cpu(__raw_readl(src));
|
val = readl_relaxed(src);
|
||||||
else
|
else
|
||||||
val = __raw_readl(src);
|
val = __raw_readl(src);
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ static void mem_writes8(void __iomem *dst_base, u32 dst_offset,
|
||||||
|
|
||||||
if (dst_offset < PAYLOAD_OFFSET) {
|
if (dst_offset < PAYLOAD_OFFSET) {
|
||||||
while (bytes >= 4) {
|
while (bytes >= 4) {
|
||||||
__raw_writel(cpu_to_le32(*src), dst);
|
writel_relaxed(*src, dst);
|
||||||
bytes -= 4;
|
bytes -= 4;
|
||||||
src++;
|
src++;
|
||||||
dst++;
|
dst++;
|
||||||
|
@ -322,7 +322,7 @@ static void mem_writes8(void __iomem *dst_base, u32 dst_offset,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (dst_offset < PAYLOAD_OFFSET)
|
if (dst_offset < PAYLOAD_OFFSET)
|
||||||
__raw_writel(cpu_to_le32(*src), dst);
|
writel_relaxed(*src, dst);
|
||||||
else
|
else
|
||||||
__raw_writel(*src, dst);
|
__raw_writel(*src, dst);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue