From a9b642999bb8b0bb409150edc7adc777794ffe75 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 31 May 2018 07:52:00 -0700 Subject: util/sconfig: Get rid of bus pointer in device structure The only reason bus pointer existed in device structure in sconfig was to allow a node to point to the parent which could be a chip and bus which is the true parent in device tree hierarchy. Now that chip is no longer a device, there is no need for separate bus and parent pointers. This change gets rid of the redundant bus pointer in struct device in sconfig. BUG=b:80081934 TEST=Verified that static.c generated for all boards built by abuild is same with and without this change. Change-Id: I21f8fe1545a9ed53d66d6d4462df4a5d63023844 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/26736 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- util/sconfig/sconfig.tab.c_shipped | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'util/sconfig/sconfig.tab.c_shipped') diff --git a/util/sconfig/sconfig.tab.c_shipped b/util/sconfig/sconfig.tab.c_shipped index f8d1943de8..fb72b961b4 100644 --- a/util/sconfig/sconfig.tab.c_shipped +++ b/util/sconfig/sconfig.tab.c_shipped @@ -85,7 +85,7 @@ int yylex(); void yyerror(const char *s); -static struct device *cur_parent, *cur_bus; +static struct device *cur_parent; static struct chip *cur_chip; @@ -487,8 +487,8 @@ static const yytype_uint8 yytranslate[] = static const yytype_uint8 yyrline[] = { 0, 36, 36, 36, 38, 38, 38, 38, 40, 40, - 40, 40, 40, 40, 42, 42, 51, 51, 63, 66, - 69, 72, 75 + 40, 40, 40, 40, 42, 42, 51, 51, 61, 64, + 67, 70, 73 }; #endif @@ -1287,7 +1287,7 @@ yyreduce: { case 2: - { cur_parent = cur_bus = head; } + { cur_parent = head; } break; @@ -1318,9 +1318,8 @@ yyreduce: case 16: { - (yyval.device) = new_device(cur_parent, cur_bus, cur_chip, (yyvsp[-2].number), (yyvsp[-1].string), (yyvsp[0].number)); + (yyval.device) = new_device(cur_parent, cur_chip, (yyvsp[-2].number), (yyvsp[-1].string), (yyvsp[0].number)); cur_parent = (yyval.device); - cur_bus = (yyval.device); } break; @@ -1329,7 +1328,6 @@ yyreduce: { cur_parent = (yyvsp[-2].device)->parent; - cur_bus = (yyvsp[-2].device)->bus; fold_in((yyvsp[-2].device)); alias_siblings((yyvsp[-2].device)->children); } -- cgit v1.2.3