linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
To: linux-arm-kernel@lists.infradead.org
Subject: Warnings in arch/arm64/mm/dma-mapping.c
Date: Tue, 30 Oct 2018 08:43:44 +0100	[thread overview]
Message-ID: <20181030074344.GA24697@lst.de> (raw)
In-Reply-To: <a771d5ce-28a2-609e-5fd7-338fadc20743@gmail.com>

On Mon, Oct 29, 2018 at 04:51:47PM -0700, Florian Fainelli wrote:
> Hi,
> 
> I have not a chance to run a bisection yet, but I suspect this is coming
> from Christoph's latest batch of DMA-API changes in ARM64 under the
> merge commit befa93633193e5327e4045d1e5fa29114580fa5d ("Merge tag
> 'dma-mapping-4.20-1' of git://git.infradead.org/users/hch/dma-mapping"),
> here are the warnings:

This should fix it:

---
>From 773c5e097c5cf3868443ffb79ae64d79f70e3ccf Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Tue, 30 Oct 2018 09:41:29 +0200
Subject: arm64: fix warnings without CONFIG_IOMMU_DMA

__swiotlb_get_sgtable_page and __swiotlb_mmap_pfn are not only misnamed
but also only used if CONFIG_IOMMU_DMA is set.  Just add a simple ifdef
for now, given that we plan to remove them entirely for the next merge
window.

Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 arch/arm64/mm/dma-mapping.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
index d190612b8f33..560756a7290e 100644
--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -160,6 +160,7 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr,
 	__dma_unmap_area(phys_to_virt(paddr), size, dir);
 }
 
+#ifdef CONFIG_IOMMU_DMA
 static int __swiotlb_get_sgtable_page(struct sg_table *sgt,
 				      struct page *page, size_t size)
 {
@@ -188,6 +189,7 @@ static int __swiotlb_mmap_pfn(struct vm_area_struct *vma,
 
 	return ret;
 }
+#endif /* CONFIG_IOMMU_DMA */
 
 static int __init atomic_pool_init(void)
 {
-- 
2.19.1

       reply	other threads:[~2018-10-30  7:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <a771d5ce-28a2-609e-5fd7-338fadc20743@gmail.com>
2018-10-30  7:43 ` Christoph Hellwig [this message]
2018-10-30 10:13   ` Warnings in arch/arm64/mm/dma-mapping.c Will Deacon
2018-10-30 17:10     ` Florian Fainelli
2018-11-02 17:47     ` Catalin Marinas
2018-11-02 18:26       ` Christoph Hellwig

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=20181030074344.GA24697@lst.de \
    --to=hch@lst.de \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).