Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp944440ybg; Wed, 29 Jul 2020 01:35:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf8rU+EWmT4i7o4d+tYSyMBkLEo1ZQTQWCczvI5a0BaTqOsuwPwfJAnsVaFtlRmcbtG0TD X-Received: by 2002:a17:906:e0d:: with SMTP id l13mr15603028eji.434.1596011744210; Wed, 29 Jul 2020 01:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596011744; cv=none; d=google.com; s=arc-20160816; b=si3dotO9AS97rZbziiizNTkLs3ebN20M7QVRdcimYYeLKCgm6cVeoZGQCPR7IM5V7A kIFB6N0feoHLppg/6D5hab8YZvFNF+kilD5kzZq2MwEwU9p0QtKMC6g5V5P4zGmBwAfm T/cdVge5E6vQfkZrmTznzUvfsENTkKj024mJdRpiuHbRwo0wEXXrbfIJgCBw+PMSA16p Wxq4KYMYw0cZuGWfjKXDYM6u7tQj1RvoS6ubBaKJN7WwIrNX5hH2IZzbjY3wvq2M7auT rKDsCTZ3Gw+hpv/eBkoEQMlaEN5TyUUWxNbPOsupIZfwXE3PR32gxdCZW5dnXPGr4XYu YBCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=0yVvZU5nnrr3TJShnDvUZ3Ok25u5UZw4SoFZHjJzq6M=; b=oub12zh2U23hALN7aZ/76+ySexxxJhyxPtYode56JAgWUmo3V+6pWPwMAEV/7ER7jr 3835fnrCdFM/GzEmKnRZP3qMfgQelgp/BPfGpNa7cmtOSyKBIyYnCC4Wz44AM6BvsNgj 82iRfxmoh8yzcGzTMfdnrmIYIsaaZ5dgcUETxIILz4JV4p2sORIOQ7mUcnycZnUBpmGX DGmJ7XarMcx0xRSzBGzoGH9ST/5T1fXvtY1ClvQe4I9skWq+3VOS/ptZ60NBthXKfWnt ASMXWYhuXfkGB4VVURbgdqtdSumIcS9KLxWk4/Adnl7hHJVD0NFdCOsAUVy6SIqTxqMQ Pq3A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a1si772143edy.514.2020.07.29.01.35.22; Wed, 29 Jul 2020 01:35:44 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727044AbgG2Icp (ORCPT + 99 others); Wed, 29 Jul 2020 04:32:45 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:8849 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726707AbgG2Ico (ORCPT ); Wed, 29 Jul 2020 04:32:44 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 01CD633EA6E208CE3739; Wed, 29 Jul 2020 16:32:43 +0800 (CST) Received: from huawei.com (10.175.104.57) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Wed, 29 Jul 2020 16:32:37 +0800 From: Li Heng To: , CC: , , Subject: [PATCH -next] drm/amd/powerplay: Remove unneeded cast from memory allocation Date: Wed, 29 Jul 2020 16:34:01 +0800 Message-ID: <1596011641-9136-1-git-send-email-liheng40@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.57] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c:893:37-46: WARNING: casting value returned by memory allocation function to (PPTable_t *) is useless. Signed-off-by: Li Heng --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c index 7a7f15d..f56a3cb 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c @@ -890,7 +890,7 @@ static int init_powerplay_table_information( power_saving_clock_count); } - pptable_information->smc_pptable = (PPTable_t *)kmalloc(sizeof(PPTable_t), GFP_KERNEL); + pptable_information->smc_pptable = kmalloc(sizeof(PPTable_t), GFP_KERNEL); if (pptable_information->smc_pptable == NULL) return -ENOMEM; -- 2.7.4