[Skiboot] [PATCH 3/4] hdata: Remove hn variable where it is unused

Joel Stanley joel at jms.id.au
Tue Jun 5 17:13:36 AEST 2018


Whatever this was used for appears to pre-date the public release of
skiboot.

Found using scan-build.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 hdata/iohub.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/hdata/iohub.c b/hdata/iohub.c
index 1630d2a8be32..f37f5abf31c8 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -848,7 +848,6 @@ static void io_parse_slots(const struct HDIF_common_hdr *sp_iohubs, int hub_id)
 static void io_parse_fru(const void *sp_iohubs)
 {
 	unsigned int i;
-	struct dt_node *hn;
 	int count;
 
 	count = HDIF_get_iarray_size(sp_iohubs, CECHUB_FRU_IO_HUBS);
@@ -863,6 +862,7 @@ static void io_parse_fru(const void *sp_iohubs)
 	for (i = 0; i < count; i++) {
 		const struct cechub_io_hub *hub;
 		unsigned int size, hub_id;
+		struct dt_node *hn;
 		uint32_t chip_id;
 
 		hub = HDIF_get_iarray_item(sp_iohubs, CECHUB_FRU_IO_HUBS,
@@ -906,26 +906,25 @@ static void io_parse_fru(const void *sp_iohubs)
 		case CECHUB_HUB_MURANO:
 		case CECHUB_HUB_MURANO_SEGU:
 			prlog(PR_INFO, "CEC:     Murano !\n");
-			hn = io_add_p8(hub, sp_iohubs);
+			io_add_p8(hub, sp_iohubs);
 			break;
 		case CECHUB_HUB_VENICE_WYATT:
 			prlog(PR_INFO, "CEC:     Venice !\n");
-			hn = io_add_p8(hub, sp_iohubs);
+			io_add_p8(hub, sp_iohubs);
 			break;
 		case CECHUB_HUB_NIMBUS_SFORAZ:
 		case CECHUB_HUB_NIMBUS_MONZA:
 		case CECHUB_HUB_NIMBUS_LAGRANGE:
 			prlog(PR_INFO, "CEC:     Nimbus !\n");
-			hn = io_add_p9(hub, sp_iohubs);
+			io_add_p9(hub, sp_iohubs);
 			break;
 		case CECHUB_HUB_CUMULUS_DUOMO:
 			prlog(PR_INFO, "CEC:     Cumulus !\n");
-			hn = io_add_p9(hub, sp_iohubs);
+			io_add_p9(hub, sp_iohubs);
 			break;
 		default:
 			prlog(PR_ERR, "CEC:     Hub ID 0x%04x unsupported !\n",
 			      hub_id);
-			hn = NULL;
 		}
 
 		chip_id = pcid_to_chip_id(be32_to_cpu(hub->proc_chip_id));
-- 
2.17.0



More information about the Skiboot mailing list