lkml.org 
[lkml]   [2015]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [GIT] Sparc
From
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu, 5 Nov 2015 16:43:52 -0800

> On Thu, Nov 5, 2015 at 1:39 PM, David Miller <davem@davemloft.net> wrote:
>>
>> 5) Fix iommu-common code so it doesn't emit rediculous warnings
>> on some architectures, particularly ARM.
>
> Heh. So looking at that patch, I can't but help to react that this:
>
> #define IOMMU_ERROR_CODE (~(unsigned long) 0)
>
> is still pretty ridiculous. Maybe just (-1ul), or for those people
> who don't understand C unsigned long arithmetic and think that a
> negative unsigned long looks odd, (~0ul)?

Yeah I struggled with this, believe it or not.

The expression causing the problem was (~(dma_addr_t) 0) (AKA
DMA_ERROR_CODE) being used as the return value.

So I just replicated that expression. A neuron did fire saying "hey
pinhead, why not just use ~0UL" but I did not listen to the little
voice in my head this time.


\
 
 \ /
  Last update: 2015-11-06 06:21    [W:0.082 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site