Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752368AbbKKJnh (ORCPT ); Wed, 11 Nov 2015 04:43:37 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:28183 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752216AbbKKJne (ORCPT ); Wed, 11 Nov 2015 04:43:34 -0500 Date: Wed, 11 Nov 2015 12:43:14 +0300 From: Dan Carpenter To: Ivan Safonov 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 Subject: Re: [PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc Message-ID: <20151111094314.GF18797@mwanda> References: <20151108071108.GA1536@alpha.sfu-kras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151108071108.GA1536@alpha.sfu-kras.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 677 Lines: 18 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 -- 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/