Skip to content

Commit 754f40e

Browse files
VillemoesLi Yang
authored andcommitted
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: Timur Tabi <timur@kernel.org> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Li Yang <leoyang.li@nxp.com>
1 parent 800cd6f commit 754f40e

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎drivers/soc/fsl/qe/qe_common.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ EXPORT_SYMBOL(cpm_muram_alloc);
170170
* cpm_muram_free - free a chunk of multi-user ram
171171
* @offset: The beginning of the chunk as returned by cpm_muram_alloc().
172172
*/
173-
int cpm_muram_free(s32 offset)
173+
void cpm_muram_free(s32 offset)
174174
{
175175
unsigned long flags;
176176
int size;
@@ -188,7 +188,6 @@ int cpm_muram_free(s32 offset)
188188
}
189189
gen_pool_free(muram_pool, offset + GENPOOL_OFFSET, size);
190190
spin_unlock_irqrestore(&cpm_muram_lock, flags);
191-
return size;
192191
}
193192
EXPORT_SYMBOL(cpm_muram_free);
194193

‎include/soc/fsl/qe/qe.h‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ int cpm_muram_init(void);
9999

100100
#if defined(CONFIG_CPM) || defined(CONFIG_QUICC_ENGINE)
101101
s32 cpm_muram_alloc(unsigned long size, unsigned long align);
102-
int cpm_muram_free(s32 offset);
102+
void cpm_muram_free(s32 offset);
103103
s32 cpm_muram_alloc_fixed(unsigned long offset, unsigned long size);
104104
void __iomem *cpm_muram_addr(unsigned long offset);
105105
unsigned long cpm_muram_offset(void __iomem *addr);
@@ -111,9 +111,8 @@ static inline s32 cpm_muram_alloc(unsigned long size,
111111
return -ENOSYS;
112112
}
113113

114-
static inline int cpm_muram_free(s32 offset)
114+
static inline void cpm_muram_free(s32 offset)
115115
{
116-
return -ENOSYS;
117116
}
118117

119118
static inline s32 cpm_muram_alloc_fixed(unsigned long offset,

0 commit comments

Comments
 (0)