From: Laura Abbott <labbott@redhat.com>
To: Baoyou Xie <baoyou.xie@linaro.org>,
sumit.semwal@linaro.org, gregkh@linuxfoundation.org,
arve@android.com, riandrews@android.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
arnd@arndb.de, xie.baoyou@zte.com.cn
Subject: Re: [PATCH] staging: android: ion: mark symbols static where possible
Date: Fri, 23 Sep 2016 10:07:31 -0700 [thread overview]
Message-ID: <0a883dda-73e3-9785-9a0f-9ba7e5d762d2@redhat.com> (raw)
In-Reply-To: <1474636415-15115-1-git-send-email-baoyou.xie@linaro.org>
On 09/23/2016 06:13 AM, Baoyou Xie wrote:
> We get 4 warnings when building kernel with W=1:
> drivers/staging/android/ion/ion_carveout_heap.c:36:17: warning: no previous prototype for 'ion_carveout_allocate' [-Wmissing-prototypes]
> drivers/staging/android/ion/ion_carveout_heap.c:50:6: warning: no previous prototype for 'ion_carveout_free' [-Wmissing-prototypes]
> drivers/staging/android/ion/ion_of.c:28:5: warning: no previous prototype for 'ion_parse_dt_heap_common' [-Wmissing-prototypes]
> drivers/staging/android/ion/ion_of.c:54:5: warning: no previous prototype for 'ion_setup_heap_common' [-Wmissing-prototypes]
>
> In fact, these functions are only used in the file in which they are
> declared and don't need a declaration, but can be made static.
> so this patch marks these functions with 'static'.
>
Acked-by: Laura Abbott <labbott@redhat.com>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> ---
> drivers/staging/android/ion/ion_carveout_heap.c | 10 +++++-----
> drivers/staging/android/ion/ion_of.c | 12 ++++++------
> 2 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/android/ion/ion_carveout_heap.c b/drivers/staging/android/ion/ion_carveout_heap.c
> index c4f0795..a8ea973 100644
> --- a/drivers/staging/android/ion/ion_carveout_heap.c
> +++ b/drivers/staging/android/ion/ion_carveout_heap.c
> @@ -33,9 +33,9 @@ struct ion_carveout_heap {
> ion_phys_addr_t base;
> };
>
> -ion_phys_addr_t ion_carveout_allocate(struct ion_heap *heap,
> - unsigned long size,
> - unsigned long align)
> +static ion_phys_addr_t ion_carveout_allocate(struct ion_heap *heap,
> + unsigned long size,
> + unsigned long align)
> {
> struct ion_carveout_heap *carveout_heap =
> container_of(heap, struct ion_carveout_heap, heap);
> @@ -47,8 +47,8 @@ ion_phys_addr_t ion_carveout_allocate(struct ion_heap *heap,
> return offset;
> }
>
> -void ion_carveout_free(struct ion_heap *heap, ion_phys_addr_t addr,
> - unsigned long size)
> +static void ion_carveout_free(struct ion_heap *heap, ion_phys_addr_t addr,
> + unsigned long size)
> {
> struct ion_carveout_heap *carveout_heap =
> container_of(heap, struct ion_carveout_heap, heap);
> diff --git a/drivers/staging/android/ion/ion_of.c b/drivers/staging/android/ion/ion_of.c
> index de0899a..3486909 100644
> --- a/drivers/staging/android/ion/ion_of.c
> +++ b/drivers/staging/android/ion/ion_of.c
> @@ -25,9 +25,9 @@
> #include "ion_priv.h"
> #include "ion_of.h"
>
> -int ion_parse_dt_heap_common(struct device_node *heap_node,
> - struct ion_platform_heap *heap,
> - struct ion_of_heap *compatible)
> +static int ion_parse_dt_heap_common(struct device_node *heap_node,
> + struct ion_platform_heap *heap,
> + struct ion_of_heap *compatible)
> {
> int i;
>
> @@ -51,9 +51,9 @@ int ion_parse_dt_heap_common(struct device_node *heap_node,
> return 0;
> }
>
> -int ion_setup_heap_common(struct platform_device *parent,
> - struct device_node *heap_node,
> - struct ion_platform_heap *heap)
> +static int ion_setup_heap_common(struct platform_device *parent,
> + struct device_node *heap_node,
> + struct ion_platform_heap *heap)
> {
> int ret = 0;
>
>
prev parent reply other threads:[~2016-09-23 17:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-23 13:13 Baoyou Xie
2016-09-23 17:07 ` Laura Abbott [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a883dda-73e3-9785-9a0f-9ba7e5d762d2@redhat.com \
--to=labbott@redhat.com \
--cc=arnd@arndb.de \
--cc=arve@android.com \
--cc=baoyou.xie@linaro.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riandrews@android.com \
--cc=sumit.semwal@linaro.org \
--cc=xie.baoyou@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®