340-MIPS-mm-remove-mips_dma_mapping_error.patch 901 B

1234567891011121314151617181920212223242526272829303132
  1. From: Felix Fietkau <nbd@nbd.name>
  2. Date: Tue, 5 Dec 2017 12:34:31 +0100
  3. Subject: [PATCH] MIPS: mm: remove mips_dma_mapping_error
  4. dma_mapping_error() already checks if ops->mapping_error is a null
  5. pointer
  6. Signed-off-by: Felix Fietkau <nbd@nbd.name>
  7. ---
  8. --- a/arch/mips/mm/dma-default.c
  9. +++ b/arch/mips/mm/dma-default.c
  10. @@ -373,11 +373,6 @@ static void mips_dma_sync_sg_for_device(
  11. }
  12. }
  13. -static int mips_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
  14. -{
  15. - return 0;
  16. -}
  17. -
  18. static int mips_dma_supported(struct device *dev, u64 mask)
  19. {
  20. return plat_dma_supported(dev, mask);
  21. @@ -406,7 +401,6 @@ static const struct dma_map_ops mips_def
  22. .sync_single_for_device = mips_dma_sync_single_for_device,
  23. .sync_sg_for_cpu = mips_dma_sync_sg_for_cpu,
  24. .sync_sg_for_device = mips_dma_sync_sg_for_device,
  25. - .mapping_error = mips_dma_mapping_error,
  26. .dma_supported = mips_dma_supported
  27. };