static void read_storage_element0_info(SCLPDevice *sclp, SCCB *sccb)

{

    int i, assigned;

    int subincrement_id = SCLP_STARTING_SUBINCREMENT_ID;

    ReadStorageElementInfo *storage_info = (ReadStorageElementInfo *) sccb;

    sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();



    assert(mhd);



    if ((ram_size >> mhd->increment_size) >= 0x10000) {

        sccb->h.response_code = cpu_to_be16(SCLP_RC_SCCB_BOUNDARY_VIOLATION);

        return;

    }



    /* Return information regarding core memory */

    storage_info->max_id = cpu_to_be16(mhd->standby_mem_size ? 1 : 0);

    assigned = ram_size >> mhd->increment_size;

    storage_info->assigned = cpu_to_be16(assigned);



    for (i = 0; i < assigned; i++) {

        storage_info->entries[i] = cpu_to_be32(subincrement_id);

        subincrement_id += SCLP_INCREMENT_UNIT;

    }

    sccb->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_READ_COMPLETION);

}

static void read_storage_element0_info(SCLPDevice *sclp, SCCB *sccb)

{

    int i, assigned;

    int subincrement_id = SCLP_STARTING_SUBINCREMENT_ID;

    ReadStorageElementInfo *storage_info = (ReadStorageElementInfo *) sccb;

    sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();



    assert(mhd);



    if ((ram_size >> mhd->increment_size) >= 0x10000) {

        sccb->h.response_code = cpu_to_be16(SCLP_RC_SCCB_BOUNDARY_VIOLATION);

        return;

    }



    

    storage_info->max_id = cpu_to_be16(mhd->standby_mem_size ? 1 : 0);

    assigned = ram_size >> mhd->increment_size;

    storage_info->assigned = cpu_to_be16(assigned);



    for (i = 0; i < assigned; i++) {

        storage_info->entries[i] = cpu_to_be32(subincrement_id);

        subincrement_id += SCLP_INCREMENT_UNIT;

    }

    sccb->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_READ_COMPLETION);

}

static void FUNC_0(SCLPDevice *VAR_0, SCCB *VAR_1)

{

    int VAR_2, VAR_3;

    int VAR_4 = SCLP_STARTING_SUBINCREMENT_ID;

    ReadStorageElementInfo *storage_info = (ReadStorageElementInfo *) VAR_1;

    sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();



    assert(mhd);



    if ((ram_size >> mhd->increment_size) >= 0x10000) {

        VAR_1->h.response_code = cpu_to_be16(SCLP_RC_SCCB_BOUNDARY_VIOLATION);

        return;

    }



    

    storage_info->max_id = cpu_to_be16(mhd->standby_mem_size ? 1 : 0);

    VAR_3 = ram_size >> mhd->increment_size;

    storage_info->VAR_3 = cpu_to_be16(VAR_3);



    for (VAR_2 = 0; VAR_2 < VAR_3; VAR_2++) {

        storage_info->entries[VAR_2] = cpu_to_be32(VAR_4);

        VAR_4 += SCLP_INCREMENT_UNIT;

    }

    VAR_1->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_READ_COMPLETION);

}

static void FUNC_0(SCLPDevice *VAR_0, SCCB *VAR_1)
{ int VAR_2, VAR_3; int VAR_4 = SCLP_STARTING_SUBINCREMENT_ID; ReadStorageElementInfo *storage_info = (ReadStorageElementInfo *) VAR_1; sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev(); assert(mhd); if ((ram_size >> mhd->increment_size) >= 0x10000) { VAR_1->h.response_code = cpu_to_be16(SCLP_RC_SCCB_BOUNDARY_VIOLATION); return; } storage_info->max_id = cpu_to_be16(mhd->standby_mem_size ? 1 : 0); VAR_3 = ram_size >> mhd->increment_size; storage_info->VAR_3 = cpu_to_be16(VAR_3); for (VAR_2 = 0; VAR_2 < VAR_3; VAR_2++) { storage_info->entries[VAR_2] = cpu_to_be32(VAR_4); VAR_4 += SCLP_INCREMENT_UNIT; } VAR_1->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_READ_COMPLETION); }