From patchwork Wed Jan 17 14:45:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Zhandarovich X-Patchwork-Id: 188852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp955573dye; Wed, 17 Jan 2024 06:46:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IE68qzMeMVfLh+e/RUwL0SMmcLQnDNBP1+1RQwbsbc8cS3kFWJb84+RRiI2+cp0MWEBjIM4 X-Received: by 2002:a17:90a:6e06:b0:28e:823d:7abc with SMTP id b6-20020a17090a6e0600b0028e823d7abcmr1358097pjk.26.1705502791488; Wed, 17 Jan 2024 06:46:31 -0800 (PST) Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i17-20020a17090acf9100b0028bbcd027aasi16447615pju.94.2024.01.17.06.46.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:46:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29091-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-29091-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29091-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E3BECB2522B for ; Wed, 17 Jan 2024 14:45:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 568C620DC5; Wed, 17 Jan 2024 14:45:25 +0000 (UTC) Received: from exchange.fintech.ru (exchange.fintech.ru [195.54.195.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BE4B13FFF for ; Wed, 17 Jan 2024 14:45:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.54.195.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705502723; cv=none; b=J1rzQc3Rp9+SEY9y6WWekVhx/rT5So91gIAzpFSn4TB3SeicNm0yoZ9gIBU1lFDNps2Bn4XBJsP4kXoGB6j0+5juoMCYn/OhqTI4Ywbl9jhjK9sXiVwGuNAhKXF8r2wlI+CxRyUcMerZyZRFz7zvTB28zKjZ7fCNo5Q3JF/MEBQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705502723; c=relaxed/simple; bh=pVtzEC06dXxKFlIy01Eu9vNzdWCG7elETsLk71Q3Otk=; h=Received:Received:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy; b=t9KxAWI5w0H4GxDa5Zjm0fmpGTLqTB7+HN/fXeAzSWYk1EduCQXICEKUAyUXYIzTJHOOWhCWMMU8ve9tQKItXnC2B5PoB0R1o3ch9bzSKZW66Q5yKYlsO7peVC8PzMIkFHG2BPR6qd+Qu7E/9jWALg0XrrS8sD1qpa1/agAi9ik= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru; spf=pass smtp.mailfrom=fintech.ru; arc=none smtp.client-ip=195.54.195.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fintech.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fintech.ru Received: from Ex16-01.fintech.ru (10.0.10.18) by exchange.fintech.ru (195.54.195.169) with Microsoft SMTP Server (TLS) id 14.3.498.0; Wed, 17 Jan 2024 17:45:18 +0300 Received: from localhost (10.0.253.138) by Ex16-01.fintech.ru (10.0.10.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 17 Jan 2024 17:45:18 +0300 From: Nikita Zhandarovich To: Alex Deucher CC: Nikita Zhandarovich , =?utf-8?q?Christian_K?= =?utf-8?q?=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , , , , Subject: [PATCH] drm/radeon/ni_dpm: remove redundant NULL check Date: Wed, 17 Jan 2024 06:45:14 -0800 Message-ID: <20240117144514.11007-1-n.zhandarovich@fintech.ru> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: Ex16-02.fintech.ru (10.0.10.19) To Ex16-01.fintech.ru (10.0.10.18) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788349294821899219 X-GMAIL-MSGID: 1788349294821899219 'leakage_table' will always be successfully initialized as a pointer to '&rdev->pm.dpm.dyn_state.cac_leakage_table'. Remove unnecessary check if only to silence static checkers. Found by Linux Verification Center (linuxtesting.org) with static analysis tool Svace. Fixes: 69e0b57a91ad ("drm/radeon/kms: add dpm support for cayman (v5)") Signed-off-by: Nikita Zhandarovich --- drivers/gpu/drm/radeon/ni_dpm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c index 3e1c1a392fb7..e08559c44a5c 100644 --- a/drivers/gpu/drm/radeon/ni_dpm.c +++ b/drivers/gpu/drm/radeon/ni_dpm.c @@ -3103,9 +3103,6 @@ static int ni_init_simplified_leakage_table(struct radeon_device *rdev, u32 smc_leakage, max_leakage = 0; u32 scaling_factor; - if (!leakage_table) - return -EINVAL; - table_size = leakage_table->count; if (eg_pi->vddc_voltage_table.count != table_size)