All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	Jayachandran C <jchandra@broadcom.com>,
	Ganesan Ramalingam <ganesanr@broadcom.com>
Subject: Re: [PATCH -next] MIPS: Netlogic: Fix build error
Date: Tue, 25 Aug 2015 10:14:17 -0700	[thread overview]
Message-ID: <55DCA269.2000404@roeck-us.net> (raw)
In-Reply-To: <1440520150-2458-1-git-send-email-linux@roeck-us.net>

On 08/25/2015 09:29 AM, Guenter Roeck wrote:
> 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")

Upon reflection, I think the problem may have been introduced by changes
in the definition of dma_alloc_from_coherent(), not by the above patch.
Not sure how to fix that properly.

Guenter

> Cc: Jayachandran C <jchandra@broadcom.com>
> Cc: Ganesan Ramalingam <ganesanr@broadcom.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>   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;
>

      reply	other threads:[~2015-08-25 17:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 16:29 [PATCH -next] MIPS: Netlogic: Fix build error Guenter Roeck
2015-08-25 17:14 ` Guenter Roeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55DCA269.2000404@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=ganesanr@broadcom.com \
    --cc=jchandra@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.