From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965671AbbDXHRs (ORCPT ); Fri, 24 Apr 2015 03:17:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39706 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965531AbbDXHRr (ORCPT ); Fri, 24 Apr 2015 03:17:47 -0400 Date: Fri, 24 Apr 2015 09:17:44 +0200 From: Greg Kroah-Hartman To: Geert Uytterhoeven Cc: Thomas Petazzoni , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , driverdevel , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] staging: fbtft: Disable DMA support if DMA is not available Message-ID: <20150424071744.GA6146@kroah.com> References: <1429814835-22957-1-git-send-email-geert@linux-m68k.org> <20150423191738.GA14247@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 24, 2015 at 09:15:00AM +0200, Geert Uytterhoeven wrote: > On Thu, Apr 23, 2015 at 9:17 PM, Greg Kroah-Hartman > 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? That would be better. thanks, greg k-h