From patchwork Sat Mar 24 15:52:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10306093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD964600F6 for ; Sat, 24 Mar 2018 15:53:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE6AB292D9 for ; Sat, 24 Mar 2018 15:53:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C298A292F8; Sat, 24 Mar 2018 15:53:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F764292E5 for ; Sat, 24 Mar 2018 15:53:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752095AbeCXPxE (ORCPT ); Sat, 24 Mar 2018 11:53:04 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:46051 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751891AbeCXPxE (ORCPT ); Sat, 24 Mar 2018 11:53:04 -0400 Received: by mail-qk0-f196.google.com with SMTP id s9so15995202qke.12 for ; Sat, 24 Mar 2018 08:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EKI6a5KAPJFsWuylX70qYQRn0bmjv30rt21vsQ7VmTU=; b=YaBH/Qv4zUtkTSKpfydx+43nTiZ8/6FldpepZ/ZqG3/UzI76EtbbSJYyatku1qGM8h 56WY8P/vjmOlljt4LqFzDHjnVxCHQReEzV93FXdiwSPvZRy0WKxGAq98x0YtL8GBiUma nbu5VYekjvnnSsnWHSAV974i1fbki39EEs+G4kDTfiYWweVFtwL9ZaKq0mCWy06tA50H VqjNJXaXoBXb8+5MW0mgk7yF7uZeWz940l8Nzf6k8OOU2aiCknNCM0iAs1H1TKkIb9xy LqmYxynN6F4u+rwoKfaPEMg536iSxAdTLMzhpMCPBrm6766tsUTVqd/Peapk6o9+6g+i 7khw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EKI6a5KAPJFsWuylX70qYQRn0bmjv30rt21vsQ7VmTU=; b=W+6UgKygviAj+F2ZJugjDm2iTgLuQze+QDrTo3acTnmkn0GUy85Qp82yfFXwOAzD5R IykelqxYtms2NBkmR1884LSD4BOE5/7ioLSUGi20PnQwKq8v43SKTaygvLu4Pa0dW8D4 pwcPqvaIeg9QzTh70a7zmQBUXOQDLuRJvngMX+evh6ZgOlRl1/SAP3ROqLb9jbxP7bjb /PdSDneDT/MHRicdtXFrxK4zIm2jcUfW1M43wCbdSDqJOVU6ji7q4rFjc9yGzaAvv81m lHkL67U8NVXJAfgwZT9BrH3k0n701MNBsPFskjk66P+LZ02e8q6Ait46CgTlFH0OLBb2 f+ZQ== X-Gm-Message-State: AElRT7FxRCKjG3qCkH4LE2VNBpyTTvdE4RsKOI9IlmaWMYED/6dvk6XW SM7vcfZsTAYNAGkZSLgVv/s= X-Google-Smtp-Source: AG47ELsevARbFnz94om1snVyOoLvbXGmAgEBIZvEF1jIw9QWxOBc4hUBLhK9NKVQpMDNGL8LEcTvyQ== X-Received: by 10.55.72.12 with SMTP id v12mr46922417qka.323.1521906783391; Sat, 24 Mar 2018 08:53:03 -0700 (PDT) Received: from localhost.localdomain ([187.180.181.214]) by smtp.gmail.com with ESMTPSA id c5sm8485964qkf.93.2018.03.24.08.53.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 Mar 2018 08:53:02 -0700 (PDT) From: Fabio Estevam To: rjw@rjwysocki.net Cc: viresh.kumar@linaro.org, ego@linux.vnet.ibm.com, linux-pm@vger.kernel.org, Fabio Estevam Subject: [PATCH v2 2/2] cpufreq: powernv: Remove unnecessary devm_kzalloc() cast Date: Sat, 24 Mar 2018 12:52:39 -0300 Message-Id: <1521906759-6856-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521906759-6856-1-git-send-email-festevam@gmail.com> References: <1521906759-6856-1-git-send-email-festevam@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam There is no need to use cast for the returned value from memory allocation functions, so remove the unnecessary cast. Detected via Coccinelle script: scripts/coccinelle/api/alloc/alloc_cast.cocci. Signed-off-by: Fabio Estevam --- Changes since v1: - None drivers/cpufreq/powernv-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 4ddfec9..eabb1c4 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c @@ -327,8 +327,7 @@ static int init_powernv_pstates(void) powernv_freqs[i].frequency = freq * 1000; /* kHz */ powernv_freqs[i].driver_data = id & 0xFF; - revmap_data = (struct pstate_idx_revmap_data *) - kmalloc(sizeof(*revmap_data), GFP_KERNEL); + revmap_data = kmalloc(sizeof(*revmap_data), GFP_KERNEL); if (!revmap_data) return -ENOMEM;