From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753850AbbG0Oth (ORCPT ); Mon, 27 Jul 2015 10:49:37 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:52331 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751412AbbG0Otg (ORCPT ); Mon, 27 Jul 2015 10:49:36 -0400 X-AuditID: cbfee61b-f79706d000001b96-68-55b644fd749a From: Bartlomiej Zolnierkiewicz To: Viresh Kumar Cc: Rafael Wysocki , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, rob.herring@linaro.org, arnd.bergmann@linaro.org, nm@ti.com, broonie@kernel.org, mturquette@baylibre.com, sboyd@codeaurora.org, Sudeep.Holla@arm.com, viswanath.puttagunta@linaro.org, l.stach@pengutronix.de, thomas.petazzoni@free-electrons.com, linux-arm-kernel@lists.infradead.org, ta.omasab@gmail.com, kesavan.abhilash@gmail.com, khilman@linaro.org, santosh.shilimkar@oracle.com, Greg Kroah-Hartman , Len Brown , open list , Pavel Machek Subject: Re: [PATCH V2 08/11] opp: Add OPP sharing information to OPP library Date: Mon, 27 Jul 2015 16:48:59 +0200 Message-id: <1564699.gQjhqzf5VE@amdc1976> User-Agent: KMail/4.13.3 (Linux/3.13.0-57-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: References: MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA02RfSzUcRzH9/39fvfzO9z6ucR3/GG7+CN5bJrvymgr+a5m88/1R7Vx+IXl 4Xbnsc1YTxZ5Slw7SdHk4TY5eUzoiMaZpxiF6LBRo0gOO3JuLf+9Pp/3a5/PZ/swpHCWsmOi YuM5WawkWkSbU/27OitXw4VGscfXZmdU9fAyKpybp9Gd8loaqQwitNFVCdBsySSBlI/fEWhV s0gitW6ch0Zbn9JoPbsboOE+f/RDP0Cg6b4PNNL2j/DQ8FgehebyBimk12ZR6FVfM4Xq8+po tDB7m0B1Gxj1rc1R52yx6pkK4NWJe2Z4NCebwPPqYYBblNNmuLxticDq6gc0nhpvo3FHicoM 179Mw192dST+tfCZwrkGD/xmLIPCvRNNBK6s2TQLsrpq7hPORUclcjJ33xDzyPGhWp60yTJZ oSil08EKPxPwGch6wfffiggT28ChmVo6E5gzQlYJoL5GA0zFBoBl+Z9oo0WzZ2B+RvV+wDDW rDNcmuSMDsne58GS+SqesX+UDYTdHUFGnWKd4FZWGzCygD0B2xVdB2OOsZfg5nY6adT5bAj8 vZxgWpUDYMFmBmXyraC+YOaASdYBtncU8kzsDGtbeok8sH/lf015SFMe0p4DshpAThomlYdG xJyK5ZLc5JIYeUJshFtYXIwaHPx90b4ZdLUGaADLAJGlYMixQSzkSRLlKTEaABlSZC047dso FgrCJSm3OFlcsCwhmpNrgD1DiWwF7l5qsZCNkMRzNzlOysn+pQTDt0sH/k3FyGdw7+O2TbIL IzkSxM+f1nZ3Bny30HovX6cXOlIn5piL62tnKyycKgjtuOFJ8PH6TH1gWeCV0sopP6nh9cmo pK4BHbf3k0vzLnbZWul06HnL838hg0qFwFUc2qrsyVLYpnole3J/2gZ27hbdEKxf83PMbXgU x+10nx8RUfJIiaczKZNL/gLdr5wx8wIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Two very minor nits: On Monday, July 27, 2015 10:32:38 AM Viresh Kumar wrote: > An opp can be shared by multiple devices, for example its very common > for CPUs to share the OPPs, i.e. when they share clock/voltage rails. > > This patch adds support of shared OPPs to the OPP library. > > Instead of a single device, dev_opp will not contain a list of devices s/will not/will now/ ? > that use it. It also senses if the device (we are trying to initialize > OPPs for) shares OPPs with a device added earlier and in that case we > update the list of devices managed by OPPs instead of duplicating OPPs > again. > > The same infrastructure will be used for the old OPP bindings, with > later patches. > > Reviewed-by: Stephen Boyd > Signed-off-by: Viresh Kumar [...] > +static struct device_list_opp *_add_list_dev(const struct device *dev, > + struct device_opp *dev_opp) > +{ > + struct device_list_opp *list_dev; > + > + list_dev = kzalloc(sizeof(*list_dev), GFP_KERNEL); > + if (!list_dev) > + return NULL; > + > + /* Initialize list-dev */ > + list_add_rcu(&list_dev->node, &dev_opp->dev_list); > + list_dev->dev = dev; Probably doesn't matter currently but how's about: list_dev->dev = dev; list_add_rcu(&list_dev->node, &dev_opp->dev_list); ? > + > + return list_dev; > +} Otherwise: Reviewed-by: Bartlomiej Zolnierkiewicz Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics