Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1458902ybg; Wed, 29 Jul 2020 15:02:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynrxl3ze3r5GHV4KozbYUFat+zDh4GfJGpvVl/hN9DJFLTRUYiK0b/9/Lu8G/C5aZhRiYW X-Received: by 2002:a17:906:2b50:: with SMTP id b16mr433451ejg.410.1596060156381; Wed, 29 Jul 2020 15:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596060155; cv=none; d=google.com; s=arc-20160816; b=fbo8RmdijLFNw1byX9JrA60iazteFxMbgj9mrMtqJq72HaCmTp1U5r2K1DQOfjBf7K VSWzAVWvsMhP1SHqPa0vS0d8Iy+hVFhtLVLTUA8/81lqv57mQoi1rs87D1YT7e/dBfhb 4MnLPXmGAlu+FrwjTlUw+WeY2rySSqDSPCHmILn05K4fFdLBH/FcJmeT6b2WBU5Pqkn4 MziqzuhliMi0m7c74rBTeHK4G5WQ0IEXy4WGsVUz+/2qEivDva25wfKvjFg20Br8yx+o ZnymrfsBGLFH5oVJT+vflomUPOh5AUI/ZxJoM0lZcvy/5ds6XKVq7i86aH1M7ScbrWTl b9Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=qI9wSg2asXOQShlsyDaWSUNkhHbRsckiehfdXNqAvjs=; b=T42SbZnGXJKqAb7yi4/fMDRZwdb7cCRj9IkoY25prWDAn4hcmXIGzfa4PuqTlcAqaB gMVepXIh0lI8m0hJOkXJ3dDgEi7creA82HRMzyPvqnqT49IF3isIGf1h2APWFwqkiG9i dZxk9Vp3vwVICLEr9Id5aqM2RTFjnRc3BucTOtulAzL9D7rJdgZYkGUTef52e/fQrx++ o4TsNDQyXfZ/bV1+qRuyFxF1bfmSfts65rNGe9dKBX5wxMH2RkkxeOB2lw8Je8qjEwt4 +AxqXysivqvftSlTdkbL3TLL369LLvBUH5o/+Hf7R3wRPfDORoZEREc+vlZ2CZhmV1g9 mhWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s40JiM4P; 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 n28si939344eda.478.2020.07.29.15.02.12; Wed, 29 Jul 2020 15:02:35 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=s40JiM4P; 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 S1727082AbgG2WAQ (ORCPT + 99 others); Wed, 29 Jul 2020 18:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726365AbgG2WAQ (ORCPT ); Wed, 29 Jul 2020 18:00:16 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48427C061794 for ; Wed, 29 Jul 2020 15:00:16 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id 3so4411701wmi.1 for ; Wed, 29 Jul 2020 15:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qI9wSg2asXOQShlsyDaWSUNkhHbRsckiehfdXNqAvjs=; b=s40JiM4PNMIQ3UMvDc9YaIViGY5tOJcYGc+8Xwzxz90Bi+5k5TEsMXRH0TIk+FoihL SLwtXNJmL2FxIVPXFnmFBxhaBDb78/Ojaavp7t5t5viVYOy6rf6FiAXFB4626ZgqT0+J QlxSky5YFXC+fkgVkNDMuNjFTGM7xskQfoBT2mj288QBz5a5aDXPmNkt1iaoAZjxvoXW ajrKTzDhDRsVv2KG+oAhZcbupRk54a5wtz4DmOhj6GdgOxJjVJfnDObWcYZecYrkFKdm SMBjVzwBmrPq8b4n9LEyNnmAuYkjTjsbNKn92cO4ps6HU1OdDTI0ujJPTNvLi4BqWX1C /wjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qI9wSg2asXOQShlsyDaWSUNkhHbRsckiehfdXNqAvjs=; b=sHCdcaf2tMm8TNUk8ZTmSarlB0s3ITUzCOoGOhIpmdPa7mJffb7DqsuCY0mM5ekvUe S6dTgx4ik4/RW1v7yyQPIJMWKVljJclkDeHU2Nw6AKjTLdXLjVWJkkb/i9jvRezTBA7n uZYtOU17zLn0Pfn+BrXlZpNBoLff0r3/32WVS2CuIIL+yxzFAEy1w0PhLd9FQ1YRa9V9 K/10pEdVXONPm6SSh4fVuxvrF32GC6V6cEx/DOOI/DLIPCcZECmXKtw6OZaq1P19eYp6 KOmKPaBiQ6dt6pg16RWXH7A5xwkCP8wziC7fWeDRmbE/T5mu8DUvEq9wAMzBwpplTEgW DQSw== X-Gm-Message-State: AOAM532pIiZ7c1HpRMhL1S+BqunKMqZ0Ee0mMfNFlKV8kYnOaKvA2Qjb d/D59CVGQdJqQoMjpKvsVKurWQ00f5TgC+WV8Kk= X-Received: by 2002:a1c:2:: with SMTP id 2mr10810523wma.79.1596060014118; Wed, 29 Jul 2020 15:00:14 -0700 (PDT) MIME-Version: 1.0 References: <1596011641-9136-1-git-send-email-liheng40@huawei.com> In-Reply-To: <1596011641-9136-1-git-send-email-liheng40@huawei.com> From: Alex Deucher Date: Wed, 29 Jul 2020 18:00:03 -0400 Message-ID: Subject: Re: [PATCH -next] drm/amd/powerplay: Remove unneeded cast from memory allocation To: Li Heng Cc: Dave Airlie , Daniel Vetter , Maling list - DRI developers , amd-gfx list , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Wed, Jul 29, 2020 at 9:11 AM Li Heng wrote: > > 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 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx