From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932943AbbHYQ3P (ORCPT ); Tue, 25 Aug 2015 12:29:15 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:45691 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753021AbbHYQ3O (ORCPT ); Tue, 25 Aug 2015 12:29:14 -0400 From: Guenter Roeck To: Ralf Baechle Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Guenter Roeck , Jayachandran C , Ganesan Ramalingam Subject: [PATCH -next] MIPS: Netlogic: Fix build error Date: Tue, 25 Aug 2015 09:29:10 -0700 Message-Id: <1440520150-2458-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.1.4 X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dma_alloc_from_coherent is defined as (0) if HAVE_GENERIC_DMA_COHERENT is not configured. This results in the following build error, seen with nlm_xlp_defconfig. arch/mips/netlogic/common/nlm-dma.c: In function 'nlm_dma_alloc_coherent': arch/mips/netlogic/common/nlm-dma.c:50:8: error: unused variable 'ret' Add __maybe_unused to the variable declaration to fix the problem. Fixes: 79f8511c83f1 ("MIPS: Netlogic: SWIOTLB dma ops for 32-bit DMA") Cc: Jayachandran C Cc: Ganesan Ramalingam Signed-off-by: Guenter Roeck --- arch/mips/netlogic/common/nlm-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/netlogic/common/nlm-dma.c b/arch/mips/netlogic/common/nlm-dma.c index f3d4ae87abc7..4982d97d279f 100644 --- a/arch/mips/netlogic/common/nlm-dma.c +++ b/arch/mips/netlogic/common/nlm-dma.c @@ -47,7 +47,7 @@ static char *nlm_swiotlb; static void *nlm_dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp, struct dma_attrs *attrs) { - void *ret; + void __maybe_unused *ret; if (dma_alloc_from_coherent(dev, size, dma_handle, &ret)) return ret; -- 2.1.4