From patchwork Sun Sep 25 08:43:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 76970 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp643101qgf; Sun, 25 Sep 2016 01:44:28 -0700 (PDT) X-Received: by 10.66.249.233 with SMTP id yx9mr28048593pac.165.1474793068692; Sun, 25 Sep 2016 01:44:28 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2si18354726pfe.161.2016.09.25.01.44.28; Sun, 25 Sep 2016 01:44:28 -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 S965848AbcIYIoX (ORCPT + 27 others); Sun, 25 Sep 2016 04:44:23 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34685 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965775AbcIYIoT (ORCPT ); Sun, 25 Sep 2016 04:44:19 -0400 Received: by mail-pf0-f178.google.com with SMTP id l25so7326599pfb.1 for ; Sun, 25 Sep 2016 01:44:18 -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=P6wyl0/jpuxj1u3DvO8bL/bnxLYFBglVw8m0tNeCRUY=; b=E0chSvQueA8jfy2oUF7WL6f+PVBQCTAqNgWkiT0kK1IKlDuAbLV7B96CCmDajyruae rMG/o1OppQivKjBSmEzs04uEC75dNFtH9D548TWSljKOnvl1qQxtEbf4OgJ0LfYLUNdS SujttzmgNSlSzYFofcEGzuEQT46YKtzFXmbGY= 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=P6wyl0/jpuxj1u3DvO8bL/bnxLYFBglVw8m0tNeCRUY=; b=CHNFxB4aDJPngKMe/UDI2H3KvbuPdPQWEJx8MtxtqlaqE6IsIcRwsES4FZx5/PpCcd 2k1V5uVsU6FN7xKOI3iW4EESBw0rMkbly6NN38S1qRMHpfc74vQJY5zh6o8w7A9x7osO uRWgxFrWyKdm3P+/ZigDWV9oYzy16sJqG6Xy/vngVo8CTUVQHgSK7in7oIATZWVW4NDi CezyTwc7goxXjeNugGQ+BWC0bB2Mw4FVdjNxUImqE0u/RpDLoEU9WaRDin0mzWmdXD1A UfladGmxd4yC/BakgZm9Je4ithSOc8T/nhPFoJCnUmJlB36gAWuOe/nxqRZU16Rpaon9 9lHg== X-Gm-Message-State: AE9vXwOeFOrNufg68OaGVD7nzlmIaJOsqj0IlBtSgx0RQm4sgpDUBOb8Sui+t5TGt/ua+Qqt X-Received: by 10.98.148.2 with SMTP id m2mr28088361pfe.129.1474793052759; Sun, 25 Sep 2016 01:44:12 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.164]) by smtp.gmail.com with ESMTPSA id u64sm22722669pfi.0.2016.09.25.01.44.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 01:44:12 -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 4/4] drm/amdgpu: remove unused functions Date: Sun, 25 Sep 2016 16:43:16 +0800 Message-Id: <1474792996-22998-4-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 2 warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:146:5: warning: no previous prototype for 'pool_to_domain' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/cz_smc.c:104:5: warning: no previous prototype for 'cz_send_msg_to_smc_with_parameter_async' [-Wmissing-prototypes] In fact, both functions are called by no one and not exported, so this patch removes them. Signed-off-by: Baoyou Xie --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 8 -------- drivers/gpu/drm/amd/amdgpu/cz_smc.c | 7 ------- 2 files changed, 15 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index d080d08..dba8a5b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -143,14 +143,6 @@ int amdgpu_amdkfd_resume(struct amdgpu_device *rdev) return r; } -u32 pool_to_domain(enum kgd_memory_pool p) -{ - switch (p) { - case KGD_POOL_FRAMEBUFFER: return AMDGPU_GEM_DOMAIN_VRAM; - default: return AMDGPU_GEM_DOMAIN_GTT; - } -} - int alloc_gtt_mem(struct kgd_dev *kgd, size_t size, void **mem_obj, uint64_t *gpu_addr, void **cpu_ptr) diff --git a/drivers/gpu/drm/amd/amdgpu/cz_smc.c b/drivers/gpu/drm/amd/amdgpu/cz_smc.c index 95887e4..aed7033 100644 --- a/drivers/gpu/drm/amd/amdgpu/cz_smc.c +++ b/drivers/gpu/drm/amd/amdgpu/cz_smc.c @@ -101,13 +101,6 @@ int cz_send_msg_to_smc(struct amdgpu_device *adev, u16 msg) return 0; } -int cz_send_msg_to_smc_with_parameter_async(struct amdgpu_device *adev, - u16 msg, u32 parameter) -{ - WREG32(mmSMU_MP1_SRBM2P_ARG_0, parameter); - return cz_send_msg_to_smc_async(adev, msg); -} - int cz_send_msg_to_smc_with_parameter(struct amdgpu_device *adev, u16 msg, u32 parameter) {