Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148AbdCMLwX (ORCPT ); Mon, 13 Mar 2017 07:52:23 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:29699 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751058AbdCMLwT (ORCPT ); Mon, 13 Mar 2017 07:52:19 -0400 Date: Mon, 13 Mar 2017 14:51:29 +0300 From: Dan Carpenter To: Daeseok Youn Cc: mchehab@kernel.org, devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, alan@linux.intel.com, linux-media@vger.kernel.org Subject: Re: [PATCH] staging: atomisp: use k{v}zalloc instead of k{v}alloc and memset Message-ID: <20170313115129.GC4136@mwanda> References: <20170313105421.GA32342@SEL-JYOUN-D1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170313105421.GA32342@SEL-JYOUN-D1> 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: 507 Lines: 14 On Mon, Mar 13, 2017 at 07:54:21PM +0900, Daeseok Youn wrote: > If the atomisp_kernel_zalloc() has "true" as a second parameter, it > tries to allocate zeroing memory from kmalloc(vmalloc) and memset. > But using kzalloc is rather than kmalloc followed by memset with 0. > (vzalloc is for same reason with kzalloc) > > And also atomisp_kernel_malloc() can be used with > atomisp_kernel_zalloc(, false); > We should just change all the callers to kvmalloc() and kvzmalloc(). regards, dan carpenter