fastmap.c (9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e) fastmap.c (1a3487cdf8dc1f60dcbf66775cd68597c31bac22)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (c) 2012 Linutronix GmbH
4 * Copyright (c) 2014 sigma star gmbh
5 * Author: Richard Weinberger <richard@nod.at>
6 */
7
8#include <linux/crc32.h>

--- 71 unchanged lines hidden (view full) ---

80{
81 size_t size;
82
83 size = sizeof(struct ubi_fm_sb) +
84 sizeof(struct ubi_fm_hdr) +
85 sizeof(struct ubi_fm_scan_pool) +
86 sizeof(struct ubi_fm_scan_pool) +
87 (ubi->peb_count * sizeof(struct ubi_fm_ec)) +
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (c) 2012 Linutronix GmbH
4 * Copyright (c) 2014 sigma star gmbh
5 * Author: Richard Weinberger <richard@nod.at>
6 */
7
8#include <linux/crc32.h>

--- 71 unchanged lines hidden (view full) ---

80{
81 size_t size;
82
83 size = sizeof(struct ubi_fm_sb) +
84 sizeof(struct ubi_fm_hdr) +
85 sizeof(struct ubi_fm_scan_pool) +
86 sizeof(struct ubi_fm_scan_pool) +
87 (ubi->peb_count * sizeof(struct ubi_fm_ec)) +
88 (sizeof(struct ubi_fm_eba) +
89 (ubi->peb_count * sizeof(__be32))) +
90 sizeof(struct ubi_fm_volhdr) * UBI_MAX_VOLUMES;
88 ((sizeof(struct ubi_fm_eba) +
89 sizeof(struct ubi_fm_volhdr)) *
90 (UBI_MAX_VOLUMES + UBI_INT_VOL_COUNT)) +
91 (ubi->peb_count * sizeof(__be32));
91 return roundup(size, ubi->leb_size);
92}
93
94
95/**
96 * new_fm_vbuf() - allocate a new volume header for fastmap usage.
97 * @ubi: UBI device description object
98 * @vol_id: the VID of the new header

--- 1599 unchanged lines hidden ---
92 return roundup(size, ubi->leb_size);
93}
94
95
96/**
97 * new_fm_vbuf() - allocate a new volume header for fastmap usage.
98 * @ubi: UBI device description object
99 * @vol_id: the VID of the new header

--- 1599 unchanged lines hidden ---