Lines Matching refs:be32_to_cpu

281 		if (be32_to_cpu(new_vh->lnum) != aeb->lnum) {  in update_vol()
282 if (be32_to_cpu(new_vh->lnum) < aeb->lnum) in update_vol()
316 if (av->highest_lnum == be32_to_cpu(new_vh->lnum)) in update_vol()
318 be32_to_cpu(new_vh->data_size); in update_vol()
340 if (av->highest_lnum <= be32_to_cpu(new_vh->lnum)) { in update_vol()
341 av->highest_lnum = be32_to_cpu(new_vh->lnum); in update_vol()
342 av->last_data_size = be32_to_cpu(new_vh->data_size); in update_vol()
346 av->used_ebs = be32_to_cpu(new_vh->used_ebs); in update_vol()
373 if (be32_to_cpu(new_vh->vol_id) == UBI_FM_SB_VOLUME_ID || in process_pool_aeb()
374 be32_to_cpu(new_vh->vol_id) == UBI_FM_DATA_VOLUME_ID) { in process_pool_aeb()
385 if (be32_to_cpu(new_vh->vol_id) > tmp_av->vol_id) in process_pool_aeb()
387 else if (be32_to_cpu(new_vh->vol_id) < tmp_av->vol_id) in process_pool_aeb()
403 ubi_assert(be32_to_cpu(new_vh->vol_id) == av->vol_id); in process_pool_aeb()
479 pnum = be32_to_cpu(pebs[i]); in scan_pool()
500 image_seq = be32_to_cpu(ech->image_seq); in scan_pool()
504 be32_to_cpu(ech->image_seq), ubi->image_seq); in scan_pool()
534 new_aeb->lnum = be32_to_cpu(vh->lnum); in scan_pool()
628 if (be32_to_cpu(fmhdr->magic) != UBI_FM_HDR_MAGIC) { in ubi_attach_fastmap()
630 be32_to_cpu(fmhdr->magic), UBI_FM_HDR_MAGIC); in ubi_attach_fastmap()
638 if (be32_to_cpu(fmpl1->magic) != UBI_FM_POOL_MAGIC) { in ubi_attach_fastmap()
640 be32_to_cpu(fmpl1->magic), UBI_FM_POOL_MAGIC); in ubi_attach_fastmap()
648 if (be32_to_cpu(fmpl2->magic) != UBI_FM_POOL_MAGIC) { in ubi_attach_fastmap()
650 be32_to_cpu(fmpl2->magic), UBI_FM_POOL_MAGIC); in ubi_attach_fastmap()
684 for (i = 0; i < be32_to_cpu(fmhdr->free_peb_count); i++) { in ubi_attach_fastmap()
690 add_aeb(ai, &ai->free, be32_to_cpu(fmec->pnum), in ubi_attach_fastmap()
691 be32_to_cpu(fmec->ec), 0); in ubi_attach_fastmap()
695 for (i = 0; i < be32_to_cpu(fmhdr->used_peb_count); i++) { in ubi_attach_fastmap()
701 add_aeb(ai, &used, be32_to_cpu(fmec->pnum), in ubi_attach_fastmap()
702 be32_to_cpu(fmec->ec), 0); in ubi_attach_fastmap()
706 for (i = 0; i < be32_to_cpu(fmhdr->scrub_peb_count); i++) { in ubi_attach_fastmap()
712 add_aeb(ai, &used, be32_to_cpu(fmec->pnum), in ubi_attach_fastmap()
713 be32_to_cpu(fmec->ec), 1); in ubi_attach_fastmap()
717 for (i = 0; i < be32_to_cpu(fmhdr->erase_peb_count); i++) { in ubi_attach_fastmap()
723 add_aeb(ai, &ai->erase, be32_to_cpu(fmec->pnum), in ubi_attach_fastmap()
724 be32_to_cpu(fmec->ec), 1); in ubi_attach_fastmap()
728 ai->bad_peb_count = be32_to_cpu(fmhdr->bad_peb_count); in ubi_attach_fastmap()
731 for (i = 0; i < be32_to_cpu(fmhdr->vol_count); i++) { in ubi_attach_fastmap()
737 if (be32_to_cpu(fmvhdr->magic) != UBI_FM_VHDR_MAGIC) { in ubi_attach_fastmap()
739 be32_to_cpu(fmvhdr->magic), UBI_FM_VHDR_MAGIC); in ubi_attach_fastmap()
743 av = add_vol(ai, be32_to_cpu(fmvhdr->vol_id), in ubi_attach_fastmap()
744 be32_to_cpu(fmvhdr->used_ebs), in ubi_attach_fastmap()
745 be32_to_cpu(fmvhdr->data_pad), in ubi_attach_fastmap()
747 be32_to_cpu(fmvhdr->last_eb_bytes)); in ubi_attach_fastmap()
753 if (ai->highest_vol_id < be32_to_cpu(fmvhdr->vol_id)) in ubi_attach_fastmap()
754 ai->highest_vol_id = be32_to_cpu(fmvhdr->vol_id); in ubi_attach_fastmap()
758 fm_pos += (sizeof(__be32) * be32_to_cpu(fm_eba->reserved_pebs)); in ubi_attach_fastmap()
762 if (be32_to_cpu(fm_eba->magic) != UBI_FM_EBA_MAGIC) { in ubi_attach_fastmap()
764 be32_to_cpu(fm_eba->magic), UBI_FM_EBA_MAGIC); in ubi_attach_fastmap()
768 for (j = 0; j < be32_to_cpu(fm_eba->reserved_pebs); j++) { in ubi_attach_fastmap()
769 int pnum = be32_to_cpu(fm_eba->pnum[j]); in ubi_attach_fastmap()
771 if ((int)be32_to_cpu(fm_eba->pnum[j]) < 0) in ubi_attach_fastmap()
889 if (be32_to_cpu(fmsb->magic) != UBI_FM_SB_MAGIC) { in ubi_scan_fastmap()
891 be32_to_cpu(fmsb->magic), UBI_FM_SB_MAGIC); in ubi_scan_fastmap()
903 used_blocks = be32_to_cpu(fmsb->used_blocks); in ubi_scan_fastmap()
934 pnum = be32_to_cpu(fmsb->block_loc[i]); in ubi_scan_fastmap()
951 image_seq = be32_to_cpu(ech->image_seq); in ubi_scan_fastmap()
961 be32_to_cpu(ech->image_seq), ubi->image_seq); in ubi_scan_fastmap()
974 if (be32_to_cpu(vh->vol_id) != UBI_FM_SB_VOLUME_ID) { in ubi_scan_fastmap()
976 be32_to_cpu(vh->vol_id), in ubi_scan_fastmap()
982 if (be32_to_cpu(vh->vol_id) != UBI_FM_DATA_VOLUME_ID) { in ubi_scan_fastmap()
984 be32_to_cpu(vh->vol_id), in ubi_scan_fastmap()
1007 tmp_crc = be32_to_cpu(fmsb2->data_crc); in ubi_scan_fastmap()
1041 e->pnum = be32_to_cpu(fmsb2->block_loc[i]); in ubi_scan_fastmap()
1042 e->ec = be32_to_cpu(fmsb2->block_ec[i]); in ubi_scan_fastmap()