From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753682AbbEIHjj (ORCPT ); Sat, 9 May 2015 03:39:39 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:35632 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbbEIHjf (ORCPT ); Sat, 9 May 2015 03:39:35 -0400 MIME-Version: 1.0 X-Originating-IP: [85.250.79.171] In-Reply-To: <1427917039-43206-2-git-send-email-d-gerlach@ti.com> References: <1427917039-43206-1-git-send-email-d-gerlach@ti.com> <1427917039-43206-2-git-send-email-d-gerlach@ti.com> From: Ohad Ben-Cohen Date: Sat, 9 May 2015 10:39:14 +0300 Message-ID: Subject: Re: [PATCH v3 1/4] remoteproc: introduce rproc_get_by_phandle API To: Dave Gerlach Cc: linux-arm , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , "devicetree@vger.kernel.org" , Suman Anna , Kevin Hilman , Tony Lindgren Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Ohad.