[PATCH v8 12/23] coresight: Use helpers to fetch first and last nodes