From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753150AbbJLFF1 (ORCPT ); Mon, 12 Oct 2015 01:05:27 -0400 Received: from plane.gmane.org ([80.91.229.3]:47594 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729AbbJLFF0 (ORCPT ); Mon, 12 Oct 2015 01:05:26 -0400 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Christophe JAILLET Subject: Re: [PATCH] powerpc/mpc5xxx: Use of_get_next_parent to simplify code Date: Mon, 12 Oct 2015 07:05:11 +0200 Message-ID: References: <1444595260-3332-1-git-send-email-christophe.jaillet@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: aorleans-552-1-114-80.w92-140.abo.wanadoo.fr User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: X-Antivirus: avast! (VPS 151011-0, 11/10/2015), Outbound message X-Antivirus-Status: Clean Cc: linuxppc-dev@ozlabs.org, kernel-janitors@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 11/10/2015 22:44, Julia Lawall a écrit : > >> of_get_next_parent can be used to simplify the while() loop and >> avoid the need of a temp variable. > Can you do something with the loop in __of_translate_address, in > drivers/of/address.c? Is there not an iterator for this? > > julia > Hi Julia, There does not seem to be any 'for_each_parent_of_node' or equivalent. Best regards, CJ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 8DEB61A0682 for ; Mon, 12 Oct 2015 16:35:18 +1100 (AEDT) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0E3521402B0 for ; Mon, 12 Oct 2015 16:35:17 +1100 (AEDT) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZlVWn-0001JR-Kk for linuxppc-dev@ozlabs.org; Mon, 12 Oct 2015 07:20:05 +0200 Received: from aorleans-552-1-114-80.w92-140.abo.wanadoo.fr ([92.140.185.80]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Oct 2015 07:20:05 +0200 Received: from christophe.jaillet by aorleans-552-1-114-80.w92-140.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Oct 2015 07:20:05 +0200 To: linuxppc-dev@ozlabs.org From: Christophe JAILLET Subject: Re: [PATCH] powerpc/mpc5xxx: Use of_get_next_parent to simplify code Date: Mon, 12 Oct 2015 07:05:11 +0200 Message-ID: References: <1444595260-3332-1-git-send-email-christophe.jaillet@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed In-Reply-To: Cc: linux-kernel@vger.kernel.org,kernel-janitors@vger.kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Le 11/10/2015 22:44, Julia Lawall a écrit : > >> of_get_next_parent can be used to simplify the while() loop and >> avoid the need of a temp variable. > Can you do something with the loop in __of_translate_address, in > drivers/of/address.c? Is there not an iterator for this? > > julia > Hi Julia, There does not seem to be any 'for_each_parent_of_node' or equivalent. Best regards, CJ