Lines Matching refs:be32_to_cpu
284 if (be32_to_cpu(new_vh->lnum) != aeb->lnum) { in update_vol()
285 if (be32_to_cpu(new_vh->lnum) < aeb->lnum) in update_vol()
319 if (av->highest_lnum == be32_to_cpu(new_vh->lnum)) in update_vol()
321 be32_to_cpu(new_vh->data_size); in update_vol()
343 if (av->highest_lnum <= be32_to_cpu(new_vh->lnum)) { in update_vol()
344 av->highest_lnum = be32_to_cpu(new_vh->lnum); in update_vol()
345 av->last_data_size = be32_to_cpu(new_vh->data_size); in update_vol()
349 av->used_ebs = be32_to_cpu(new_vh->used_ebs); in update_vol()
376 if (be32_to_cpu(new_vh->vol_id) == UBI_FM_SB_VOLUME_ID || in process_pool_aeb()
377 be32_to_cpu(new_vh->vol_id) == UBI_FM_DATA_VOLUME_ID) { in process_pool_aeb()
388 if (be32_to_cpu(new_vh->vol_id) > tmp_av->vol_id) in process_pool_aeb()
390 else if (be32_to_cpu(new_vh->vol_id) < tmp_av->vol_id) in process_pool_aeb()
406 ubi_assert(be32_to_cpu(new_vh->vol_id) == av->vol_id); in process_pool_aeb()
488 pnum = be32_to_cpu(pebs[i]); in scan_pool()
509 image_seq = be32_to_cpu(ech->image_seq); in scan_pool()
513 be32_to_cpu(ech->image_seq), ubi->image_seq); in scan_pool()
543 new_aeb->lnum = be32_to_cpu(vh->lnum); in scan_pool()
637 if (be32_to_cpu(fmhdr->magic) != UBI_FM_HDR_MAGIC) { in ubi_attach_fastmap()
639 be32_to_cpu(fmhdr->magic), UBI_FM_HDR_MAGIC); in ubi_attach_fastmap()
647 if (be32_to_cpu(fmpl->magic) != UBI_FM_POOL_MAGIC) { in ubi_attach_fastmap()
649 be32_to_cpu(fmpl->magic), UBI_FM_POOL_MAGIC); in ubi_attach_fastmap()
657 if (be32_to_cpu(fmpl_wl->magic) != UBI_FM_POOL_MAGIC) { in ubi_attach_fastmap()
659 be32_to_cpu(fmpl_wl->magic), UBI_FM_POOL_MAGIC); in ubi_attach_fastmap()
693 for (i = 0; i < be32_to_cpu(fmhdr->free_peb_count); i++) { in ubi_attach_fastmap()
699 add_aeb(ai, &ai->free, be32_to_cpu(fmec->pnum), in ubi_attach_fastmap()
700 be32_to_cpu(fmec->ec), 0); in ubi_attach_fastmap()
704 for (i = 0; i < be32_to_cpu(fmhdr->used_peb_count); i++) { in ubi_attach_fastmap()
710 add_aeb(ai, &used, be32_to_cpu(fmec->pnum), in ubi_attach_fastmap()
711 be32_to_cpu(fmec->ec), 0); in ubi_attach_fastmap()
715 for (i = 0; i < be32_to_cpu(fmhdr->scrub_peb_count); i++) { in ubi_attach_fastmap()
721 add_aeb(ai, &used, be32_to_cpu(fmec->pnum), in ubi_attach_fastmap()
722 be32_to_cpu(fmec->ec), 1); in ubi_attach_fastmap()
726 for (i = 0; i < be32_to_cpu(fmhdr->erase_peb_count); i++) { in ubi_attach_fastmap()
732 add_aeb(ai, &ai->erase, be32_to_cpu(fmec->pnum), in ubi_attach_fastmap()
733 be32_to_cpu(fmec->ec), 1); in ubi_attach_fastmap()
737 ai->bad_peb_count = be32_to_cpu(fmhdr->bad_peb_count); in ubi_attach_fastmap()
740 for (i = 0; i < be32_to_cpu(fmhdr->vol_count); i++) { in ubi_attach_fastmap()
746 if (be32_to_cpu(fmvhdr->magic) != UBI_FM_VHDR_MAGIC) { in ubi_attach_fastmap()
748 be32_to_cpu(fmvhdr->magic), UBI_FM_VHDR_MAGIC); in ubi_attach_fastmap()
752 av = add_vol(ai, be32_to_cpu(fmvhdr->vol_id), in ubi_attach_fastmap()
753 be32_to_cpu(fmvhdr->used_ebs), in ubi_attach_fastmap()
754 be32_to_cpu(fmvhdr->data_pad), in ubi_attach_fastmap()
756 be32_to_cpu(fmvhdr->last_eb_bytes)); in ubi_attach_fastmap()
767 if (ai->highest_vol_id < be32_to_cpu(fmvhdr->vol_id)) in ubi_attach_fastmap()
768 ai->highest_vol_id = be32_to_cpu(fmvhdr->vol_id); in ubi_attach_fastmap()
772 fm_pos += (sizeof(__be32) * be32_to_cpu(fm_eba->reserved_pebs)); in ubi_attach_fastmap()
776 if (be32_to_cpu(fm_eba->magic) != UBI_FM_EBA_MAGIC) { in ubi_attach_fastmap()
778 be32_to_cpu(fm_eba->magic), UBI_FM_EBA_MAGIC); in ubi_attach_fastmap()
782 for (j = 0; j < be32_to_cpu(fm_eba->reserved_pebs); j++) { in ubi_attach_fastmap()
783 int pnum = be32_to_cpu(fm_eba->pnum[j]); in ubi_attach_fastmap()
785 if ((int)be32_to_cpu(fm_eba->pnum[j]) < 0) in ubi_attach_fastmap()
911 if (be32_to_cpu(fmsb->magic) != UBI_FM_SB_MAGIC) { in ubi_scan_fastmap()
913 be32_to_cpu(fmsb->magic), UBI_FM_SB_MAGIC); in ubi_scan_fastmap()
925 used_blocks = be32_to_cpu(fmsb->used_blocks); in ubi_scan_fastmap()
956 pnum = be32_to_cpu(fmsb->block_loc[i]); in ubi_scan_fastmap()
973 image_seq = be32_to_cpu(ech->image_seq); in ubi_scan_fastmap()
983 be32_to_cpu(ech->image_seq), ubi->image_seq); in ubi_scan_fastmap()
996 if (be32_to_cpu(vh->vol_id) != UBI_FM_SB_VOLUME_ID) { in ubi_scan_fastmap()
998 be32_to_cpu(vh->vol_id), in ubi_scan_fastmap()
1004 if (be32_to_cpu(vh->vol_id) != UBI_FM_DATA_VOLUME_ID) { in ubi_scan_fastmap()
1006 be32_to_cpu(vh->vol_id), in ubi_scan_fastmap()
1029 tmp_crc = be32_to_cpu(fmsb2->data_crc); in ubi_scan_fastmap()
1063 e->pnum = be32_to_cpu(fmsb2->block_loc[i]); in ubi_scan_fastmap()
1064 e->ec = be32_to_cpu(fmsb2->block_ec[i]); in ubi_scan_fastmap()