From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030726AbbDWTRs (ORCPT ); Thu, 23 Apr 2015 15:17:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34601 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030420AbbDWTRm (ORCPT ); Thu, 23 Apr 2015 15:17:42 -0400 Date: Thu, 23 Apr 2015 21:17:38 +0200 From: Greg Kroah-Hartman To: Geert Uytterhoeven Cc: Thomas Petazzoni , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: fbtft: Disable DMA support if DMA is not available Message-ID: <20150423191738.GA14247@kroah.com> References: <1429814835-22957-1-git-send-email-geert@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429814835-22957-1-git-send-email-geert@linux-m68k.org> 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 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. thanks, greg k-h