From patchwork Fri Sep 30 08:13:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 77162 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp140056qgf; Fri, 30 Sep 2016 01:13:55 -0700 (PDT) X-Received: by 10.98.36.70 with SMTP id r67mr9493252pfj.174.1475223235439; 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 S1752188AbcI3INh (ORCPT + 27 others); Fri, 30 Sep 2016 04:13:37 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33083 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751695AbcI3IN3 (ORCPT ); Fri, 30 Sep 2016 04:13:29 -0400 Received: by mail-pf0-f179.google.com with SMTP id 21so37999503pfy.0 for ; Fri, 30 Sep 2016 01:13:28 -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=YoQyj6TBzsHal+ne3PR0lPafGtNkcEskFjtG8U+NNsG2my+nAj/hFfl47N3dtTYARa fTX7gGKRrqntOGr0RT/9ultyRKpdUEME/ckHupyXRifQPIm8TrKOeRWeSEk65pcVkmbi LYQmbcaYSjpePIlZIq/0ODhxP/vO9F+ksaP48= 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=ClyYo+XEu+cmITlxCTeGP1VrJPVH03vvmjX9r1hRZ/A+8hz6Ag7A0TN6Zf5co14VYE LwQtj6LUpDaWn8iJkqtU6QTPinti2x1dzAH9cdLSuV1zI70RNdx+fHWwBDUTH/U1B0k0 UJA4z4d6gkuL+XRCNh6y0+LPC3c9qy346NXFkPZHXu63mGCAZyHudd9ZxCEgTAuDbyxV GioOeJFoQFzrenyape0nRHHj/2QdvXfcJE37jWve0OZ8/Cqpwvaz0sBlzw77cOIUKslM 9OF6SITDudMQf5RWraqWiTxhHkMVkO79CJyyPN5G+wOvpweDENnl7R6P0Oa2iqiLQ0Kw 66hA== X-Gm-Message-State: AA6/9RnWNeE5/qiV4UuKTAVMrpMXoS2od3jU+GnzS2hFYcVuxIRyQESt+0RgraLPXYFbV2l3 X-Received: by 10.98.15.8 with SMTP id x8mr9426524pfi.141.1475223207892; Fri, 30 Sep 2016 01:13:27 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.182]) by smtp.gmail.com with ESMTPSA id i78sm25569968pfj.67.2016.09.30.01.13.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Sep 2016 01:13:27 -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:02 +0800 Message-Id: <1475223183-19698-2-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;