mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mm: move is_kernel_rodata() to asm-generic/sections.h
Export this routine so that we can use it later in devm_kstrdup_const() and devm_kfree(). Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Acked-by: Mike Rapoport <[email protected]> Acked-by: Rasmus Villemoes <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
0571967dfb
commit
59c3f82ad1
2 changed files with 14 additions and 7 deletions
|
|
@ -15,17 +15,10 @@
|
|||
#include <linux/vmalloc.h>
|
||||
#include <linux/userfaultfd_k.h>
|
||||
|
||||
#include <asm/sections.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
static inline int is_kernel_rodata(unsigned long addr)
|
||||
{
|
||||
return addr >= (unsigned long)__start_rodata &&
|
||||
addr < (unsigned long)__end_rodata;
|
||||
}
|
||||
|
||||
/**
|
||||
* kfree_const - conditionally free memory
|
||||
* @x: pointer to the memory
|
||||
|
|
|
|||
Loading…
Reference in a new issue