mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
ANDROID: kfence: clean up unused variables
Commit 62fa525d1e50 ("BACKPORT: kfence: add test suite") removed memcg
sanity checks from original change as part of the backport. However,
this left a couple variables unused. This patch removes such variables
fixing the following warnings:
mm/kfence/kfence_test.c:270:23: warning: unused variable ‘s’ [-Wunused-variable]
270 | struct kmem_cache *s = test_cache ?: kmalloc_caches[kmalloc_type(GFP_KERNEL)][kmalloc_index(size)];
| ^
mm/kfence/kfence_test.c:269:17: warning: unused variable ‘page’ [-Wunused-variable]
269 | struct page *page = virt_to_head_page(alloc);
| ^~~~
Bug: 183339614
Fixes: 62fa525d1e50 ("BACKPORT: kfence: add test suite")
Reported-by: kernelci.org bot <bot@kernelci.org>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Ifac52f9021be61840cb43bc8d20c9728f3beb948
This commit is contained in:
parent
7bbdd5f5f0
commit
a9260cb494
1 changed files with 0 additions and 3 deletions
|
|
@ -266,9 +266,6 @@ static void *test_alloc(struct kunit *test, size_t size, gfp_t gfp, enum allocat
|
|||
alloc = kmalloc(size, gfp);
|
||||
|
||||
if (is_kfence_address(alloc)) {
|
||||
struct page *page = virt_to_head_page(alloc);
|
||||
struct kmem_cache *s = test_cache ?: kmalloc_caches[kmalloc_type(GFP_KERNEL)][kmalloc_index(size)];
|
||||
|
||||
if (policy == ALLOCATE_ANY)
|
||||
return alloc;
|
||||
if (policy == ALLOCATE_LEFT && IS_ALIGNED((unsigned long)alloc, PAGE_SIZE))
|
||||
|
|
|
|||
Loading…
Reference in a new issue