From patchwork Thu Sep 8 09:05:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 667395 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 AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sVDwB0PmKz9s36 for ; Thu, 8 Sep 2016 19:06:18 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3sVDw94fwqzDsTr for ; Thu, 8 Sep 2016 19:06:17 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sVDvy5r0VzDsTL for ; Thu, 8 Sep 2016 19:06:06 +1000 (AEST) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2200F80087; Thu, 8 Sep 2016 09:06:05 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-48.ams2.redhat.com [10.36.116.48]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8895wd3010467; Thu, 8 Sep 2016 05:06:03 -0400 From: Thomas Huth To: slof@lists.ozlabs.org Date: Thu, 8 Sep 2016 11:05:58 +0200 Message-Id: <1473325558-469-4-git-send-email-thuth@redhat.com> In-Reply-To: <1473325558-469-1-git-send-email-thuth@redhat.com> References: <1473325558-469-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 08 Sep 2016 09:06:05 +0000 (UTC) Subject: [SLOF] [PATCH 3/3] Source code beautification of board-qemu/slof/pci-interrupts.fs X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" No functional change in this patch, only cosmetics: Use indentation width = 4 spaces everywhere, fix typo in one of the comments ("Child pin" instead of "Chile pin"), and rename "swizzledpin" in the return stack comments to "parentpin" to match the non-return stack comments. Signed-off-by: Thomas Huth --- board-qemu/slof/pci-interrupts.fs | 52 +++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/board-qemu/slof/pci-interrupts.fs b/board-qemu/slof/pci-interrupts.fs index 7c8ecbd..6c73a3a 100644 --- a/board-qemu/slof/pci-interrupts.fs +++ b/board-qemu/slof/pci-interrupts.fs @@ -1,38 +1,38 @@ : pci-gen-irq-map-one ( prop-addr prop-len slot pin -- prop-addr prop-len ) - 2dup + 1- 3 and 1+ ( prop-addr prop-len slot pin parentpin ) - >r >r ( prop-addr prop-len slot R: swizzledpin pin ) + 2dup + 1- 3 and 1+ ( prop-addr prop-len slot pin parentpin ) + >r >r ( prop-addr prop-len slot R: parentpin pin ) - \ Child slot# - B lshift encode-int+ ( prop-addr prop-len R: swizzledpin pin ) - \ Child 64bit BAR (not really used) - 0 encode-64+ - \ Chile pin# - r> encode-int+ ( prop-addr prop-len R: swizzledpin ) + \ Child slot# + B lshift encode-int+ ( prop-addr prop-len R: parentpin pin ) + \ Child 64bit BAR (not really used) + 0 encode-64+ + \ Child pin# + r> encode-int+ ( prop-addr prop-len R: parentpin ) - \ Parent phandle - get-parent encode-int+ + \ Parent phandle + get-parent encode-int+ - \ Parent slot# - get-node >space - pci-addr2dev B lshift ( prop-addr prop-len parent-slot R: swizzledpin ) - encode-int+ - \ Parent 64bit BAR (not really used) - 0 encode-64+ - \ Parent pin - r> encode-int+ ( prop-addr prop-len R: ) + \ Parent slot# + get-node >space + pci-addr2dev B lshift ( prop-addr prop-len parent-slot R: parentpin ) + encode-int+ + \ Parent 64bit BAR (not really used) + 0 encode-64+ + \ Parent pin + r> encode-int+ ( prop-addr prop-len R: ) ; : pci-gen-irq-entry ( prop-addr prop-len config-addr -- prop-addr prop-len ) - pci-addr2dev ( prop-addr prop-len slot ) - -rot ( slot prop-addr prop-len ) - 5 1 DO - 2 pick i ( slot prop-addr prop-len slot pin ) - pci-gen-irq-map-one - LOOP - rot drop + pci-addr2dev ( prop-addr prop-len slot ) + -rot ( slot prop-addr prop-len ) + 5 1 DO + 2 pick i ( slot prop-addr prop-len slot pin ) + pci-gen-irq-map-one + LOOP + rot drop ; : pci-set-irq-line ( config-addr -- ) - drop + drop ;