From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751335AbdE3Wk0 (ORCPT ); Tue, 30 May 2017 18:40:26 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59584 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119AbdE3WkY (ORCPT ); Tue, 30 May 2017 18:40:24 -0400 Subject: Re: [PATCH 2/7] USB: of: document reference taken by child-lookup helper To: Johan Hovold , Greg Kroah-Hartman References: <20170530162554.26159-1-johan@kernel.org> <20170530162554.26159-3-johan@kernel.org> Cc: Linus Walleij , Peter Chen , Rob Herring , Arnd Bergmann , Sricharan R , Zhang Rui , Eduardo Valentin , linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: Tyrel Datwyler Date: Tue, 30 May 2017 15:40:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170530162554.26159-3-johan@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17053022-0024-0000-0000-00001689B2B9 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007147; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000212; SDB=6.00867913; UDB=6.00431267; IPR=6.00647793; BA=6.00005387; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015651; XFM=3.00000015; UTC=2017-05-30 22:40:10 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17053022-0025-0000-0000-00004B264A37 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-30_14:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705300411 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/30/2017 09:25 AM, Johan Hovold wrote: > Document that the child-node lookup helper takes a reference to the > device-tree node which needs to be dropped after use. > > Signed-off-by: Johan Hovold > --- > drivers/usb/core/of.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c > index d563cbcf76cf..17a4af02cf5b 100644 > --- a/drivers/usb/core/of.c > +++ b/drivers/usb/core/of.c > @@ -28,6 +28,9 @@ > * > * Find the node from device tree according to its port number. > * > + * Takes a reference to the returned device-tree node, which needs to be > + * dropped after use. > + * > * Return: On success, a pointer to the device node, %NULL on failure. I would use the same blurb used throughout drivers/of/* for consistency. * Returns a node pointer with refcount incremented, use * of_node_put() on it when done. */ Just my 2-cents -Tyrel > */ > struct device_node *usb_of_get_child_node(struct device_node *parent, >