Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759187AbbKST0i (ORCPT ); Thu, 19 Nov 2015 14:26:38 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:36413 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751465AbbKST0g (ORCPT ); Thu, 19 Nov 2015 14:26:36 -0500 Date: Thu, 19 Nov 2015 11:26:32 -0800 From: Brian Norris To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, David Woodhouse , linux-mtd@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, Russell King - ARM Linux , Thomas Petazzoni , Andrew Lunn , Bjorn Helgaas , Jason Cooper , Kamal Dasu Subject: Re: [PATCH 1/4] mtd: brcmnand: improve memory management Message-ID: <20151119192632.GH64635@google.com> References: <1447884254-26336-1-git-send-email-Julia.Lawall@lip6.fr> <1447884254-26336-2-git-send-email-Julia.Lawall@lip6.fr> <20151118224440.GC64635@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1342 Lines: 28 On Thu, Nov 19, 2015 at 07:13:45AM +0100, Julia Lawall wrote: > On Wed, 18 Nov 2015, Brian Norris wrote: > > On Wed, Nov 18, 2015 at 11:04:11PM +0100, Julia Lawall wrote: > > > 3. If the continue is not taken, then host is added to a list, that has a > > > lifetime beyond the end of the for_each_available_child_of_node loop body. > > > Thus, of_node_get is needed on child, which is referenced by host. A > > > corresponding of_node_put is needed in the remove function. > > > > This one's a bit silly. We really shouldn't be keeping the reference in > > 'host' at all. Also, as of commit 215a02fd3087 ("mtd: grab a reference to > > the MTD of_node before registering it"), the MTD core will actually be > > refcounting the node for us, too, so this isn't really necessary. > > > > I have a patch to remove brcmnand_host::of_node (appended below), which > > should make this step obsolete, and be more obvious that no extra > > of_node_get()'ing is required. > > OK. Should I resend my patch without this change? Sure, that'd be good. Then I could merge/rebase mine on top. Thanks, Brian -- 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/