static void attach_storage_element(SCLPDevice *sclp, SCCB *sccb,

                                   uint16_t element)

{

    int i, assigned, subincrement_id;

    AttachStorageElement *attach_info = (AttachStorageElement *) sccb;

    sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();



    assert(mhd);



    if (element != 1) {

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

        return;

    }



    assigned = mhd->standby_mem_size >> mhd->increment_size;

    attach_info->assigned = cpu_to_be16(assigned);

    subincrement_id = ((ram_size >> mhd->increment_size) << 16)

                      + SCLP_STARTING_SUBINCREMENT_ID;

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

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

        subincrement_id += SCLP_INCREMENT_UNIT;

    }

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

}

static void attach_storage_element(SCLPDevice *sclp, SCCB *sccb,

                                   uint16_t element)

{

    int i, assigned, subincrement_id;

    AttachStorageElement *attach_info = (AttachStorageElement *) sccb;

    sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();



    assert(mhd);



    if (element != 1) {

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

        return;

    }



    assigned = mhd->standby_mem_size >> mhd->increment_size;

    attach_info->assigned = cpu_to_be16(assigned);

    subincrement_id = ((ram_size >> mhd->increment_size) << 16)

                      + SCLP_STARTING_SUBINCREMENT_ID;

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

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

        subincrement_id += SCLP_INCREMENT_UNIT;

    }

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

}

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

                                   uint16_t VAR_2)

{

    int VAR_3, VAR_4, VAR_5;

    AttachStorageElement *attach_info = (AttachStorageElement *) VAR_1;

    sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev();



    assert(mhd);



    if (VAR_2 != 1) {

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

        return;

    }



    VAR_4 = mhd->standby_mem_size >> mhd->increment_size;

    attach_info->VAR_4 = cpu_to_be16(VAR_4);

    VAR_5 = ((ram_size >> mhd->increment_size) << 16)

                      + SCLP_STARTING_SUBINCREMENT_ID;

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

        attach_info->entries[VAR_3] = cpu_to_be32(VAR_5);

        VAR_5 += SCLP_INCREMENT_UNIT;

    }

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

}

static void FUNC_0(SCLPDevice *VAR_0, SCCB *VAR_1,
uint16_t VAR_2)
{ int VAR_3, VAR_4, VAR_5; AttachStorageElement *attach_info = (AttachStorageElement *) VAR_1; sclpMemoryHotplugDev *mhd = get_sclp_memory_hotplug_dev(); assert(mhd); if (VAR_2 != 1) { VAR_1->h.response_code = cpu_to_be16(SCLP_RC_INVALID_SCLP_COMMAND); return; } VAR_4 = mhd->standby_mem_size >> mhd->increment_size; attach_info->VAR_4 = cpu_to_be16(VAR_4); VAR_5 = ((ram_size >> mhd->increment_size) << 16)
+ SCLP_STARTING_SUBINCREMENT_ID; for (VAR_3 = 0; VAR_3 < VAR_4; VAR_3++) { attach_info->entries[VAR_3] = cpu_to_be32(VAR_5); VAR_5 += SCLP_INCREMENT_UNIT; } VAR_1->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_COMPLETION); }