Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1579187pxb; Sat, 22 Jan 2022 00:08:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYn9/a/J45SvB9LQa3bXkbwA9bpNOW7szeZeYgp5y2M8DeSrkl2Ncy6vOD8JnpSKsD+KZ/ X-Received: by 2002:a63:864a:: with SMTP id x71mr4630713pgd.194.1642838913276; Sat, 22 Jan 2022 00:08:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642838913; cv=none; d=google.com; s=arc-20160816; b=USGRaoXsHetRaqXAEuWI+QH4jryMhHjXHj8MzirXXPt4lSubOnogb27QVKASDeASIl ple+sh2+eA+WPoWn2MZkd0MgFmwCAk7kxnwI2J69hOJzi3QsMW+pw9g7rWWAQzGLRPa7 t6Luv5nDyB8xweps0rGSisJ8NgHLcCrwF/XhTIcY8pVWrLeGu0lKOReIgVp8T0dri4xV XGVMTK1edZ92ft6NrcnnKKT9x2BkFcDmotlZzu688JyYTJ9/FT/c1lEd5A578Xn2ioKh lQJkhbB+/rnZmaAgU3cpGEMqchOh24QBIcZsB7sH37WP+W5yHxhuWuW/VaHj50eBurXv i1UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DIhTTjelyXp1scIWoIHum/L+8mNJoJDG0RuZ6neQWBQ=; b=QfIsVm0+EAkxj4DW4XQnY9dkNXE4YIxMYGN2Cl+ZRqw45XfCOYxNZkwdAqwtwBk86e 62UchDiuCMsEJAcst18XETTPvYRgtTdJbv+wogNVEGFBpM1o2612UeEXLdIw8mfBiMCu 4c/7UG/cgR9zY7YsPpZzhvByprr8/SCy6N5TVbk2FpiKI/74oNgLkLyPNYpnkfh/1qTR QaQdw5zKb0SiHlrhYQYwQEdTAkZHQ0mSTrXIURdQgb+4hVY5ChamvfgL6IwB4C7qzH+1 6636akJdONb88/bvHLXwXBg6XIoqF7PC3CvzpAX5JBNHqiNNJxE3as6FbMASDoy8RQPg Ep1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=S77186Cn; 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 oj8si2612667pjb.125.2022.01.22.00.08.21; Sat, 22 Jan 2022 00:08:33 -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=S77186Cn; 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 S231689AbiAUUuM (ORCPT + 99 others); Fri, 21 Jan 2022 15:50:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbiAUUuL (ORCPT ); Fri, 21 Jan 2022 15:50:11 -0500 Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F9ADC06173B for ; Fri, 21 Jan 2022 12:50:11 -0800 (PST) Received: by mail-oi1-x234.google.com with SMTP id y14so15250476oia.9 for ; Fri, 21 Jan 2022 12:50:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DIhTTjelyXp1scIWoIHum/L+8mNJoJDG0RuZ6neQWBQ=; b=S77186CnyZMQUQqsNQ9+TmBwqAbtNfrjvvjCAAiIeT6ZZ4bYkyEhMV+NQHdB9vWhZA yV4LN7S8S/VpiOQwOYSkltT0g0NGMKmErw9/x5WhSzwfHsS9uHkQKi0it/i6VauNx1JC 7vbubAvJ2qyO2mxbF8rXjx1swIiD44GaHvqYFUy2jT45AbsU7FMsOCOeBeuD05FaFAa/ w7PcFrdWNUiuk6Nyo0xca6Wy+/Fv4Lqdamoo7NOwBlQzQPRoKdHLcHinvh1T+oK/PTlY 6/fkIX9RqbCw295MMLrjpRTuYxrvMWJM3oBdXsiqQIFxJsRcTqm104GF0eNsFRroov/M DzjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DIhTTjelyXp1scIWoIHum/L+8mNJoJDG0RuZ6neQWBQ=; b=Jm5sWvt8u8hbpVoPTBqmxl9C9p/HyMuam0jN9XSUnTIkbAkL8LP0MZiCzfXfjVGnlY DWfpRSURwewH/bALVtgJXTQrWtkYx7rZoTR55zONNaEWoniYyFfTfrLtYFcObEb6pQrR SVb3x5gvL0dPSOZMWqd1A1JqmGs4nLlzzxiwPbcNzhn8TJ6varF/ZgkjPIlfCfnU6ge2 mBF4nFCNXPdXatG8CjmdHwgdHu7aCphaJWtcuMOIgVvOUPDrBRL03Y8obJNw420RFm1m U1yeq8bR/M3iXLzcidC2Hw5Wk7HbwwN7p5BQUiFaA+yyiyvYkzjRa6BUzsDgrgsSR8Yu M+vg== X-Gm-Message-State: AOAM5323obqKkGboCicFcRIuomb+HiY7Vo1SsqVN3auGdulOXOukNo5O Q/vFrBlSQ4Qayx9eC8X+zof5931KkvjNU3u+npw= X-Received: by 2002:a05:6808:ab2:: with SMTP id r18mr1994063oij.123.1642798210665; Fri, 21 Jan 2022 12:50:10 -0800 (PST) MIME-Version: 1.0 References: <20220121114800.95459-1-jiapeng.chong@linux.alibaba.com> In-Reply-To: <20220121114800.95459-1-jiapeng.chong@linux.alibaba.com> From: Alex Deucher Date: Fri, 21 Jan 2022 15:49:59 -0500 Message-ID: Subject: Re: [PATCH] drm/amd/pm: remove useless if To: Jiapeng Chong Cc: "Quan, Evan" , Dave Airlie , xinhui pan , Abaci Robot , LKML , amd-gfx list , Maling list - DRI developers , "Deucher, Alexander" , Christian Koenig Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Fri, Jan 21, 2022 at 6:48 AM Jiapeng Chong wrote: > > 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 >