| /linux/drivers/mtd/ubi/ |
| H A D | upd.c | 41 static int set_update_marker(struct ubi_device *ubi, struct ubi_volume *vol) in set_update_marker() argument 46 dbg_gen("set update marker for volume %d", vol->vol_id); in set_update_marker() 48 if (vol->upd_marker) { in set_update_marker() 49 ubi_assert(ubi->vtbl[vol->vol_id].upd_marker); in set_update_marker() 54 vtbl_rec = ubi->vtbl[vol->vol_id]; in set_update_marker() 58 err = ubi_change_vtbl_record(ubi, vol->vol_id, &vtbl_rec); in set_update_marker() 59 vol->upd_marker = 1; in set_update_marker() 74 static int clear_update_marker(struct ubi_device *ubi, struct ubi_volume *vol, in clear_update_marker() argument 80 dbg_gen("clear update marker for volume %d", vol->vol_id); in clear_update_marker() 82 vtbl_rec = ubi->vtbl[vol->vol_id]; in clear_update_marker() [all …]
|
| H A D | vmt.c | 58 struct ubi_volume *vol = container_of(dev, struct ubi_volume, dev); in vol_attribute_show() local 59 struct ubi_device *ubi = vol->ubi; in vol_attribute_show() 62 if (!ubi->volumes[vol->vol_id] || ubi->volumes[vol->vol_id]->is_dead) { in vol_attribute_show() 67 vol->ref_count += 1; in vol_attribute_show() 71 ret = sprintf(buf, "%d\n", vol->reserved_pebs); in vol_attribute_show() 75 if (vol->vol_type == UBI_DYNAMIC_VOLUME) in vol_attribute_show() 81 ret = sprintf(buf, "%s\n", vol->name); in vol_attribute_show() 83 ret = sprintf(buf, "%d\n", vol->corrupted); in vol_attribute_show() 85 ret = sprintf(buf, "%d\n", vol->alignment); in vol_attribute_show() 87 ret = sprintf(buf, "%d\n", vol->usable_leb_size); in vol_attribute_show() [all …]
|
| H A D | kapi.c | 67 void ubi_do_get_volume_info(struct ubi_device *ubi, struct ubi_volume *vol, in ubi_do_get_volume_info() argument 70 vi->vol_id = vol->vol_id; in ubi_do_get_volume_info() 72 vi->size = vol->reserved_pebs; in ubi_do_get_volume_info() 73 vi->used_bytes = vol->used_bytes; in ubi_do_get_volume_info() 74 vi->vol_type = vol->vol_type; in ubi_do_get_volume_info() 75 vi->corrupted = vol->corrupted; in ubi_do_get_volume_info() 76 vi->upd_marker = vol->upd_marker; in ubi_do_get_volume_info() 77 vi->alignment = vol->alignment; in ubi_do_get_volume_info() 78 vi->usable_leb_size = vol->usable_leb_size; in ubi_do_get_volume_info() 79 vi->name_len = vol->name_len; in ubi_do_get_volume_info() [all …]
|
| H A D | cdev.c | 47 struct ubi_volume *vol = desc->vol; in get_exclusive() local 49 spin_lock(&vol->ubi->volumes_lock); in get_exclusive() 50 users = vol->readers + vol->writers + vol->exclusive + vol->metaonly; in get_exclusive() 53 ubi_err(vol->ubi, "%d users for volume %d", users, vol->vol_id); in get_exclusive() 56 vol->readers = vol->writers = vol->metaonly = 0; in get_exclusive() 57 vol->exclusive = 1; in get_exclusive() 61 spin_unlock(&vol->ubi->volumes_lock); in get_exclusive() 73 struct ubi_volume *vol = desc->vol; in revoke_exclusive() local 75 spin_lock(&vol->ubi->volumes_lock); in revoke_exclusive() 76 ubi_assert(vol->readers == 0 && vol->writers == 0 && vol->metaonly == 0); in revoke_exclusive() [all …]
|
| H A D | vtbl.c | 128 struct ubi_volume *vol = re->desc->vol; in ubi_vtbl_rename_volumes() local 129 struct ubi_vtbl_record *vtbl_rec = &ubi->vtbl[vol->vol_id]; in ubi_vtbl_rename_volumes() 526 struct ubi_volume *vol; in init_volumes() local 534 vol = kzalloc_obj(struct ubi_volume); in init_volumes() 535 if (!vol) in init_volumes() 538 vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs); in init_volumes() 539 vol->alignment = be32_to_cpu(vtbl[i].alignment); in init_volumes() 540 vol->data_pad = be32_to_cpu(vtbl[i].data_pad); in init_volumes() 541 vol->upd_marker = vtbl[i].upd_marker; in init_volumes() 542 vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ? in init_volumes() [all …]
|
| H A D | eba.c | 104 void ubi_eba_get_ldesc(struct ubi_volume *vol, int lnum, in ubi_eba_get_ldesc() argument 108 ldesc->pnum = vol->eba_tbl->entries[lnum].pnum; in ubi_eba_get_ldesc() 120 struct ubi_eba_table *ubi_eba_create_table(struct ubi_volume *vol, in ubi_eba_create_table() argument 169 void ubi_eba_copy_table(struct ubi_volume *vol, struct ubi_eba_table *dst, in ubi_eba_copy_table() argument 175 ubi_assert(dst && vol && vol->eba_tbl); in ubi_eba_copy_table() 177 src = vol->eba_tbl; in ubi_eba_copy_table() 190 void ubi_eba_replace_table(struct ubi_volume *vol, struct ubi_eba_table *tbl) in ubi_eba_replace_table() argument 192 ubi_eba_destroy_table(vol->eba_tbl); in ubi_eba_replace_table() 193 vol->eba_tbl = tbl; in ubi_eba_replace_table() 431 bool ubi_eba_is_mapped(struct ubi_volume *vol, int lnum) in ubi_eba_is_mapped() argument [all …]
|
| H A D | ubi.h | 380 struct ubi_volume *vol; member 847 int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol); 848 void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol); 851 int ubi_start_update(struct ubi_device *ubi, struct ubi_volume *vol, 853 int ubi_more_update_data(struct ubi_device *ubi, struct ubi_volume *vol, 855 int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol, 857 int ubi_more_leb_change_data(struct ubi_device *ubi, struct ubi_volume *vol, 868 static inline bool ubi_leb_valid(struct ubi_volume *vol, int lnum) in ubi_leb_valid() argument 870 return lnum >= 0 && lnum < vol->reserved_pebs; in ubi_leb_valid() 874 struct ubi_eba_table *ubi_eba_create_table(struct ubi_volume *vol, [all …]
|
| H A D | debug.c | 125 void ubi_dump_vol_info(const struct ubi_volume *vol) in ubi_dump_vol_info() argument 128 pr_err("\tvol_id %d\n", vol->vol_id); in ubi_dump_vol_info() 129 pr_err("\treserved_pebs %d\n", vol->reserved_pebs); in ubi_dump_vol_info() 130 pr_err("\talignment %d\n", vol->alignment); in ubi_dump_vol_info() 131 pr_err("\tdata_pad %d\n", vol->data_pad); in ubi_dump_vol_info() 132 pr_err("\tvol_type %d\n", vol->vol_type); in ubi_dump_vol_info() 133 pr_err("\tname_len %d\n", vol->name_len); in ubi_dump_vol_info() 134 pr_err("\tusable_leb_size %d\n", vol->usable_leb_size); in ubi_dump_vol_info() 135 pr_err("\tused_ebs %d\n", vol->used_ebs); in ubi_dump_vol_info() 136 pr_err("\tused_bytes %lld\n", vol->used_bytes); in ubi_dump_vol_info() [all …]
|
| H A D | misc.c | 52 struct ubi_volume *vol = ubi->volumes[vol_id]; in ubi_check_volume() local 54 if (vol->vol_type != UBI_STATIC_VOLUME) in ubi_check_volume() 57 buf = vmalloc(vol->usable_leb_size); in ubi_check_volume() 61 for (i = 0; i < vol->used_ebs; i++) { in ubi_check_volume() 66 if (i == vol->used_ebs - 1) in ubi_check_volume() 67 size = vol->last_eb_bytes; in ubi_check_volume() 69 size = vol->usable_leb_size; in ubi_check_volume() 71 err = ubi_eba_read_leb(ubi, vol, i, buf, 0, size, 1); in ubi_check_volume()
|
| /linux/fs/ntfs/ |
| H A D | mft.c | 28 int ntfs_mft_record_check(const struct ntfs_volume *vol, struct mft_record *m, in ntfs_mft_record_check() argument 32 struct super_block *sb = vol->sb; in ntfs_mft_record_check() 43 (vol->mft_record_size >> NTFS_BLOCK_SIZE_BITS) + 1 != le16_to_cpu(m->usa_count) || in ntfs_mft_record_check() 44 le16_to_cpu(m->usa_ofs) + le16_to_cpu(m->usa_count) * 2 > vol->mft_record_size) { in ntfs_mft_record_check() 50 if (le32_to_cpu(m->bytes_allocated) != vol->mft_record_size) { in ntfs_mft_record_check() 52 mft_no, vol->mft_record_size, in ntfs_mft_record_check() 57 if (le32_to_cpu(m->bytes_in_use) > vol->mft_record_size) { in ntfs_mft_record_check() 60 vol->mft_record_size); in ntfs_mft_record_check() 80 if ((char *)a < (char *)m || (char *)a > (char *)m + vol->mft_record_size) { in ntfs_mft_record_check() 112 struct ntfs_volume *vol = ni->vol; in map_mft_record_folio() local [all …]
|
| H A D | namei.c | 60 static int ntfs_check_bad_windows_name(struct ntfs_volume *vol, in ntfs_check_bad_windows_name() argument 67 if (!NVolCheckWindowsNames(vol)) in ntfs_check_bad_windows_name() 77 __le16 *upcase = vol->upcase; in ntfs_check_bad_windows_name() 78 u32 size = vol->upcase_len; in ntfs_check_bad_windows_name() 88 __le16 *upcase = vol->upcase; in ntfs_check_bad_windows_name() 89 u32 size = vol->upcase_len, port; in ntfs_check_bad_windows_name() 173 struct ntfs_volume *vol = NTFS_SB(dir_ino->i_sb); in ntfs_lookup() local 184 uname_len = ntfs_nlstoucs(vol, dent->d_name.name, dent->d_name.len, in ntfs_lookup() 199 dent_inode = ntfs_iget(vol->sb, dent_ino); in ntfs_lookup() 215 ntfs_error(vol->sb, in ntfs_lookup() [all …]
|
| H A D | bitmap.c | 15 int ntfs_trim_fs(struct ntfs_volume *vol, struct fstrim_range *range) in ntfs_trim_fs() argument 24 u64 start_cluster = ntfs_bytes_to_cluster(vol, range->start); in ntfs_trim_fs() 25 u32 dq = bdev_discard_granularity(vol->sb->s_bdev); in ntfs_trim_fs() 29 dq = vol->cluster_size; in ntfs_trim_fs() 31 if (start_cluster >= vol->nr_clusters) in ntfs_trim_fs() 35 end_cluster = vol->nr_clusters; in ntfs_trim_fs() 37 end_cluster = ntfs_bytes_to_cluster(vol, in ntfs_trim_fs() 38 (range->start + range->len + vol->cluster_size - 1)); in ntfs_trim_fs() 39 if (end_cluster > vol->nr_clusters) in ntfs_trim_fs() 40 end_cluster = vol->nr_clusters; in ntfs_trim_fs() [all …]
|
| H A D | attrib.c | 128 ntfs_bytes_to_cluster(ni->vol, ni->allocated_size); in ntfs_map_runlist_nolock() 195 rl = ntfs_mapping_pairs_decompress(ni->vol, a, &ni->runlist, &new_rl_count); in ntfs_map_runlist_nolock() 435 ntfs_error(ni->vol->sb, "Failed with error code %lli.", in ntfs_attr_vcn_to_lcn_nolock() 580 ntfs_error(ni->vol->sb, "Failed with error code %i.", err); in ntfs_attr_find_vcn_nolock() 707 static bool ntfs_attr_value_is_valid(struct ntfs_volume *vol, in ntfs_attr_value_is_valid() argument 746 ntfs_error(vol->sb, in ntfs_attr_value_is_valid() 814 struct ntfs_volume *vol = ctx->ntfs_ino->vol; in ntfs_attr_find() local 815 __le16 *upcase = vol->upcase; in ntfs_attr_find() 816 u32 upcase_len = vol->upcase_len; in ntfs_attr_find() 855 ntfs_error(vol->sb, in ntfs_attr_find() [all …]
|
| H A D | inode.c | 325 struct super_block *sb = ni->vol->sb; in ntfs_non_resident_dealloc_clusters() 340 err = ntfs_cluster_free_from_rl(ni->vol, ni->runlist.rl); in ntfs_non_resident_dealloc_clusters() 352 rl = ntfs_mapping_pairs_decompress(ni->vol, actx->attr, NULL, in ntfs_non_resident_dealloc_clusters() 361 err = ntfs_cluster_free_from_rl(ni->vol, rl); in ntfs_non_resident_dealloc_clusters() 369 ntfs_release_dirty_clusters(ni->vol, ni->i_dealloc_clusters); in ntfs_non_resident_dealloc_clusters() 462 ni->vol = NTFS_SB(sb); in __ntfs_init_inode() 562 ntfs_error(ctx->ntfs_ino->vol->sb, in ntfs_is_extended_system_file() 567 ntfs_error(ctx->ntfs_ino->vol->sb, in ntfs_is_extended_system_file() 572 ntfs_error(ctx->ntfs_ino->vol->sb, in ntfs_is_extended_system_file() 577 ntfs_error(ctx->ntfs_ino->vol->sb, in ntfs_is_extended_system_file() [all …]
|
| H A D | dir.c | 77 struct ntfs_volume *vol = dir_ni->vol; in ntfs_lookup_inode_by_name() local 78 struct super_block *sb = vol->sb; in ntfs_lookup_inode_by_name() 155 CASE_SENSITIVE, vol->upcase, vol->upcase_len)) { in ntfs_lookup_inode_by_name() 200 if ((!NVolCaseSensitive(vol) || in ntfs_lookup_inode_by_name() 205 IGNORE_CASE, vol->upcase, in ntfs_lookup_inode_by_name() 206 vol->upcase_len)) { in ntfs_lookup_inode_by_name() 242 IGNORE_CASE, vol->upcase, vol->upcase_len); in ntfs_lookup_inode_by_name() 261 CASE_SENSITIVE, vol->upcase, vol->upcase_len); in ntfs_lookup_inode_by_name() 355 err = ntfs_index_block_inconsistent(vol, ia, in ntfs_lookup_inode_by_name() 390 CASE_SENSITIVE, vol->upcase, vol->upcase_len)) { in ntfs_lookup_inode_by_name() [all …]
|
| H A D | aops.c | 132 struct ntfs_volume *vol = ni->vol; in ntfs_bmap() local 140 ntfs_error(vol->sb, "BMAP does not make sense for %s attributes, returning 0.", in ntfs_bmap() 147 blocksize = vol->sb->s_blocksize; in ntfs_bmap() 148 blocksize_bits = vol->sb->s_blocksize_bits; in ntfs_bmap() 162 lcn = ntfs_attr_vcn_to_lcn_nolock(ni, ntfs_bytes_to_cluster(vol, ofs), in ntfs_bmap() 183 ntfs_error(vol->sb, in ntfs_bmap() 188 ntfs_error(vol->sb, in ntfs_bmap() 205 delta = ofs & vol->cluster_size_mask; in ntfs_bmap() 207 block = lcn = (ntfs_cluster_to_bytes(vol, lcn) + delta) >> in ntfs_bmap() 211 ntfs_error(vol->sb, in ntfs_bmap() [all …]
|
| H A D | compress.c | 470 struct ntfs_volume *vol = ni->vol; in ntfs_read_compressed_block() local 471 struct super_block *sb = vol->sb; in ntfs_read_compressed_block() 482 vol->cluster_size_bits; in ntfs_read_compressed_block() 488 & ~cb_size_mask) >> vol->cluster_size_bits; in ntfs_read_compressed_block() 490 unsigned int nr_cbs = ntfs_cluster_to_bytes(vol, end_vcn - start_vcn) >> in ntfs_read_compressed_block() 497 unsigned int nr_pages = ntfs_cluster_to_pidx(vol, end_vcn - start_vcn); in ntfs_read_compressed_block() 524 ntfs_error(vol->sb, "Failed to allocate internal buffers."); in ntfs_read_compressed_block() 532 offset = ntfs_cluster_to_pidx(vol, start_vcn); in ntfs_read_compressed_block() 643 page_ofs = ntfs_cluster_to_poff(vol, lcn); in ntfs_read_compressed_block() 644 page_index = ntfs_cluster_to_pidx(vol, lcn); in ntfs_read_compressed_block() [all …]
|
| /linux/sound/ppc/ |
| H A D | awacs.c | 140 int vol[2]; in snd_pmac_awacs_get_volume() local 143 vol[0] = (chip->awacs_reg[reg] >> lshift) & 0xf; in snd_pmac_awacs_get_volume() 144 vol[1] = chip->awacs_reg[reg] & 0xf; in snd_pmac_awacs_get_volume() 146 vol[0] = 0x0f - vol[0]; in snd_pmac_awacs_get_volume() 147 vol[1] = 0x0f - vol[1]; in snd_pmac_awacs_get_volume() 149 ucontrol->value.integer.value[0] = vol[0]; in snd_pmac_awacs_get_volume() 150 ucontrol->value.integer.value[1] = vol[1]; in snd_pmac_awacs_get_volume() 162 unsigned int vol[2]; in snd_pmac_awacs_put_volume() local 164 vol[0] = ucontrol->value.integer.value[0]; in snd_pmac_awacs_put_volume() 165 vol[1] = ucontrol->value.integer.value[1]; in snd_pmac_awacs_put_volume() [all …]
|
| H A D | tumbler.c | 268 unsigned int vol[2]; in tumbler_put_master_volume() local 271 vol[0] = ucontrol->value.integer.value[0]; in tumbler_put_master_volume() 272 vol[1] = ucontrol->value.integer.value[1]; in tumbler_put_master_volume() 273 if (vol[0] >= ARRAY_SIZE(master_volume_table) || in tumbler_put_master_volume() 274 vol[1] >= ARRAY_SIZE(master_volume_table)) in tumbler_put_master_volume() 276 change = mix->master_vol[0] != vol[0] || in tumbler_put_master_volume() 277 mix->master_vol[1] != vol[1]; in tumbler_put_master_volume() 279 mix->master_vol[0] = vol[0]; in tumbler_put_master_volume() 280 mix->master_vol[1] = vol[1]; in tumbler_put_master_volume() 492 unsigned int vol; in tumbler_set_mono_volume() local [all …]
|
| /linux/sound/pci/ice1712/ |
| H A D | se.c | 25 } vol[8]; member 450 uc->value.integer.value[0] = spec->vol[n].ch1; in se200pci_cont_volume_get() 451 uc->value.integer.value[1] = spec->vol[n].ch2; in se200pci_cont_volume_get() 461 uc->value.integer.value[0] = spec->vol[n].ch1; in se200pci_cont_boolean_get() 471 uc->value.enumerated.item[0] = spec->vol[n].ch1; in se200pci_cont_enum_get() 482 spec->vol[n].ch1, in se200pci_cont_update() 483 spec->vol[n].ch2); in se200pci_cont_update() 488 spec->vol[n].ch1, in se200pci_cont_update() 489 spec->vol[n].ch2); in se200pci_cont_update() 494 spec->vol[n].ch1, in se200pci_cont_update() [all …]
|
| H A D | phase.c | 47 unsigned short vol[8]; member 266 unsigned short vol, unsigned short master) in wm_set_vol() argument 270 if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) in wm_set_vol() 273 nvol = 127 - wm_vol[(((vol & ~WM_VOL_MUTE) * in wm_set_vol() 348 unsigned int vol = ucontrol->value.integer.value[ch]; in wm_master_vol_put() local 349 if (vol > WM_VOL_MAX) in wm_master_vol_put() 351 vol |= spec->master[ch] & WM_VOL_MUTE; in wm_master_vol_put() 352 if (vol != spec->master[ch]) { in wm_master_vol_put() 354 spec->master[ch] = vol; in wm_master_vol_put() 357 spec->vol[dac + ch], in wm_master_vol_put() [all …]
|
| H A D | prodigy_hifi.c | 30 unsigned short vol[8]; member 259 ucontrol->value.integer.value[i] = spec->vol[i]; in ak4396_dac_vol_get() 273 if (ucontrol->value.integer.value[i] != spec->vol[i]) { in ak4396_dac_vol_put() 274 spec->vol[i] = ucontrol->value.integer.value[i]; in ak4396_dac_vol_put() 276 spec->vol[i] & 0xff); in ak4396_dac_vol_put() 312 unsigned short vol, unsigned short master) in wm_set_vol() argument 316 if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) in wm_set_vol() 319 nvol = (((vol & ~WM_VOL_MUTE) * (master & ~WM_VOL_MUTE)) / 128) in wm_set_vol() 329 unsigned short vol, unsigned short master) in wm8766_set_vol() argument 333 if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) in wm8766_set_vol() [all …]
|
| /linux/drivers/media/radio/ |
| H A D | radio-typhoon.c | 111 static int typhoon_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in typhoon_s_mute_volume() argument 116 vol = 0; in typhoon_s_mute_volume() 117 vol >>= 14; /* Map 16 bit to 2 bit */ in typhoon_s_mute_volume() 118 vol &= 3; in typhoon_s_mute_volume() 119 outb_p(vol / 2, isa->io); /* Set the volume, high bit. */ in typhoon_s_mute_volume() 120 outb_p(vol % 2, isa->io + 2); /* Set the volume, low bit. */ in typhoon_s_mute_volume() 122 if (vol == 0 && !ty->muted) { in typhoon_s_mute_volume() 126 if (vol && ty->muted) { in typhoon_s_mute_volume()
|
| H A D | radio-terratec.c | 62 static int terratec_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in terratec_s_mute_volume() argument 67 vol = 0; in terratec_s_mute_volume() 68 vol = vol + (vol * 32); /* change both channels */ in terratec_s_mute_volume() 70 if (vol & (0x80 >> i)) in terratec_s_mute_volume()
|
| H A D | radio-aimslab.c | 118 static int rtrack_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) in rtrack_s_mute_volume() argument 127 if (vol == 0) { /* volume = 0 means mute the card */ in rtrack_s_mute_volume() 130 } else if (curvol < vol) { in rtrack_s_mute_volume() 132 for (; curvol < vol; curvol++) in rtrack_s_mute_volume() 134 } else if (curvol > vol) { in rtrack_s_mute_volume() 136 for (; curvol > vol; curvol--) in rtrack_s_mute_volume() 140 rt->curvol = vol; in rtrack_s_mute_volume()
|