From patchwork Thu May 24 05:50:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 919600 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rz5L55Kvz9s1w for ; Thu, 24 May 2018 15:51:02 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="gWOh7UJq"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40rz5L38WbzF1Hj for ; Thu, 24 May 2018 15:51:02 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="gWOh7UJq"; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40rz4m3Lp2zF1Cr for ; Thu, 24 May 2018 15:50:32 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.b="gWOh7UJq"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40rz4l73yDz9s1w; Thu, 24 May 2018 15:50:31 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ozlabs.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1527141032; bh=FbsT0mdWbsIVCFwAygbCYvawE0D8IDjpTQ9Cn86xeXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gWOh7UJqDrZ6lx7SXk9FKtlaDGlxGp68fQDagXZk0l9rNqKzmxLKOU4ucPvvC8xzE 7j6eWdXjvNmyNwN7qxYGXBBujx0xLirnq+/jAuwxZ0iFbbsB6nFMao1zP3i+3EbmuY AyfmRJZVpf5MnBvFu3ZJ9hWnxHZ0Bn2+eHGPBj3gUh1ftkdAeFRdKtsQymeNI3uwxO O1/km0fCvIsqqUyqn+Wx8R7EGZ6mcOfTmz++SWb5JR5vrvo1KsM5OJiVtgZ95F7iEW KnLxfE1pTCKwKPJ+GhLxaE5D/veYLfQ4xVXCEYXmjmWKfNO1g8TW8auvbfRF3aNut+ D8kgmJZlGGZ/w== From: Amitay Isaacs To: "pdbg@lists.ozlabs.org"@lists.ozlabs.org Date: Thu, 24 May 2018 15:50:13 +1000 Message-Id: <20180524055017.8801-8-amitay@ozlabs.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524055017.8801-1-amitay@ozlabs.org> References: <20180524055017.8801-1-amitay@ozlabs.org> Subject: [Pdbg] [PATCH v3 07/11] libpdbg/device: Add new targets in the order of traversal X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs MIME-Version: 1.0 Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" This automatically sorts targets in increasing index order. Signed-off-by: Amitay Isaacs --- libpdbg/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpdbg/device.c b/libpdbg/device.c index 7ee4884..e5b78f4 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -96,7 +96,7 @@ static struct pdbg_target *new_node(const char *name, const void *fdt, int node_ * above DECLARE_HW_UNIT). */ memcpy(node, hw_info->hw_unit, size); target_class = get_target_class(node->class); - list_add(&target_class->targets, &node->class_link); + list_add_tail(&target_class->targets, &node->class_link); } node->dn_name = take_name(name);