Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752361AbdLNEQF (ORCPT ); Wed, 13 Dec 2017 23:16:05 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:44339 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752141AbdLNEQE (ORCPT ); Wed, 13 Dec 2017 23:16:04 -0500 X-Google-Smtp-Source: ACJfBou8YiuKvRyfxgKeMTRYFzbeZwga83g8+7ab3A/GCFh89L846fQx94oX+FV4G7Hygeg9yJma3Q== From: "Xongwei.Song" To: gregkh@linuxfoundation.org, arve@android.com, tkjos@android.com, maco@android.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Xiongwei Song Subject: [PATCH] ANDROID: binder: make binder_alloc_new_buf_locked static and indent its arguments Date: Thu, 14 Dec 2017 12:15:42 +0800 Message-Id: <20171214041542.32572-1-sxwjean@gmail.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1392 Lines: 40 From: Xiongwei Song The function binder_alloc_new_buf_locked() is only used in this file, so make it static. Also clean up sparse warning: drivers/android/binder_alloc.c:330:23: warning: no previous prototype for ‘binder_alloc_new_buf_locked’ [-Wmissing-prototypes] In addition, the line of the function name exceeds 80 characters when add static for this function, hence indent its arguments anew. Signed-off-by: Xiongwei Song --- drivers/android/binder_alloc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index 0dba2308125c..a2e1904cde06 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -327,11 +327,12 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, return vma ? -ENOMEM : -ESRCH; } -struct binder_buffer *binder_alloc_new_buf_locked(struct binder_alloc *alloc, - size_t data_size, - size_t offsets_size, - size_t extra_buffers_size, - int is_async) +static struct binder_buffer *binder_alloc_new_buf_locked( + struct binder_alloc *alloc, + size_t data_size, + size_t offsets_size, + size_t extra_buffers_size, + int is_async) { struct rb_node *n = alloc->free_buffers.rb_node; struct binder_buffer *buffer; -- 2.15.1