From patchwork Thu Sep 15 13:43:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76308 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp2451154qgf; Thu, 15 Sep 2016 06:44:11 -0700 (PDT) X-Received: by 10.66.158.10 with SMTP id wq10mr14814443pab.2.1473947051357; Thu, 15 Sep 2016 06:44:11 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ln2si4398473pab.23.2016.09.15.06.44.10; Thu, 15 Sep 2016 06:44:11 -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 S1757513AbcIONn7 (ORCPT + 27 others); Thu, 15 Sep 2016 09:43:59 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:32933 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753734AbcIONnu (ORCPT ); Thu, 15 Sep 2016 09:43:50 -0400 Received: by mail-pa0-f47.google.com with SMTP id cm16so16194198pac.0 for ; Thu, 15 Sep 2016 06:43:45 -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=h8i/15MKT3nkAqgCYznApsNoeAHLGqEIpoCkBFB/VvE=; b=HXQt+yTneJRd7T0AWfxDkstyQXhqgobA6q1nOyv0MxzwmZ2Wgx+GfjltPZok6s+ZX1 ZbAVU0p2FmP6XkKpkistqKpSxEP8DqscOv3D3cAvfR3AXT9IIiY21lqDHbLwfEEpaqSh d+IYxsDY87yH82S0zkhr+IsA1MnPZciLhIXmg= 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=h8i/15MKT3nkAqgCYznApsNoeAHLGqEIpoCkBFB/VvE=; b=B9BpAEQStEG6+4l4WaHjypau45DQOWe+mhuVE4v3OOA/oGX+pKhVDh5p4gowbhBJim N06Ivfd+BY4AYHF04BzzQnOajXJBqtNlXrEcMllvYQHFN7RpZLVa1tstjB+Y5a1NHe0T FbRwjCv6EXEfiXx7G0hNAm1cK6axAzjRYoyaL9WN1anceU3UvdKJ8/xCd6dml8q8RUYJ 2BIDnFJ2SNcHz0NVPyoDLooz2DuKrgWz497+A5IXaqyXnXNUrtkvwGKIJr3Ilqq8/FlY KDAx62jRZ4sbbdssCqXjhODbRLDxpwCWFm8aqzEzrnnCJnR9oLGsbShFw0fALLg31dJP fdJQ== X-Gm-Message-State: AE9vXwPpTk0TCHFM47KPoWIv4TPxRIYIvcEnphWioEZMx2zyBvuEZGOtEc2LmqoiIpThwyVm X-Received: by 10.66.146.39 with SMTP id sz7mr14486450pab.36.1473947024972; Thu, 15 Sep 2016 06:43:44 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.172]) by smtp.gmail.com with ESMTPSA id v6sm45562354pfv.8.2016.09.15.06.43.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Sep 2016 06:43:44 -0700 (PDT) From: Baoyou Xie To: alexander.deucher@amd.com, christian.koenig@amd.com, airlied@linux.ie, David1.Zhou@amd.com, Monk.Liu@amd.com, Rex.Zhu@amd.com, JinHuiEric.Huang@amd.com, Flora.Cui@amd.com, michel.daenzer@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 Subject: [PATCH] drm/amdgpu: clean function declarations in amdgpu_ttm.c up Date: Thu, 15 Sep 2016 21:43:26 +0800 Message-Id: <1473947006-28038-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 2 warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:985:5: warning: no previous prototype for 'amdgpu_ttm_init' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c:1092:6: warning: no previous prototype for 'amdgpu_ttm_fini' [-Wmissing-prototypes] In fact, both functions are declared in drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c, but should be declared in a header file, thus can be recognized in other file. So this patch moves the declarations into drivers/gpu/drm/amd/amdgpu/amdgpu.h. Signed-off-by: Baoyou Xie --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index a7bb862..3208608 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -2402,6 +2402,8 @@ void amdgpu_gtt_location(struct amdgpu_device *adev, struct amdgpu_mc *mc); void amdgpu_ttm_set_active_vram_size(struct amdgpu_device *adev, u64 size); u64 amdgpu_ttm_get_gtt_mem_size(struct amdgpu_device *adev); int amdgpu_ttm_global_init(struct amdgpu_device *adev); +int amdgpu_ttm_init(struct amdgpu_device *adev); +void amdgpu_ttm_fini(struct amdgpu_device *adev); void amdgpu_program_register_sequence(struct amdgpu_device *adev, const u32 *registers, const u32 array_size); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index b17734e..30f05d8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -38,8 +38,6 @@ #include "amdgpu_trace.h" -int amdgpu_ttm_init(struct amdgpu_device *adev); -void amdgpu_ttm_fini(struct amdgpu_device *adev); static u64 amdgpu_get_vis_part_size(struct amdgpu_device *adev, struct ttm_mem_reg *mem)