From patchwork Sun Sep 25 08:43:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76968 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp643022qgf; Sun, 25 Sep 2016 01:44:05 -0700 (PDT) X-Received: by 10.66.164.39 with SMTP id yn7mr28092256pab.163.1474793045657; Sun, 25 Sep 2016 01:44:05 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yn6si444607pab.271.2016.09.25.01.44.05; Sun, 25 Sep 2016 01:44:05 -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 S965709AbcIYIn4 (ORCPT + 27 others); Sun, 25 Sep 2016 04:43:56 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35590 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941005AbcIYInu (ORCPT ); Sun, 25 Sep 2016 04:43:50 -0400 Received: by mail-pa0-f42.google.com with SMTP id oz2so53033174pac.2 for ; Sun, 25 Sep 2016 01:43: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:in-reply-to:references; bh=4MkLIyguyStF7yiC77swK82syhtscmFw1ltX8c9/CKU=; b=GFWRasH/uLxCUXvzZwUu+xpf6OC0Nzr9tfmDpwSbLou2Bi+m1jMQ4WZuHno6xzMU1P cNi6N7aJdWLnhqSwwdisVcAq76/H4OmQay6y6GjcPyOyqdKpPoQ1kqS/FAG3wQrDhn6a GPJfFabld+p84mvp9cNuA29o7WS4Vze6oVqGE= 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=4MkLIyguyStF7yiC77swK82syhtscmFw1ltX8c9/CKU=; b=Ty9McPIeWu7Rkn4AnEc++vTCYVY0Pfleo6xG7MMwa18+UvNiVni3Nwq+1v5nkYe9Vt rF5pJgV/T7933T4JVzVuXjmwiJwwEoB/evf34GA0gu7PIwicP3HHYEhLyI7FJmqp8Mks dknHlbhzXxOQ3dDljFJokbcVTaiiH5x+mFqAWr9Kg1OMJfd1Ws9Mw06n8y6MqVxgZOir gZvLuuOLsCjWVQcxSH2PdBEenfm9NSO5Srm3+L/d5grd1yhHEnDNI3MoOMIi/tZ8oiEp AKDibzZbUq2eI1YRfPipe9B4DmXvwG1RhiXvivRM6vhDgQRY1YZRIjXqsgoAQYTkDwvn gYZQ== X-Gm-Message-State: AE9vXwP5Va8cXboMgaFcotGsQNO/OuJ5vJbEu+zb1juNafrsbi0DwurwJag3M/apB5kN5mov X-Received: by 10.66.65.11 with SMTP id t11mr28261989pas.48.1474793029417; Sun, 25 Sep 2016 01:43:49 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.164]) by smtp.gmail.com with ESMTPSA id u64sm22722669pfi.0.2016.09.25.01.43.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 01:43:48 -0700 (PDT) From: Baoyou Xie To: alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, oded.gabbay@gmail.com, David1.Zhou@amd.com, Monk.Liu@amd.com, Rex.Zhu@amd.com, JinHuiEric.Huang@amd.com, Flora.Cui@amd.com, Jammy.Zhou@amd.com, lukas@wunner.de, mario.kleiner.de@gmail.com, nils.wallmenius@gmail.com, Emily.Deng@amd.com, cpaul@redhat.com, arindam.nath@amd.com, tom.stdenis@amd.com, nicolai.haehnle@amd.com, Qingqing.Wang@amd.com, samuel.li@amd.com, ray.huang@amd.com, michel.daenzer@amd.com, daniel.vetter@ffwll.ch, gustavo.padovan@collabora.co.uk, eric.engestrom@imgtec.com, vitaly.prosyak@amd.com, alexandre.f.demers@gmail.com, Jerry.Zhang@amd.com, seanpaul@chromium.org, yamada.masahiro@socionext.com, maruthi.bayyavarapu@amd.com 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 2/4] drm/amdgpu: mark symbols static where possible Date: Sun, 25 Sep 2016 16:43:14 +0800 Message-Id: <1474792996-22998-2-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474792996-22998-1-git-send-email-baoyou.xie@linaro.org> References: <1474792996-22998-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 a few warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2046:5: warning: no previous prototype for 'amdgpu_pre_soft_reset' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1548:5: warning: no previous prototype for 'amdgpu_connector_virtual_dpms' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/si.c:908:5: warning: no previous prototype for 'si_pciep_rreg' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/dce_virtual.c:130:6: warning: no previous prototype for 'dce_virtual_resume_mc_access' [-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/amd/amdgpu/amdgpu_connectors.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/si.c | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c index 319a5e1..decbba5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -1545,7 +1545,8 @@ static int amdgpu_connector_virtual_mode_valid(struct drm_connector *connector, return MODE_OK; } -int amdgpu_connector_virtual_dpms(struct drm_connector *connector, int mode) +static int +amdgpu_connector_virtual_dpms(struct drm_connector *connector, int mode) { return 0; } @@ -1557,7 +1558,8 @@ amdgpu_connector_virtual_detect(struct drm_connector *connector, bool force) return connector_status_connected; } -int amdgpu_connector_virtual_set_property(struct drm_connector *connector, +static int +amdgpu_connector_virtual_set_property(struct drm_connector *connector, struct drm_property *property, uint64_t val) { diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 3ddae5f..5b4a63f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2043,7 +2043,7 @@ static bool amdgpu_check_soft_reset(struct amdgpu_device *adev) return asic_hang; } -int amdgpu_pre_soft_reset(struct amdgpu_device *adev) +static int amdgpu_pre_soft_reset(struct amdgpu_device *adev) { int i, r = 0; diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 619b604..30badd2 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c @@ -95,7 +95,7 @@ static bool dce_virtual_is_display_hung(struct amdgpu_device *adev) return false; } -void dce_virtual_stop_mc_access(struct amdgpu_device *adev, +static void dce_virtual_stop_mc_access(struct amdgpu_device *adev, struct amdgpu_mode_mc_save *save) { switch (adev->asic_type) { @@ -127,13 +127,13 @@ void dce_virtual_stop_mc_access(struct amdgpu_device *adev, return; } -void dce_virtual_resume_mc_access(struct amdgpu_device *adev, +static void dce_virtual_resume_mc_access(struct amdgpu_device *adev, struct amdgpu_mode_mc_save *save) { return; } -void dce_virtual_set_vga_render_state(struct amdgpu_device *adev, +static void dce_virtual_set_vga_render_state(struct amdgpu_device *adev, bool render) { return; diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index fee76b8..e768683 100644 --- a/drivers/gpu/drm/amd/amdgpu/si.c +++ b/drivers/gpu/drm/amd/amdgpu/si.c @@ -905,7 +905,7 @@ static void si_pcie_wreg(struct amdgpu_device *adev, u32 reg, u32 v) spin_unlock_irqrestore(&adev->pcie_idx_lock, flags); } -u32 si_pciep_rreg(struct amdgpu_device *adev, u32 reg) +static u32 si_pciep_rreg(struct amdgpu_device *adev, u32 reg) { unsigned long flags; u32 r; @@ -918,7 +918,7 @@ u32 si_pciep_rreg(struct amdgpu_device *adev, u32 reg) return r; } -void si_pciep_wreg(struct amdgpu_device *adev, u32 reg, u32 v) +static void si_pciep_wreg(struct amdgpu_device *adev, u32 reg, u32 v) { unsigned long flags;