[PATCH 05/21] binder: fix trivial typo of binder_free_buf_locked()

Carlos Llamas posted 21 patches 2 years, 1 month ago
Only 19 patches received!
There is a newer version of this series
[PATCH 05/21] binder: fix trivial typo of binder_free_buf_locked()
Posted by Carlos Llamas 2 years, 1 month ago
Fix minor misspelling of the function in the comment section.

No functional changes in this patch.

Cc: stable@vger.kernel.org
Fixes: 0f966cba95c7 ("binder: add flag to clear buffer on txn complete")
Signed-off-by: Carlos Llamas <cmllamas@google.com>
---
 drivers/android/binder_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c
index 9b28d0f9666d..cd720bb5c9ce 100644
--- a/drivers/android/binder_alloc.c
+++ b/drivers/android/binder_alloc.c
@@ -707,7 +707,7 @@ void binder_alloc_free_buf(struct binder_alloc *alloc,
 	/*
 	 * We could eliminate the call to binder_alloc_clear_buf()
 	 * from binder_alloc_deferred_release() by moving this to
-	 * binder_alloc_free_buf_locked(). However, that could
+	 * binder_free_buf_locked(). However, that could
 	 * increase contention for the alloc mutex if clear_on_free
 	 * is used frequently for large buffers. The mutex is not
 	 * needed for correctness here.
-- 
2.42.0.869.gea05f2083d-goog
Re: [PATCH 05/21] binder: fix trivial typo of binder_free_buf_locked()
Posted by Alice Ryhl 2 years, 1 month ago
Carlos Llamas <cmllamas@google.com> writes:
> Fix minor misspelling of the function in the comment section.
> 
> No functional changes in this patch.
> 
> Cc: stable@vger.kernel.org
> Fixes: 0f966cba95c7 ("binder: add flag to clear buffer on txn complete")
> Signed-off-by: Carlos Llamas <cmllamas@google.com>

It's a bit confusing that the pair of methods binder_alloc_free_buf and
binder_free_buf_locked are inconsistent in whether they user the alloc_
prefix. It might be worth it to change them to be consistent?

Either way, this change LGTM.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Re: [PATCH 05/21] binder: fix trivial typo of binder_free_buf_locked()
Posted by Carlos Llamas 2 years, 1 month ago
On Tue, Nov 07, 2023 at 09:08:05AM +0000, Alice Ryhl wrote:
> It's a bit confusing that the pair of methods binder_alloc_free_buf and
> binder_free_buf_locked are inconsistent in whether they user the alloc_
> prefix. It might be worth it to change them to be consistent?

Right, the prefix is concistent across the APIs but not really for the
local function names. I wouldn't mind adding the "alloc" part, it just
seemed easier to fix the comment and backport that.

--
Carlos Llamas