From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935482AbdEKOph (ORCPT ); Thu, 11 May 2017 10:45:37 -0400 Received: from mail-yw0-f194.google.com ([209.85.161.194]:35117 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933028AbdEKOpe (ORCPT ); Thu, 11 May 2017 10:45:34 -0400 Date: Thu, 11 May 2017 10:45:26 -0400 From: Tejun Heo To: Andre Przywara Cc: Linus Walleij , Icenowy Zheng , Adam Borowski , Greg Kroah-Hartman , Maxime Ripard , Chen-Yu Tsai , linux-sunxi , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions Message-ID: <20170511144526.GA30473@htj.duckdns.org> References: <1493855857-4453-1-git-send-email-andre.przywara@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, May 11, 2017 at 03:20:58PM +0100, Andre Przywara wrote: > > Tejun, do I read your comments on the patch as an ACK? > > Tejun and I were wondering why we need this "create an array with the > indices" in the first place. If we can just call radix_tree_delete() > directly from the radix_tree_for_each_slot() loop, we can have a much > better fix (omitting the memory allocation at all) Yeah, it doesn't make sense to allocate to destroy a radix tree. It'd be much better to cleanup the code so that it doesn't need allocation in the first place. Thanks. -- tejun