From patchwork Thu Sep 8 10:55:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 75764 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp777589qgf; Thu, 8 Sep 2016 03:57:35 -0700 (PDT) X-Received: by 10.98.62.18 with SMTP id l18mr45929854pfa.86.1473332255482; Thu, 08 Sep 2016 03:57:35 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y8si46536818pab.178.2016.09.08.03.57.35; Thu, 08 Sep 2016 03:57:35 -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 S941390AbcIHK5Y (ORCPT + 27 others); Thu, 8 Sep 2016 06:57:24 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:33981 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941350AbcIHK5W (ORCPT ); Thu, 8 Sep 2016 06:57:22 -0400 Received: by mail-pf0-f173.google.com with SMTP id p64so17244824pfb.1 for ; Thu, 08 Sep 2016 03:57:22 -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=Xy2ADE0Pg9oB+nsGMyzcRuayTUyztHEt/c+oktDlrkU=; b=cV6QAUO2AVE2a+LZrzCj4CpRFHUljR5wy8i6F9fmlniNNqiJMRU5c9swOLQEeAWuLH gw2MrQ8n77Lr0NEBIRlzE1x2pLOvm5YdrpLr2INnnaN5/xN/2zCHm9jeCTAktZ3F1LNL Ku9wJjfM3JSvpBuIjTbnJDCt4SLF2zOdZxF48= 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=Xy2ADE0Pg9oB+nsGMyzcRuayTUyztHEt/c+oktDlrkU=; b=kI5Gd2kBefzf1mmRXv3i1KSIZqYrKCYl/LySw8wBpvK6y+d5DUno+XO/5M+91u2h2v U0tHwikZCohZU37wsgnb6LkBtoh7Gzm08vSLjloGcQHu9vxMeH3UmVpfrwlIZnpE9xzy aqN0vck8idIP5BVaxT4FmlL00nJWD3WUcUhz5gcdJbqAEedcdMCoTXRqE8Y2C1rKTp2O rYf1eniX3ewGnSy0wIejbb9F7kkHl+F8y6Cu9uAZXTTe/5VgE0bKVax8dKD7YSZ8vl5w bCAKloVgj1E5jSS3bet1dmFFLm4guvfK+lJHkgI4UNO1PKos23ZxB4dpRxSHRvdVJidV 4pEg== X-Gm-Message-State: AE9vXwOThzX+9Kd21MhiFxQ2/NYxKjWTxdkt87CUq6BLuct9d64yhTzZx29sZ/EztkFWDkSS X-Received: by 10.98.86.65 with SMTP id k62mr41213321pfb.82.1473332241576; Thu, 08 Sep 2016 03:57:21 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.33]) by smtp.gmail.com with ESMTPSA id hs7sm24411855pad.24.2016.09.08.03.57.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Sep 2016 03:57:21 -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 Subject: [PATCH] drm/radeon: mark symbols static where possible Date: Thu, 8 Sep 2016 18:55:12 +0800 Message-Id: <1473332112-25396-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/gpu/drm/radeon/si.c:7868: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 2523ca9..57872d4 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c @@ -7865,7 +7865,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;