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: 9357929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B645C600C8 for ; Fri, 30 Sep 2016 10:19:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A78DD29F8B for ; Fri, 30 Sep 2016 10:19:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9ADF329F8E; Fri, 30 Sep 2016 10:19:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, HK_RANDOM_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4703929F8B for ; Fri, 30 Sep 2016 10:19:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C63696E9B1; Fri, 30 Sep 2016 10:18:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x233.google.com (mail-pf0-x233.google.com [IPv6:2607:f8b0:400e:c00::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A2516E96F for ; Fri, 30 Sep 2016 08:13:28 +0000 (UTC) Received: by mail-pf0-x233.google.com with SMTP id u78so12557073pfa.1 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=CUH/7bLZYPqpNOq17ZOW5Gt39DtK8JI31MTlnScotDVvqWTlFbMw0tlWgwOg0rxSmr qdbwS2Z/ebD2rW5TxYzB4X3pkynoG4M6V6zGq55nmQrBrXgjYGLVtNrSs0jNzBuohISN k9H76ob15cSmKS8WzfCGDg7plWZQFoe7yUnx+F1MNXr1M3LEbl2Lmw7r/7nyXgw/6y4Q W8hbuiL7W0/pIWYQzVs6iNU5O3vxyvSb8FHHTCQjrdCPEp521LvE+tpRn08XKVubN+CV Z+xMTZHA9Eif1snFCnVSOuFeZdr1OLMgMl3rclAjbX2PhMjOD1Ef6dCMB4aUhYmdvvcQ X4kw== X-Gm-Message-State: AA6/9Rnwt2SIbhwGESp+tgXbRw3Airbhb+5C/j/AHGHv9DFj7/RaY8q9C7v/XrW0S8NSt3SB 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 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> X-Mailman-Approved-At: Fri, 30 Sep 2016 10:18:59 +0000 Cc: arnd@arndb.de, tang.qiang007@zte.com.cn, xie.baoyou@zte.com.cn, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, han.fei@zte.com.cn, baoyou.xie@linaro.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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;