From patchwork Fri Sep 23 13:13:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76862 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp563888qgf; Fri, 23 Sep 2016 06:13:56 -0700 (PDT) X-Received: by 10.98.200.4 with SMTP id z4mr12177167pff.95.1474636436789; Fri, 23 Sep 2016 06:13:56 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si7912025pfj.126.2016.09.23.06.13.56; Fri, 23 Sep 2016 06:13:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759779AbcIWNNx (ORCPT + 27 others); Fri, 23 Sep 2016 09:13:53 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33129 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759691AbcIWNNu (ORCPT ); Fri, 23 Sep 2016 09:13:50 -0400 Received: by mail-pa0-f49.google.com with SMTP id hm5so40359352pac.0 for ; Fri, 23 Sep 2016 06:13:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=RjpBoGMGejHDHAnY1j4CpBWnPRWTH4Brn9aI19vZ5Gk=; b=L4DvlLyjqyUfTmO8/003qf0y78pjU5mGaWb46l91HxjBEoOMZSpuxTXmM0Mlca9UHM ddriVA7Tatw/mOoDG4ssFM5kZWcbR9jlVrp2BJZ0XkJuWJ+JjgninWKUnQ8rPUBDj/vw G1ezeHfk9jhHl0eOcOYFc22VfNZWQ0nq55xg8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RjpBoGMGejHDHAnY1j4CpBWnPRWTH4Brn9aI19vZ5Gk=; b=hL4AsmqBv+qhnW3MSzyGR26rQSjUcFqyiCtaCNAzx1fojUmKe3fOWqt8aw5ZwrfIvF J0dAFqzBBpdd90H4PCecNiUzM+AsR2knn+Br9KRsIB6VgGIJ6wo7qzl0oIAEz7M+WVZU kKezvFz7ZeLm3M9f6f01OO/Gs7TeGQF+oIQKGI/53rfjBqGKlRwetI0hHvN3/ONq17bZ WW2ipuxYM52jFR1/ktvBR8LgA9mQfaky6Wof89B/wuuNRwSnKcZ4hSO1yUMrFztAjB6z gmpWJe2GKJ27lI5g3QVfqeyWqhkdj1ox3kv1XrI9KjSAO20RbWzu3wV5V7AiTwl4Tksn HrBg== X-Gm-Message-State: AE9vXwO4d82izG7BcqqeyBtamH62xb4db1Md37vGbqEMRT54RqHOkPF1Rn743SQ7S1y19cKG X-Received: by 10.67.23.201 with SMTP id ic9mr12157337pad.143.1474636429829; Fri, 23 Sep 2016 06:13:49 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.27]) by smtp.gmail.com with ESMTPSA id y11sm9830392pfa.4.2016.09.23.06.13.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Sep 2016 06:13:49 -0700 (PDT) From: Baoyou Xie To: labbott@redhat.com, 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, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] staging: android: ion: mark symbols static where possible Date: Fri, 23 Sep 2016 21:13:35 +0800 Message-Id: <1474636415-15115-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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'. Signed-off-by: Baoyou Xie --- drivers/staging/android/ion/ion_carveout_heap.c | 10 +++++----- drivers/staging/android/ion/ion_of.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) -- 2.7.4 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;