Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1373916pxb; Fri, 21 Jan 2022 16:54:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJz40SBSVM10rdsGDXmF/cUx4Okk4j0WShiay+eTzGPxrezCYvCfttnMU84EoGEypbV3wlE3 X-Received: by 2002:a17:902:8a82:b0:149:db00:dbab with SMTP id p2-20020a1709028a8200b00149db00dbabmr6058409plo.140.1642812862745; Fri, 21 Jan 2022 16:54:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642812862; cv=none; d=google.com; s=arc-20160816; b=bnhPmsFFLTCTk2aNcEi2vA7gIvx42vURR44UgQQ1tZqixErLWrlq53njoCvLX700wf OA+PtztIUZn+9n+XM72yPQAjfwMdJTCMUK/TP8KQAOEKaKUoBWP+GBHL24ohv6V+jUnZ XdVLSi8mtpOKYCzo1AyeU85IoDDCsgOC5uXoYwwhbpglNDkutD8ymECtGBp1m7WDg/kO r1/GkhGvSZPXWZJRaAjWuEk84coR+/KwUUIysgZOmLpzdI8FdPFhelSSMRIfgvYSq/IG A7giWZno9skyIFhtbYKKjmK4ztq7OIaCs/5JArhWZ916BcISmMIyed51y34VoNg9dU+U 4c1w== 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; bh=PbzYZ/BazE4KFMmgVQ3TDo7cpjkOD7VoF58yUlld1qA=; b=jickUhCtCKBqDogw+O3IPf6q5kAYSLhnqRFDB6gn2qIaash7TiycWa10soaQTH38LZ LbgwQq4ni4ZMA5ADhZOT4IQQIPX12hvdx96QxIlb73P/QxSdtL/mai+Mrq88HYCmP5Wt 5AQmJfBrf99z/m6lPlnFxzJjJ9lrJk1xynhZNITT49rB4cqiSsK6QxkLZyel8GGcvLs7 fdbEN6CeUDv5WTy3QQQZbPLLbqpJmkC+erj0Qyo/5AMTM+KX+uE8Q5TqCa1yUVXj+aEf mdQq0aUjVMu87tbDrhZtaOC8xU7nBwfU/nC/V0GkSBmNUBMXvs0cld93+2N+dXak3YM8 yM/g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc8si7017585plb.587.2022.01.21.16.54.11; Fri, 21 Jan 2022 16:54:22 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380172AbiAULsO (ORCPT + 99 others); Fri, 21 Jan 2022 06:48:14 -0500 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:44820 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232797AbiAULsJ (ORCPT ); Fri, 21 Jan 2022 06:48:09 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R671e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0V2RfKTK_1642765682; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0V2RfKTK_1642765682) by smtp.aliyun-inc.com(127.0.0.1); Fri, 21 Jan 2022 19:48:07 +0800 From: Jiapeng Chong To: evan.quan@amd.com Cc: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] drm/amd/pm: remove useless if Date: Fri, 21 Jan 2022 19:48:00 +0800 Message-Id: <20220121114800.95459-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clean the following coccicheck warning: ./drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c:7035:2-4: WARNING: possible condition with no effect (if == else). Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c index 23ff0d812e4b..7427c50409d4 100644 --- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c @@ -7032,10 +7032,7 @@ static int si_power_control_set_level(struct amdgpu_device *adev) ret = si_resume_smc(adev); if (ret) return ret; - ret = si_set_sw_state(adev); - if (ret) - return ret; - return 0; + return si_set_sw_state(adev); } static void si_set_vce_clock(struct amdgpu_device *adev, -- 2.20.1.7.g153144c