lkml.org 
[lkml]   [2020]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: drivers/net/can/kvaser_pciefd.c:801:17: sparse: sparse: cast removes address space '<asn:2>' of expression
From
Date

On 13/6/20 2:35 am, Luc Van Oostenryck wrote:
> On Sat, Jun 13, 2020 at 01:33:16AM +1000, Greg Ungerer wrote:
>>>> arch/m68k/include/asm/io_no.h:78:16: sparse: sparse: cast to restricted __le32
>>
>> This one I am not sure about yet.
>> Still investigating.
>
> swab32(__raw_readl(addr)) ?
>
> Keeping __le32_to_cpu() will only force you to use ugly casts for no benefits
> and the comment above explain clearly the situation about the endianness.

That is unfortunate, the use of le32_to_cpu() made it very clear
what was going on - for those that don't choose to read comments.

In any case that would seem to be the cleanest solution.
Patch to follow.

Regards
Greg



\
 
 \ /
  Last update: 2020-06-15 09:08    [W:0.104 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site