Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp94223pxh; Tue, 9 Nov 2021 21:55:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmpAi9ZwpRxLQwcfMTe2WUU/28kI3Nipl8ex/VXyo8McPL19vPbPXY/4LK4t61bUu2wpL8 X-Received: by 2002:a50:e609:: with SMTP id y9mr18484801edm.68.1636523739496; Tue, 09 Nov 2021 21:55:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636523739; cv=none; d=google.com; s=arc-20160816; b=x2WawEBKfepZxUWfvvqitU3dzp+tStoLbLMTCtLVSOSLAgWzCdfHuxMorqQ0DLpPRt tJDTZp4qEjqaVWOp7iluSINdOUKYwquOotRTPFQUwyh33doWl3SI1+nkxpgeBU6ROi4M RRlBoI3CKB+r9h11XYi/oL3WFP8CJ9kw6pQZ9aTduTkuVTABljtZ9keQrzGGSU6BcKkz NmmWatefCLjssr4BWet2sHtcA9DomDELQCEzEn8UsRJ2iJPT0l2Xl0O5JaOI7kjbJDq3 Ol6lYF0KyWlc3kt9ANdgEbGlji3zbcAsLuUv8oVlf0hzYJg0m4s1X5TwXi3TBF5T9bLG Wd+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=LyGojFN74Psdib99ofgTmmS3ryfTtC+JFhiog+TgrPk=; b=0i2OWwI++gutxdkw5lHG6LIUCzrMERQsaaGN2rSuN+m9NGSj0JqsuezQ4eFlpgBsjm WR/K2Z8osFadf0+l97KuGRCriLIkAANevhHdxEcFNRD3AgkhCHDW/Et9n8RgxAi7NK9F ffh9qongaIHoZu4U6FaTUZhgnjQWEu/M5BU8qqWB/mJy6aIHpIGrP31Q8ikoJiQxko0K rcXscKZXuaeppeV8vZMjtmIacAGLHIwuboLQdgc+dH6xU4Zf9HDae6u5WymUsFp8RHhp UgUKhZElX1BKcD+GNVoV56w2nsliz199BPoZty2gnbYsth4RzBV7CxiQ08HOIZ24cgie cJHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ThngYRDk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg39si43361926ejc.709.2021.11.09.21.55.15; Tue, 09 Nov 2021 21:55:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ThngYRDk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229520AbhKJFz6 (ORCPT + 99 others); Wed, 10 Nov 2021 00:55:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbhKJFz6 (ORCPT ); Wed, 10 Nov 2021 00:55:58 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10A26C061764 for ; Tue, 9 Nov 2021 21:53:11 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id g19so1652150pfb.8 for ; Tue, 09 Nov 2021 21:53:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LyGojFN74Psdib99ofgTmmS3ryfTtC+JFhiog+TgrPk=; b=ThngYRDkGQt/7B2VOWG8P+A2jlEI7zl51h39SDQsT6VW+yMcRYnbiL497063uSki7E IcMFmXS1IyaMi2Pf0Twv0tjqsSkBoBz1eVnb41hgNTWJCpwSDR9hDeijlQMXC2PHqTb1 vLtnCJecNBC7EWKLjBhvTo1Z8QQAhSOLHUTvZF73cQllzW2eSF6LG8qXPVv1nyqb1wOj XtjR8KzbTO5KaK2deiYnSVbmvvhs2TsTAdV9vlIzRolvHUqbhY6+3FrNjBhzTUghg0Te 90nQp+Cqkwb4URA+nh1N6Gl2YdKOO/z84iiZ0QhNRVif6cBA5MkrGPxtYuUcqvgF5eht aDug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LyGojFN74Psdib99ofgTmmS3ryfTtC+JFhiog+TgrPk=; b=4UQxjlfbqlFRn8IW6CXJdtClQdsMf1v2EF2Y9i/h4BsuGeg+HkL8G+rSNjxXD7xNzd yCKInUg/CeGj88s4ofx50xb67fPhs420eJtgofQ7WXfUKkJlMEkhD0KcU1e8lWGuw54q uYowtrDfywLyPtUfXHd6UZK6gb2pbDbKr+RWuiIwZ8U9xywsmIJDAD+oQ9T+KfY3rXAE H+81jHHZH6Y90c3IM2VA9WtHYWq+bFQMI7Zkw1qo4FE7eZqJ/et/FqXswVfY2oGoV/3y LTjnoA9nMKzZyWgRJ1dS9+/eGtR4OoMQy441oxgxXDERYbah8tPEXnoX0s/k8OXgCmM6 C+gA== X-Gm-Message-State: AOAM531PphcdwrViA2t8gjHnwur7B17VhZRlnrrNPpvkrprP0XHx5zEM /Rui82Gt4B9JwsvTJrBntyk= X-Received: by 2002:a63:f644:: with SMTP id u4mr10295033pgj.300.1636523590625; Tue, 09 Nov 2021 21:53:10 -0800 (PST) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id e15sm20604742pfc.134.2021.11.09.21.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Nov 2021 21:53:10 -0800 (PST) From: cgel.zte@gmail.com X-Google-Original-From: ran.jianping@zte.com.cn To: evan.quan@amd.com Cc: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, lijo.lazar@amd.com, luben.tuikov@amd.com, kenneth.feng@amd.com, andrey.grodzovsky@amd.com, Jack.Gui@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, ran jianping , Zeal Robot Subject: [PATCH] drm/amdgpu: remove unneeded variable Date: Wed, 10 Nov 2021 05:53:03 +0000 Message-Id: <20211110055303.136782-1-ran.jianping@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: ran jianping Fix the following coccicheck review: ./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:1174:14-18 :Unneeded variable Remove unneeded variable used to store return value. Reported-by: Zeal Robot Signed-off-by: ran jianping --- drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c index a4108025fe29..b0bb389185d5 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -1171,7 +1171,7 @@ static int sienna_cichlid_force_clk_levels(struct smu_context *smu, enum smu_clk_type clk_type, uint32_t mask) { struct amdgpu_device *adev = smu->adev; - int ret = 0, size = 0; + int ret = 0; uint32_t soft_min_level = 0, soft_max_level = 0, min_freq = 0, max_freq = 0; soft_min_level = mask ? (ffs(mask) - 1) : 0; @@ -1216,7 +1216,7 @@ static int sienna_cichlid_force_clk_levels(struct smu_context *smu, if ((clk_type == SMU_GFXCLK) || (clk_type == SMU_SCLK)) amdgpu_gfx_off_ctrl(adev, true); - return size; + return 0; } static int sienna_cichlid_populate_umd_state_clk(struct smu_context *smu) -- 2.25.1