lkml.org 
[lkml]   [2015]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] staging: fbtft: Disable DMA support if DMA is not available
From
On Thu, Apr 23, 2015 at 9:17 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Thu, Apr 23, 2015 at 08:47:15PM +0200, Geert Uytterhoeven wrote:
>> If NO_DMA=y:
>>
>> drivers/built-in.o: In function `fbtft_framebuffer_alloc':
>> (.text+0xb53cae): undefined reference to `dmam_alloc_coherent'
>>
>> As DMA support is already optional, make it depend on HAS_DMA.
>>
>> If !HAS_DMA, "dma" will always be false, and the compiler will optimize
>> away the call to dmam_alloc_coherent().
>
> Oh that's "sneaky" and not good, let's just make this driver be
> dependant on DMA and be done with it. I don't like to rely on the
> optimizer to get things to work properly.

Alternatively, I can stick in one more #ifdef, to no longer rely on the compiler
optimization?
AFAICS, the driver itself considers DMA optional, and will work without.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


\
 
 \ /
  Last update: 2015-04-24 09:21    [W:0.040 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site