Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754341AbdCMRy6 (ORCPT ); Mon, 13 Mar 2017 13:54:58 -0400 Received: from mga14.intel.com ([192.55.52.115]:54215 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753711AbdCMRyu (ORCPT ); Mon, 13 Mar 2017 13:54:50 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,160,1486454400"; d="scan'208";a="59741383" Message-ID: <1489427686.24765.9.camel@linux.intel.com> Subject: Re: [PATCH] staging: atomisp: use k{v}zalloc instead of k{v}alloc and memset From: Alan Cox To: Daeseok Youn , mchehab@kernel.org Cc: gregkh@linuxfoundation.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Date: Mon, 13 Mar 2017 17:54:46 +0000 In-Reply-To: <20170313105421.GA32342@SEL-JYOUN-D1> References: <20170313105421.GA32342@SEL-JYOUN-D1> Organization: Intel Corporation Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 545 Lines: 12 On Mon, 2017-03-13 at 19:54 +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) This is true but please don't apply this. There are about five other layers of indirection for memory allocators that want removing first so that the driver just uses the correct kmalloc/kzalloc/kv* functions in the right places. Alan