Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1439165pxa; Thu, 20 Aug 2020 11:16:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsky2N+IPAQjASZYXIrs0MQbqqYceOlDGquUVg+/0zjFYGv1BRI8ceP1no59JwlUHGOR+4 X-Received: by 2002:a17:906:37c1:: with SMTP id o1mr3094952ejc.279.1597947415177; Thu, 20 Aug 2020 11:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597947415; cv=none; d=google.com; s=arc-20160816; b=otsY131iO1wC3cCjjt88Hh+gXydiejBWRas3zqk0Pu6KW0/kBMLjSvZffGQuSzET3r QKlDDrK9xk8PSEmCjv8Is4chgYk0zI0UwaYtJJqw/6O9X1x+TQICbwf+3rDWcxloOGNh qn4z5p6rfmQJLM4BUAlx3wXbUOuOrg8r/pE05H+NibHGBQTYdy/2qFRCsNGGJ0TpZTQX IMBNGtwAcLMy0ePGVx7Jd7FsYPiLj7GnnA/C/Zg4PsIBu3o972V6KadBUg2m2+mSJdJO WyLd8laI5ukB4DJLKcPUmmDTaPudr6Dn7p5d+38KTDSpETySJKtXNJXcjDeTgGKu+FX1 WOvQ== 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=5CM6owDx/tmtrYOZ28Ao2iCnLC9HCs4xM2EFVOquoNs=; b=LAZ0LzTdDk8Zuvx6hrzJUEafG+z0ZeATnUvhbELY1kDGT/vizyO5EMhR2cAEi23es5 IfOYHRyhHFtR6JYo5MVAGf/2Hu5DvYc0i9nT3oGJDbcVezx+D2ebvF0XLPPTzLVRVQmj y33h7Jv8Kf8zy7Aj0fF+R1FYna3SJTe/roi+ihU1oDCGwa5ppLqS6ZGIvLnliLCR7TLX CgxWRTVPie/S8o6ttSFqT+bEqqNovUvEr57q0GEBYi/+ULUSHIU3+tj9ZhBLpPuU1mdS fQrXXkeO3YfLy4BVmP12FFpMvRsXnBCu6kdWlLNmCjIlub3MF3g2uf+nP4aK1UFM2CQ9 FTEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hsbFOKk4; 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 a92si1727130edf.509.2020.08.20.11.16.30; Thu, 20 Aug 2020 11:16:55 -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=hsbFOKk4; 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 S1727030AbgHTSOo (ORCPT + 99 others); Thu, 20 Aug 2020 14:14:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726819AbgHTSOm (ORCPT ); Thu, 20 Aug 2020 14:14:42 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6E0CC061385 for ; Thu, 20 Aug 2020 11:14:41 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id y3so2995974wrl.4 for ; Thu, 20 Aug 2020 11:14:41 -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=5CM6owDx/tmtrYOZ28Ao2iCnLC9HCs4xM2EFVOquoNs=; b=hsbFOKk4Ojo8tb5Z9o0XzLjGhSjFkb8Ca+4pH8WZu7IiC65gdRhgjsegBsNKrWaBQ1 8uZ3xpPOaN0KmHAizi5xPWAiXBuY3l4eDnUEwg0iC06FrWTlnbR7u47J7lR0tfna1ENW ovE9cZDkHQYIsnLTyZUJ2K3/T3r5/lv0s8tsHaMgZinlWLjos3jZzD0uNg/dhHeGk4Hx mUgdD/Di8ckbDTFVp1YYtWC5rqsXAczojlgD5bWr0c7KNWJ6HD/vKxsOVOxz+/fDl71C Pq8KtjGij8g+uJ5Qtp9m2BXaQS9uSYWnadE6cghBkgm3kiKQ/cfgYBJ+nsq046Rqknx2 nViw== 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=5CM6owDx/tmtrYOZ28Ao2iCnLC9HCs4xM2EFVOquoNs=; b=Sz0yKxVxY0ggp0gzyNhcZYxP6H0Dt2xSBRCO7iqJIJAqjGLIP/esG9WnH9Y3NCb1dT +q3XhxFp/ZX1zh0DWAsev9HpXx2nRpa2i7EcyblTWOmhZs6QGMzcizS1sfPHe94OJy2O uoSADPA5FvJVxecJsJzRwcdQscLMGcArSdfM7E1jtJ3CYXGzIYIAcD9/zUrLligDAi8W smRlN1bPWQ3QN0LWWlds6vPaLW0ewNN3Twh7VrYit/h/ix7EteDexxDasjBb1nofKSEw lEmhr8NFZOg6mCE9Z+FTWtHFtOsp6KMm9RO38FEpqwHuojzt5fsrDRzyXa1jVkabQM3e 7MNg== X-Gm-Message-State: AOAM532V/+mOK9JNry3t9hKkt49PlebYj3nh2vf+XR/l2TEzj6E0teoS Bwjx7y/KH92meFx04C7s484/nXgD445/tmlKkaQ= X-Received: by 2002:a5d:494b:: with SMTP id r11mr4563077wrs.419.1597947280424; Thu, 20 Aug 2020 11:14:40 -0700 (PDT) MIME-Version: 1.0 References: <20200820175809.841479-1-alex.dewar90@gmail.com> In-Reply-To: <20200820175809.841479-1-alex.dewar90@gmail.com> From: Alex Deucher Date: Thu, 20 Aug 2020 14:14:29 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/pm: Remove unnecessary cast To: Alex Dewar Cc: Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Daniel Vetter , Evan Quan , Nirmoy Das , amd-gfx list , Maling list - DRI developers , 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 Thu, Aug 20, 2020 at 1:59 PM Alex Dewar wrote: > > In init_powerplay_table_information() the value returned from kmalloc() > is cast unnecessarily. Remove cast. > > Issue identified with Coccinelle. > > Signed-off-by: Alex Dewar > --- > drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c > index 195d8539fbb4..740e2fc7a034 100644 > --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c > +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c > @@ -252,7 +252,7 @@ static int init_powerplay_table_information( > phm_copy_clock_limits_array(hwmgr, &pptable_information->power_saving_clock_max, powerplay_table->PowerSavingClockMax, ATOM_VEGA12_PPCLOCK_COUNT); > phm_copy_clock_limits_array(hwmgr, &pptable_information->power_saving_clock_min, powerplay_table->PowerSavingClockMin, ATOM_VEGA12_PPCLOCK_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.28.0 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx