From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754863AbcBHCzk (ORCPT ); Sun, 7 Feb 2016 21:55:40 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:52722 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754917AbcBHCzj (ORCPT ); Sun, 7 Feb 2016 21:55:39 -0500 Date: Sun, 7 Feb 2016 18:55:38 -0800 From: Greg Kroah-Hartman To: Ivan Safonov Cc: Dan Carpenter , devel@driverdev.osuosl.org, Anish Bhatt , Vaishali Thakkar , linux-kernel@vger.kernel.org, Nicholas Mc Guire , Joe Perches , Sudip Mukherjee , Alexey Khoroshilov Subject: Re: [PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc Message-ID: <20160208025538.GA12998@kroah.com> References: <20151108071108.GA1536@alpha.sfu-kras.ru> <20151111094314.GF18797@mwanda> <564315CE.3090902@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <564315CE.3090902@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 11, 2015 at 05:17:50PM +0700, Ivan Safonov wrote: > 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. Please send a v3 series with this fixed up. Also, please properly thread your patches so they all show up grouped together. thanks, greg k-h