From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752014AbdJTNyR (ORCPT ); Fri, 20 Oct 2017 09:54:17 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36482 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751472AbdJTNyQ (ORCPT ); Fri, 20 Oct 2017 09:54:16 -0400 Date: Fri, 20 Oct 2017 15:54:23 +0200 From: Greg KH To: Masahiro Yamada Cc: Srinivas Kandagatla , Linux Kernel Mailing List Subject: Re: [PATCH 02/12] nvmem: mtk-efuse: use stack for nvmem_config instead of malloc'ing it Message-ID: <20171020135423.GC20327@kroah.com> References: <20171009132641.27169-1-srinivas.kandagatla@linaro.org> <20171009132641.27169-3-srinivas.kandagatla@linaro.org> <20171020133455.GD9301@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 20, 2017 at 10:47:28PM +0900, Masahiro Yamada wrote: > 2017-10-20 22:34 GMT+09:00 Greg KH : > > On Mon, Oct 09, 2017 at 03:26:31PM +0200, srinivas.kandagatla@linaro.org wrote: > >> From: Masahiro Yamada > >> > >> nvmem_register() copies all the members of nvmem_config to > >> nvmem_device. So, nvmem_config is one-time use data during > >> probing. There is no point to keep it until the driver detach. > >> Using stack should be no problem because nvmem_config is pretty > >> small. > > > > Same objection as previous patch, what is wrong with it as-is? > > > > It is wasting memory. The memory is freed again, after the call, right? thanks, greg k-h