Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752430AbbKKKQI (ORCPT ); Wed, 11 Nov 2015 05:16:08 -0500 Received: from mail-lb0-f195.google.com ([209.85.217.195]:33396 "EHLO mail-lb0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbbKKKQG (ORCPT ); Wed, 11 Nov 2015 05:16:06 -0500 Subject: Re: [PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc To: Dan Carpenter References: <20151108071108.GA1536@alpha.sfu-kras.ru> <20151111094314.GF18797@mwanda> Cc: devel@driverdev.osuosl.org, Anish Bhatt , Vaishali Thakkar , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Nicholas Mc Guire , Joe Perches , Sudip Mukherjee , Alexey Khoroshilov From: Ivan Safonov Message-ID: <564315CE.3090902@gmail.com> Date: Wed, 11 Nov 2015 17:17:50 +0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151111094314.GF18797@mwanda> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 805 Lines: 19 On 11/11/2015 04:43 PM, Dan Carpenter wrote: > On Sun, Nov 08, 2015 at 02:11:08PM +0700, Ivan Safonov wrote: >> _rtl88e_fill_dummy fills the array elemets with zeros if necessary. >> > _rtl88e_fill_dummy() fills the last sizeof(u32) or whatever so the code > is aligned but it doesn't fill up to the end of FW_8188E_SIZE. Why do > we even allocate that much memory. Why don't we just allocate: > > pfwdata = kmalloc(round_up(fwsize, sizeof(u32)), GFP_KERNEL); > > regards, > dan carpenter Yes, it will save about 2 KB. I will correct it in the next patch. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/