From patchwork Sat Mar 24 21:36:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10306431 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 4946460349 for ; Sat, 24 Mar 2018 21:37:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32642292F0 for ; Sat, 24 Mar 2018 21:37:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 273DE29326; Sat, 24 Mar 2018 21:37:08 +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 3408B292F0 for ; Sat, 24 Mar 2018 21:37:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752939AbeCXVhF (ORCPT ); Sat, 24 Mar 2018 17:37:05 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:38963 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752900AbeCXVhE (ORCPT ); Sat, 24 Mar 2018 17:37:04 -0400 Received: by mail-qt0-f193.google.com with SMTP id v11so16054122qtj.6 for ; Sat, 24 Mar 2018 14:37:04 -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=xkLD6cM7lbPuRs5i6KKFEn2+Ucq53lITyWMvyEMjZYM=; b=s68Ge9UtZBS0P4YKxs60mAH6gv0O/yJ0mh/pgpgJVnlqOOk8vKmBq6FpoMVUBdjnXt YK+RDvCGPFLZNku7URf8jaGX4n5rlB/NWx6AJgd9K/qcADypkxegR+k7AEWozgNgEpUf GDNTKSA+rOEWlVZHJ43+elwr2j65jSzadPX0YfEaHsPOzK35jGWOh+Q4jTPidT2ZPitI hjPtOVKUtPFZ7TvZOGldlAhDamsKdYN6Aoi9YqtaHtQOhNUjcp1WVTnO+IZ9ugptOXxc LJ6BL3kS7+GsftlayOmbuSoibiQkpDcn/DbYdPRDsyFnKyqyXEFfX16T93uwAz4ghHVU ZdLA== 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=xkLD6cM7lbPuRs5i6KKFEn2+Ucq53lITyWMvyEMjZYM=; b=WVvW+SkpyAP72sMYxrfJ3F6/I2J85zVoECPiqWyEL5rGjQ/0W+H/QDASas8tTuNCxk zLe0uVyABEt/Zj5vTUYsjPEOnJj4SGQlMPKcmkmB+FEmijiCT4Ykb5cZ95PXOcY7LeIq k1sHN8hn4ZtP6K1W5b7SnEIxvJZ5InodsYU8Ic5u/beZQyhdNKk2sCbv+64+v3CcbdAu 2M49LakuSjCJIvos9IPJ9Rmqvvg1xtAp5WRIb+1IoYcfjATjAgHA4aapYYykJ55LhviT yOQ6Z2fY569eqVAWtzgBRm6rSHSMfYOT4a/7q5GkPR+BvukUnA0qE2wWzRAPY8uT7XFX Tfzg== X-Gm-Message-State: AElRT7GO5+Iv2k265vpo/1aRByV78xb/UA3ZhVy5UnX8IgwWhIAXiBAr hePIDaUKce9sQI9/vZGXwz0= X-Google-Smtp-Source: AG47ELsT66MqBfeC8U4NaqZT0GT83LHDcZmX2OH3lXvD1fNzxW7QCp5zQfV5D/dTWtcAPRc7ROA29g== X-Received: by 10.237.43.98 with SMTP id p89mr48564044qtd.2.1521927424240; Sat, 24 Mar 2018 14:37:04 -0700 (PDT) Received: from localhost.localdomain ([187.180.181.214]) by smtp.gmail.com with ESMTPSA id 25sm6982441qtv.28.2018.03.24.14.37.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 Mar 2018 14:37:03 -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 v3 2/2] cpufreq: powernv: Remove unnecessary devm_kzalloc() cast Date: Sat, 24 Mar 2018 18:36:52 -0300 Message-Id: <1521927412-14910-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521927412-14910-1-git-send-email-festevam@gmail.com> References: <1521927412-14910-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 v2: - None 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;