* [PATCH v2] binder: remove redundant variable page_addr
[not found] <https://lore.kernel.org/all/ZZl_-XGd-WJ0juz9@google.com/>
@ 2024-01-16 19:32 ` Carlos Llamas
2024-03-07 21:43 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Carlos Llamas @ 2024-01-16 19:32 UTC (permalink / raw)
To: Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
Martijn Coenen, Joel Fernandes, Christian Brauner, Carlos Llamas,
Suren Baghdasaryan, Nathan Chancellor, Alice Ryhl
Cc: kernel-team, linux-kernel, Colin Ian King, kernel test robot,
Nick Desaulniers, Bill Wendling, Justin Stitt
From: Colin Ian King <colin.i.king@intel.com>
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 <colin.i.king@intel.com>
Fixes: 162c79731448 ("binder: avoid user addresses in debug logs")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312060851.cudv98wG-lkp@intel.com/
Acked-by: Carlos Llamas <cmllamas@google.com>
---
Notes:
v2: added tags, used char-misc-next as base
drivers/android/binder_alloc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index a4a4dc87ba53..34d7a1494bc7 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -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(&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,
base-commit: 5850edccec30325707f953bc088497b3b9041231
--
2.43.0.275.g3460e3d667-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] binder: remove redundant variable page_addr
2024-01-16 19:32 ` [PATCH v2] binder: remove redundant variable page_addr Carlos Llamas
@ 2024-03-07 21:43 ` Greg Kroah-Hartman
2024-03-07 22:15 ` [PATCH v3] " Carlos Llamas
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-03-07 21:43 UTC (permalink / raw)
To: Carlos Llamas
Cc: Arve Hjønnevåg, Todd Kjos, Martijn Coenen,
Joel Fernandes, Christian Brauner, Suren Baghdasaryan,
Nathan Chancellor, Alice Ryhl, kernel-team, linux-kernel,
Colin Ian King, kernel test robot, Nick Desaulniers,
Bill Wendling, Justin Stitt
On Tue, Jan 16, 2024 at 07:32:34PM +0000, Carlos Llamas wrote:
> From: Colin Ian King <colin.i.king@intel.com>
>
> 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 <colin.i.king@intel.com>
> Fixes: 162c79731448 ("binder: avoid user addresses in debug logs")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202312060851.cudv98wG-lkp@intel.com/
> Acked-by: Carlos Llamas <cmllamas@google.com>
> ---
>
> Notes:
> v2: added tags, used char-misc-next as base
>
> drivers/android/binder_alloc.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
> index a4a4dc87ba53..34d7a1494bc7 100644
> --- a/drivers/android/binder_alloc.c
> +++ b/drivers/android/binder_alloc.c
> @@ -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(&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,
>
> base-commit: 5850edccec30325707f953bc088497b3b9041231
> --
> 2.43.0.275.g3460e3d667-goog
>
This doesn't apply to my tree anymore, can you rebase?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v3] binder: remove redundant variable page_addr
2024-03-07 21:43 ` Greg Kroah-Hartman
@ 2024-03-07 22:15 ` Carlos Llamas
0 siblings, 0 replies; 3+ messages in thread
From: Carlos Llamas @ 2024-03-07 22:15 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, kernel-team, Colin Ian King, kernel test robot,
Carlos Llamas, Arve Hjønnevåg, Todd Kjos,
Martijn Coenen, Joel Fernandes, Christian Brauner,
Suren Baghdasaryan, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Alice Ryhl
From: Colin Ian King <colin.i.king@intel.com>
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 <colin.i.king@intel.com>
Fixes: 162c79731448 ("binder: avoid user addresses in debug logs")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312060851.cudv98wG-lkp@intel.com/
Acked-by: Carlos Llamas <cmllamas@google.com>
---
Notes:
v2: added tags, used char-misc-next as base
v3: rebased, fixed conflicts with 0a97c01cd20b
drivers/android/binder_alloc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index e0e4dc38b692..2e1f261ec5c8 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -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,
--
2.44.0.278.ge034bb2e1d-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-07 22:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <https://lore.kernel.org/all/ZZl_-XGd-WJ0juz9@google.com/>
2024-01-16 19:32 ` [PATCH v2] binder: remove redundant variable page_addr Carlos Llamas
2024-03-07 21:43 ` Greg Kroah-Hartman
2024-03-07 22:15 ` [PATCH v3] " Carlos Llamas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).