Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55a27055 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: csr: remove CsrPmemFree()



It's just a wrapper around kfree() so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4becf12d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@

#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_panic.h"
#include "csr_sched.h"
@@ -312,11 +313,11 @@ void CsrMsgConvDeinit(void)
    {
        CsrMsgConvPrimEntry *s_next;
        s_next = s->next;
        CsrPmemFree(s);
        kfree(s);
        s = s_next;
    }

    CsrPmemFree(converter);
    kfree(converter);
    converter = NULL;
}
EXPORT_SYMBOL_GPL(CsrMsgConvDeinit);
+0 −11
Original line number Diff line number Diff line
@@ -38,14 +38,3 @@ void *CsrPmemAlloc(size_t size)
    return ret;
}
EXPORT_SYMBOL_GPL(CsrPmemAlloc);

void CsrPmemFree(void *ptr)
{
    if (ptr == NULL)
    {
        return;
    }

    kfree(ptr);
}
EXPORT_SYMBOL_GPL(CsrPmemFree);
+0 −15
Original line number Diff line number Diff line
@@ -45,20 +45,6 @@ void *CsrPmemAllocDebug(size_t size,
void *CsrPmemAlloc(size_t size);
#endif


/*****************************************************************************

    NAME
        CsrPmemFree

    DESCRIPTION
        This function will deallocate a previously allocated block of memory.

    PARAMETERS
        ptr - Pointer to allocated memory.

*****************************************************************************/
void CsrPmemFree(void *ptr);
#endif

/*****************************************************************************
@@ -131,7 +117,6 @@ void *CsrPmemDebugAlloc(size_t size, CsrPmemDebugAllocType type, const char* fil
#define CsrPmemAlloc(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__)

void CsrPmemDebugFree(void *ptr, CsrPmemDebugAllocType type, const char* file, u32 line);
#define CsrPmemFree(ptr) CsrPmemDebugFree(ptr, CSR_PMEM_DEBUG_TYPE_PMEM_ALLOC, __FILE__, __LINE__)

#endif

+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ void CsrSchedBgintSet(CsrSchedBgint bgint);
 *      obey the convention that when a message built with CsrPmemAlloc()ed memory
 *      is given to CsrSchedMessagePut() then ownership of the memory is ceded to the
 *      scheduler - and eventually to the recipient task. I.e., the receiver of
 *      the message will be expected to CsrPmemFree() the message storage.
 *      the message will be expected to kfree() the message storage.
 *
 *  RETURNS
 *      void.
+3 −2
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@

*****************************************************************************/
#include <linux/module.h>
#include <linux/slab.h>
#include "csr_pmem.h"
#include "csr_unicode.h"
#include "csr_macro.h"
@@ -881,7 +882,7 @@ u16 *CsrUtf16String2XML(u16 *str)

            *outputString++ = 0;

            CsrPmemFree(str);
            kfree(str);
        }
    }

@@ -1008,7 +1009,7 @@ u16 *CsrXML2Utf16String(u16 *str)

            *outputString++ = 0;

            CsrPmemFree(str);
            kfree(str);
        }
    }

Loading