From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754684AbbEKPKn (ORCPT ); Mon, 11 May 2015 11:10:43 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:59828 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754327AbbEKPKX (ORCPT ); Mon, 11 May 2015 11:10:23 -0400 Message-ID: <5550C644.4040005@ti.com> Date: Mon, 11 May 2015 10:09:56 -0500 From: Suman Anna User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ohad Ben-Cohen , Dave Gerlach CC: linux-arm , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , "devicetree@vger.kernel.org" , Kevin Hilman , Tony Lindgren Subject: Re: [PATCH v3 1/4] remoteproc: introduce rproc_get_by_phandle API References: <1427917039-43206-1-git-send-email-d-gerlach@ti.com> <1427917039-43206-2-git-send-email-d-gerlach@ti.com> In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ohad, On 05/09/2015 02:39 AM, Ohad Ben-Cohen wrote: > Hi Dave, > > On Wed, Apr 1, 2015 at 10:37 PM, Dave Gerlach wrote: >> Allow users of remoteproc the ability to get a handle to an rproc by >> passing a phandle supplied in the user's device tree node. This is >> useful in situations that require manual booting of the rproc. >> >> This patch uses the code removed by commit 40e575b1d0b3 ("remoteproc: >> remove the get_by_name/put API") for the ref counting a rproc klist >> code but has rproc_get_by_name replaced with an rproc_get_by_phandle API. > > The general idea makes sense to me, but I'm not sure we really do need > a klist here, since the usage profile of this list is expected to be > super simple: very small number of accessors, looking for small number > of list members a small number of times, and probably never do need to > modify the list while accessing it. > > I suspect that the code would be simpler to maintain, debug and > understand if we just use a simple list with a simple locking > methodology here. The klist usage is something that we restored from previous remoteproc core code as used by the rproc_get_by_name() API. This was removed in commit 40e575b1d0b3 ("remoteproc: remove the get_by_name/put API"). We chose to use the code that had been present before rather than inventing something new all over again. If you feel that a regular list is the way to go forward, we can make the switch. regards Suman