linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/amdgpu: remove set but not used variables 'ret'
@ 2019-06-22  3:03 Mao Wenan
  2019-06-22  6:02 ` Julia Lawall
  2019-06-22 10:43 ` Dan Carpenter
  0 siblings, 2 replies; 22+ messages in thread
From: Mao Wenan @ 2019-06-22  3:03 UTC (permalink / raw)
  To: airlied, daniel, alexander.deucher, christian.koenig, David1.Zhou
  Cc: kernel-janitors, amd-gfx, linux-kernel, Mao Wenan

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c: In function ‘amdgpu_pmu_init’:
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:249:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
  int ret = 0;
      ^

It is never used since introduction in 9c7c85f7ea1f ("drm/amdgpu: add pmu counters")

Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
index 0e6dba9..0bf4dd9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
@@ -246,12 +246,10 @@ static int init_pmu_by_type(struct amdgpu_device *adev,
 /* init amdgpu_pmu */
 int amdgpu_pmu_init(struct amdgpu_device *adev)
 {
-	int ret = 0;
-
 	switch (adev->asic_type) {
 	case CHIP_VEGA20:
 		/* init df */
-		ret = init_pmu_by_type(adev, df_v3_6_attr_groups,
+		init_pmu_by_type(adev, df_v3_6_attr_groups,
 				       "DF", "amdgpu_df", PERF_TYPE_AMDGPU_DF,
 				       DF_V3_6_MAX_COUNTERS);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-07-10  7:31 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-22  3:03 [PATCH -next] drm/amdgpu: remove set but not used variables 'ret' Mao Wenan
2019-06-22  6:02 ` Julia Lawall
2019-06-22  7:20   ` maowenan
2019-06-22 10:43 ` Dan Carpenter
2019-06-22 13:05   ` [PATCH -next v2] drm/amdgpu: return 'ret' in amdgpu_pmu_init Mao Wenan
2019-06-22 13:06     ` Julia Lawall
2019-06-22 13:56       ` maowenan
2019-06-22 14:00         ` Julia Lawall
2019-06-24  3:16           ` maowenan
2019-06-22 18:13     ` Joe Perches
2019-06-24  3:41       ` maowenan
2019-06-24  3:46         ` Joe Perches
2019-06-23  6:00   ` [PATCH -next] drm/amdgpu: remove set but not used variables 'ret' Dan Carpenter
2019-06-23  6:10     ` Julia Lawall
2019-06-24  3:45       ` [PATCH -next v3] drm/amdgpu: return 'ret' immediately if failed in amdgpu_pmu_init Mao Wenan
2019-06-24  8:39         ` Dan Carpenter
2019-06-24  9:29           ` maowenan
2019-06-24  9:48             ` Dan Carpenter
2019-06-24 11:23               ` [PATCH -next v4] " Mao Wenan
2019-06-24 17:42                 ` Kim, Jonathan
2019-06-26 11:35                   ` maowenan
2019-07-10  7:31                     ` maowenan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).