From patchwork Fri Sep 30 08:13:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 77163 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp140059qgf; Fri, 30 Sep 2016 01:13:55 -0700 (PDT) X-Received: by 10.66.72.69 with SMTP id b5mr9527463pav.98.1475223235777; Fri, 30 Sep 2016 01:13:55 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yv10si19003066pac.27.2016.09.30.01.13.55; Fri, 30 Sep 2016 01:13:55 -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 S1752362AbcI3INu (ORCPT + 27 others); Fri, 30 Sep 2016 04:13:50 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34964 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751732AbcI3INe (ORCPT ); Fri, 30 Sep 2016 04:13:34 -0400 Received: by mail-pa0-f41.google.com with SMTP id oz2so36283677pac.2 for ; Fri, 30 Sep 2016 01:13:34 -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:in-reply-to:references; bh=OnrYS4gpfR0xl8MXckS6WWW2esKp/jTU/tc7SM2m6os=; b=TsTrLFg7xFy8ABTNaEfrGA+LGqxw2J0XsU0hXDWSiGb8l2roWQjzmB+4TSFFK5267B ZB50/9ZGqpwO7XZOsRnbJeZjKxHaBT9fZiJ2L3CSC+UpL4yf1/sQzaIEGM8Vccbbke4M et37JEe9mhgtfibl4Pg93cw5jE18TZRrbwktc= 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:in-reply-to :references; bh=OnrYS4gpfR0xl8MXckS6WWW2esKp/jTU/tc7SM2m6os=; b=i4ojx89pQiNEPu7+N99xPmlvIiy7BHU4C0tmaOwlz/Vg0RAl8a65G1/SQtOhlplwL5 ITVYOiYZK8JY/eJZ0yGENvAQum6kbyBPGfAhtu00xALzG2vAWE5zdl/EMOzSXDu+fIIx 1xXLPDnGeYm68T+Z83wnGXxa+C5F3boYVh0Zmyx9TVc65rWw7n+l0yBq1/kJaSrgJNd9 YkEzzk8eVRWRC/BRGu+i8cK2t8SOO5sQFVzO+i4PhHFKdVbdLwHJPhlvAA0Li0ecEq4T NLryIjnLgt2o4Zu2wdMwaaahFRAxngAKmmLKXKnTvQJOCBgZf7u2rWx3V/7WSOOvd+0c x4DQ== X-Gm-Message-State: AA6/9Rkzt2nnMg6qTH4+Bxb4ZatJbRnVJxsoKcm9Yfn8QIoOhZAm+IRuEEr35IHv3L48o+jB X-Received: by 10.66.89.34 with SMTP id bl2mr9549085pab.33.1475223213598; Fri, 30 Sep 2016 01:13:33 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.182]) by smtp.gmail.com with ESMTPSA id i78sm25569968pfj.67.2016.09.30.01.13.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Sep 2016 01:13:33 -0700 (PDT) From: Baoyou Xie To: alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, han.fei@zte.com.cn, tang.qiang007@zte.com.cn Subject: [PATCH 3/3] drm/radeon: mark symbols static where possible Date: Fri, 30 Sep 2016 16:13:03 +0800 Message-Id: <1475223183-19698-3-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475223183-19698-1-git-send-email-baoyou.xie@linaro.org> References: <1475223183-19698-1-git-send-email-baoyou.xie@linaro.org> 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/gpu/drm/radeon/si.c:7850:5: warning: no previous prototype for 'si_vce_send_vcepll_ctlreq' [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_dp_mst.c:226:21: warning: no previous prototype for 'radeon_mst_best_encoder' [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_dp_mst.c:344:26: warning: no previous prototype for 'radeon_mst_find_connector' [-Wmissing-prototypes] drivers/gpu/drm/radeon/radeon_dp_mst.c:600:6: warning: no previous prototype for 'radeon_dp_mst_encoder_destroy' [-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/gpu/drm/radeon/radeon_dp_mst.c | 8 +++++--- drivers/gpu/drm/radeon/si.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c index de504ea..6d1237d 100644 --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c @@ -223,7 +223,8 @@ radeon_dp_mst_mode_valid(struct drm_connector *connector, return MODE_OK; } -struct drm_encoder *radeon_mst_best_encoder(struct drm_connector *connector) +static struct +drm_encoder *radeon_mst_best_encoder(struct drm_connector *connector) { struct radeon_connector *radeon_connector = to_radeon_connector(connector); @@ -341,7 +342,8 @@ const struct drm_dp_mst_topology_cbs mst_cbs = { .hotplug = radeon_dp_mst_hotplug, }; -struct radeon_connector *radeon_mst_find_connector(struct drm_encoder *encoder) +static struct +radeon_connector *radeon_mst_find_connector(struct drm_encoder *encoder) { struct drm_device *dev = encoder->dev; struct drm_connector *connector; @@ -597,7 +599,7 @@ static const struct drm_encoder_helper_funcs radeon_mst_helper_funcs = { .commit = radeon_mst_encoder_commit, }; -void radeon_dp_mst_encoder_destroy(struct drm_encoder *encoder) +static void radeon_dp_mst_encoder_destroy(struct drm_encoder *encoder) { drm_encoder_cleanup(encoder); kfree(encoder); diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index e5ceeb4..f73e441 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c @@ -7847,7 +7847,7 @@ static void si_program_aspm(struct radeon_device *rdev) } } -int si_vce_send_vcepll_ctlreq(struct radeon_device *rdev) +static int si_vce_send_vcepll_ctlreq(struct radeon_device *rdev) { unsigned i;