From patchwork Tue Jan 13 18:52:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5625661 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 093879F2ED for ; Wed, 14 Jan 2015 03:23:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18F0C203A5 for ; Wed, 14 Jan 2015 03:23:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2F91E20304 for ; Wed, 14 Jan 2015 03:23:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DD0B6E700; Tue, 13 Jan 2015 19:22:47 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F0516E635 for ; Tue, 13 Jan 2015 10:48:54 -0800 (PST) Received: by mail-wi0-f180.google.com with SMTP id n3so6015960wiv.1 for ; Tue, 13 Jan 2015 10:48:53 -0800 (PST) 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=tzqWMuldU9eSaUFZMJmLHfFOFGAYHAVaJxs4MKdigP4=; b=NWyHBRtZPnqdxmGK6dZ0TkerI6xNMFzXDRgdyTtWYiad7h1Vpgc+2oKMWVbOcpsiu6 0tyEOAVmbK+FZxiMQo0LLIAKVQ52yUf9HvFp5OZlc7Sy8Ye8X0vA4fbKxI2Yz0V430MX YRn2p9vQFLZWjvlV3dMOwlTXLseqEa/xZDkHNn3tyZmr7Kqukzm5v5oqFR5Vau1ZjsGT gxXabrZsfwGdmQ8rTn56yEO+mcdrCihk29H61Af4tH9h4ujLj8LpClsBa8XJgonDdQEk /Km63L/byqxgLtHp8NCgs8p81qkki77oI1YSdgWD7cXq3FK0Po8jf2AXv2MiQpEyMHus YumA== X-Gm-Message-State: ALoCoQnYLQJRbxe+KijDkqKQ92GCd/ES5Gkaqeazm8Lx4/+0r03pH7LbACBFzyjUvIvS741snhYU X-Received: by 10.180.74.146 with SMTP id t18mr42195599wiv.62.1421174933108; Tue, 13 Jan 2015 10:48:53 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id bo3sm26782051wjb.44.2015.01.13.10.48.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jan 2015 10:48:52 -0800 (PST) From: Rickard Strandqvist To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= Subject: [PATCH] drm/radeon/sumo_dpm: Remove some unused functions Date: Tue, 13 Jan 2015 19:52:00 +0100 Message-Id: <1421175120-6214-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 X-Mailman-Approved-At: Tue, 13 Jan 2015 19:22:45 -0800 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rickard Strandqvist 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removes some functions that are not used anywhere: sumo_convert_vid7_to_vid2() sumo_dpm_reset_asic() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/gpu/drm/radeon/sumo_dpm.c | 26 -------------------------- drivers/gpu/drm/radeon/sumo_dpm.h | 3 --- 2 files changed, 29 deletions(-) diff --git a/drivers/gpu/drm/radeon/sumo_dpm.c b/drivers/gpu/drm/radeon/sumo_dpm.c index 1f8a883..e5d66a2 100644 --- a/drivers/gpu/drm/radeon/sumo_dpm.c +++ b/drivers/gpu/drm/radeon/sumo_dpm.c @@ -1338,18 +1338,6 @@ void sumo_dpm_post_set_power_state(struct radeon_device *rdev) sumo_update_current_ps(rdev, new_ps); } -void sumo_dpm_reset_asic(struct radeon_device *rdev) -{ - sumo_program_bootup_state(rdev); - sumo_enable_power_level_0(rdev); - sumo_set_forced_level_0(rdev); - sumo_set_forced_mode_enabled(rdev); - sumo_wait_for_level_0(rdev); - sumo_set_forced_mode_disabled(rdev); - sumo_set_forced_mode_enabled(rdev); - sumo_set_forced_mode_disabled(rdev); -} - void sumo_dpm_setup_asic(struct radeon_device *rdev) { struct sumo_power_info *pi = sumo_get_pi(rdev); @@ -1537,20 +1525,6 @@ u32 sumo_convert_vid2_to_vid7(struct radeon_device *rdev, return vid_mapping_table->entries[vid_mapping_table->num_entries - 1].vid_7bit; } -u32 sumo_convert_vid7_to_vid2(struct radeon_device *rdev, - struct sumo_vid_mapping_table *vid_mapping_table, - u32 vid_7bit) -{ - u32 i; - - for (i = 0; i < vid_mapping_table->num_entries; i++) { - if (vid_mapping_table->entries[i].vid_7bit == vid_7bit) - return vid_mapping_table->entries[i].vid_2bit; - } - - return vid_mapping_table->entries[vid_mapping_table->num_entries - 1].vid_2bit; -} - static u16 sumo_convert_voltage_index_to_value(struct radeon_device *rdev, u32 vid_2bit) { diff --git a/drivers/gpu/drm/radeon/sumo_dpm.h b/drivers/gpu/drm/radeon/sumo_dpm.h index db1ea32..07dda29 100644 --- a/drivers/gpu/drm/radeon/sumo_dpm.h +++ b/drivers/gpu/drm/radeon/sumo_dpm.h @@ -202,9 +202,6 @@ void sumo_construct_vid_mapping_table(struct radeon_device *rdev, u32 sumo_convert_vid2_to_vid7(struct radeon_device *rdev, struct sumo_vid_mapping_table *vid_mapping_table, u32 vid_2bit); -u32 sumo_convert_vid7_to_vid2(struct radeon_device *rdev, - struct sumo_vid_mapping_table *vid_mapping_table, - u32 vid_7bit); u32 sumo_get_sleep_divider_from_id(u32 id); u32 sumo_get_sleep_divider_id_from_clock(struct radeon_device *rdev, u32 sclk,