Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751647AbdG0O0W (ORCPT ); Thu, 27 Jul 2017 10:26:22 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:38834 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751577AbdG0O0U (ORCPT ); Thu, 27 Jul 2017 10:26:20 -0400 MIME-Version: 1.0 X-Originating-IP: [82.81.71.2] In-Reply-To: <1500375526-12973-1-git-send-email-sunil.m@techveda.org> References: <20170717123306.GF24503@kroah.com> <1500375526-12973-1-git-send-email-sunil.m@techveda.org> From: Gilad Ben-Yossef Date: Thu, 27 Jul 2017 17:26:18 +0300 Message-ID: Subject: Re: [PATCH v2 1/3] staging: ccree: Replace kzalloc with devm_kzalloc To: sunil.m@techveda.org Cc: Greg Kroah-Hartman , linux-crypto@vger.kernel.org, driverdev-devel@linuxdriverproject.org, devel@driverdev.osuosl.org, Linux kernel mailing list , karthik@techveda.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 40 On Tue, Jul 18, 2017 at 1:58 PM, wrote: > From: Suniel Mahesh > > It is recommended to use managed function devm_kzalloc, which > simplifies driver cleanup paths and driver code. > This patch does the following: > (a) replace kzalloc with devm_kzalloc. > (b) drop kfree(), because memory allocated with devm_kzalloc() is > automatically freed on driver detach, otherwise it leads to a double > free. > (c) remove unnecessary blank lines. > > Signed-off-by: Suniel Mahesh > --- > Changes for v2: > > - Changes done as suggested by Greg-KH. > - Rebased on top of next-20170718. > --- > Note: > > - Patch was tested and built(ARCH=arm) on next-20170718. > No build issues reported, however it was not tested on > real hardware. I verified the patch set on CrytoCell HW and it's fine. Unfortunately, my coding style fixes patch set made two of these to fail to apply. Following up is a rebased patch. There are no changes except resolving conflicts. -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru