diff mbox series

[04/20] soc: fsl: qe: make cpm_muram_offset take a const void* argument

Message ID 20201205191744.7847-5-rasmus.villemoes@prevas.dk (mailing list archive)
State New, archived
Headers show
Series ethernet: ucc_geth: assorted fixes and simplifications | expand

Commit Message

Rasmus Villemoes Dec. 5, 2020, 7:17 p.m. UTC
Allow passing const-qualified pointers without requiring a cast in the

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
 drivers/soc/fsl/qe/qe_common.c | 2 +-
 include/soc/fsl/qe/qe.h        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series


diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
index 75075591f630..0fbdc965c4cb 100644
--- a/drivers/soc/fsl/qe/qe_common.c
+++ b/drivers/soc/fsl/qe/qe_common.c
@@ -223,7 +223,7 @@  void __iomem *cpm_muram_addr(unsigned long offset)
-unsigned long cpm_muram_offset(void __iomem *addr)
+unsigned long cpm_muram_offset(const void __iomem *addr)
 	return addr - (void __iomem *)muram_vbase;
diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h
index 3feddfec9f87..8ee3747433c0 100644
--- a/include/soc/fsl/qe/qe.h
+++ b/include/soc/fsl/qe/qe.h
@@ -102,7 +102,7 @@  s32 cpm_muram_alloc(unsigned long size, unsigned long align);
 void cpm_muram_free(s32 offset);
 s32 cpm_muram_alloc_fixed(unsigned long offset, unsigned long size);
 void __iomem *cpm_muram_addr(unsigned long offset);
-unsigned long cpm_muram_offset(void __iomem *addr);
+unsigned long cpm_muram_offset(const void __iomem *addr);
 dma_addr_t cpm_muram_dma(void __iomem *addr);
 static inline s32 cpm_muram_alloc(unsigned long size,
@@ -126,7 +126,7 @@  static inline void __iomem *cpm_muram_addr(unsigned long offset)
 	return NULL;
-static inline unsigned long cpm_muram_offset(void __iomem *addr)
+static inline unsigned long cpm_muram_offset(const void __iomem *addr)
 	return -ENOSYS;