Commit 754f40e0 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Li Yang

soc: fsl: qe: make cpm_muram_free() return void

Nobody uses the return value from cpm_muram_free, and functions that
free resources usually return void. One could imagine a use for a "how
much have I allocated" a la ksize(), but knowing how much one had
access to after the fact is useless.
Reviewed-by: default avatarTimur Tabi <timur@kernel.org>
Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
parent 800cd6fb
...@@ -170,7 +170,7 @@ EXPORT_SYMBOL(cpm_muram_alloc); ...@@ -170,7 +170,7 @@ EXPORT_SYMBOL(cpm_muram_alloc);
* cpm_muram_free - free a chunk of multi-user ram * cpm_muram_free - free a chunk of multi-user ram
* @offset: The beginning of the chunk as returned by cpm_muram_alloc(). * @offset: The beginning of the chunk as returned by cpm_muram_alloc().
*/ */
int cpm_muram_free(s32 offset) void cpm_muram_free(s32 offset)
{ {
unsigned long flags; unsigned long flags;
int size; int size;
...@@ -188,7 +188,6 @@ int cpm_muram_free(s32 offset) ...@@ -188,7 +188,6 @@ int cpm_muram_free(s32 offset)
} }
gen_pool_free(muram_pool, offset + GENPOOL_OFFSET, size); gen_pool_free(muram_pool, offset + GENPOOL_OFFSET, size);
spin_unlock_irqrestore(&cpm_muram_lock, flags); spin_unlock_irqrestore(&cpm_muram_lock, flags);
return size;
} }
EXPORT_SYMBOL(cpm_muram_free); EXPORT_SYMBOL(cpm_muram_free);
......
...@@ -99,7 +99,7 @@ int cpm_muram_init(void); ...@@ -99,7 +99,7 @@ int cpm_muram_init(void);
#if defined(CONFIG_CPM) || defined(CONFIG_QUICC_ENGINE) #if defined(CONFIG_CPM) || defined(CONFIG_QUICC_ENGINE)
s32 cpm_muram_alloc(unsigned long size, unsigned long align); s32 cpm_muram_alloc(unsigned long size, unsigned long align);
int cpm_muram_free(s32 offset); void cpm_muram_free(s32 offset);
s32 cpm_muram_alloc_fixed(unsigned long offset, unsigned long size); s32 cpm_muram_alloc_fixed(unsigned long offset, unsigned long size);
void __iomem *cpm_muram_addr(unsigned long offset); void __iomem *cpm_muram_addr(unsigned long offset);
unsigned long cpm_muram_offset(void __iomem *addr); unsigned long cpm_muram_offset(void __iomem *addr);
...@@ -111,9 +111,8 @@ static inline s32 cpm_muram_alloc(unsigned long size, ...@@ -111,9 +111,8 @@ static inline s32 cpm_muram_alloc(unsigned long size,
return -ENOSYS; return -ENOSYS;
} }
static inline int cpm_muram_free(s32 offset) static inline void cpm_muram_free(s32 offset)
{ {
return -ENOSYS;
} }
static inline s32 cpm_muram_alloc_fixed(unsigned long offset, static inline s32 cpm_muram_alloc_fixed(unsigned long offset,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment