]> Git Repo - linux.git/commitdiff
binder: remove redundant variable page_addr
authorColin Ian King <[email protected]>
Thu, 7 Mar 2024 22:15:05 +0000 (22:15 +0000)
committerGreg Kroah-Hartman <[email protected]>
Thu, 7 Mar 2024 22:22:32 +0000 (22:22 +0000)
Variable page_addr is being assigned a value that is never read. The
variable is redundant and can be removed.

Cleans up clang scan build warning:
warning: Value stored to 'page_addr' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <[email protected]>
Fixes: 162c79731448 ("binder: avoid user addresses in debug logs")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Acked-by: Carlos Llamas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/android/binder_alloc.c

index e0e4dc38b6920737c2d9ec432664d0b160834de8..2e1f261ec5c8950ae5164925fc8e72b51fad36c2 100644 (file)
@@ -925,7 +925,6 @@ void binder_alloc_deferred_release(struct binder_alloc *alloc)
                int i;
 
                for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) {
-                       unsigned long page_addr;
                        bool on_lru;
 
                        if (!alloc->pages[i].page_ptr)
@@ -933,7 +932,6 @@ void binder_alloc_deferred_release(struct binder_alloc *alloc)
 
                        on_lru = list_lru_del_obj(&binder_freelist,
                                                  &alloc->pages[i].lru);
-                       page_addr = alloc->buffer + i * PAGE_SIZE;
                        binder_alloc_debug(BINDER_DEBUG_BUFFER_ALLOC,
                                     "%s: %d: page %d %s\n",
                                     __func__, alloc->pid, i,
This page took 0.048175 seconds and 4 git commands to generate.