All of lore.kernel.org
 help / color / mirror / Atom feed
From: baomingtong001@208suo.com
To: daniel@ffwll.ch, airlied@gmail.com
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Subject: [PATCH] drm/amdgpu: remove unneeded variable
Date: Wed, 14 Jun 2023 10:26:50 +0800	[thread overview]
Message-ID: <1ccd72cc9fa4b0f1c5acceef0c21d9fb@208suo.com> (raw)
In-Reply-To: <20230614022440.33828-1-luojianhong@cdjrlc.com>

fix the following coccicheck warning:

drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c:1156:5-11: 
Unneeded variable: "result".

Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>
---
  drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c 
b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c
index 21be23ec3c79..36aa7657c66d 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c
@@ -1153,7 +1153,6 @@ int smu7_enable_power_containment(struct pp_hwmgr 
*hwmgr)
      struct phm_ppt_v1_information *table_info =
              (struct phm_ppt_v1_information *)(hwmgr->pptable);
      int smc_result;
-    int result = 0;
      struct phm_cac_tdp_table *cac_table;

      data->power_containment_features = 0;
@@ -1191,7 +1190,7 @@ int smu7_enable_power_containment(struct pp_hwmgr 
*hwmgr)
              }
          }
      }
-    return result;
+    return 0;
  }

  int smu7_disable_power_containment(struct pp_hwmgr *hwmgr)

       reply	other threads:[~2023-06-14  7:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230614022440.33828-1-luojianhong@cdjrlc.com>
2023-06-14  2:26 ` baomingtong001 [this message]
2023-06-15 17:16   ` [PATCH] drm/amdgpu: remove unneeded variable Alex Deucher
2023-06-15 17:16     ` Alex Deucher
2021-11-10  5:53 cgel.zte
2021-11-10  5:53 ` cgel.zte
2021-11-10  5:53 ` cgel.zte
2021-11-10 16:38 ` Alex Deucher
2021-11-10 16:38   ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ccd72cc9fa4b0f1c5acceef0c21d9fb@208suo.com \
    --to=baomingtong001@208suo.com \
    --cc=airlied@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.