static int64_t dump_read_info(uint32_t *id, uint32_t *size, uint32_t *type) { int rc; *type = 0xffffffff; rc = opal_dump_info2(id, size, type); if (rc == OPAL_PARAMETER) rc = opal_dump_info(id, size); if (rc) pr_warn("%s: Failed to get dump info (%d)\n", __func__, rc); return rc; }
static int64_t dump_read_info(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type) { __be32 id, size, type; int rc; type = cpu_to_be32(0xffffffff); rc = opal_dump_info2(&id, &size, &type); if (rc == OPAL_PARAMETER) rc = opal_dump_info(&id, &size); *dump_id = be32_to_cpu(id); *dump_size = be32_to_cpu(size); *dump_type = be32_to_cpu(type); if (rc) pr_warn("%s: Failed to get dump info (%d)\n", __func__, rc); return rc; }