/drivers/mtd/tests/ |
D | mtd_nandecctest.c | 47 size_t size) in single_bit_error_data() argument 49 unsigned int offset = prandom_u32() % (size * BITS_PER_BYTE); in single_bit_error_data() 51 memcpy(error_data, correct_data, size); in single_bit_error_data() 56 size_t size) in double_bit_error_data() argument 60 offset[0] = prandom_u32() % (size * BITS_PER_BYTE); in double_bit_error_data() 62 offset[1] = prandom_u32() % (size * BITS_PER_BYTE); in double_bit_error_data() 65 memcpy(error_data, correct_data, size); in double_bit_error_data() 71 static unsigned int random_ecc_bit(size_t size) in random_ecc_bit() argument 75 if (size == 256) { in random_ecc_bit() 88 size_t size) in single_bit_error_ecc() argument [all …]
|
/drivers/misc/mic/scif/ |
D | scif_rb.c | 25 #define scif_rb_ring_cnt(head, tail, size) CIRC_CNT(head, tail, size) argument 26 #define scif_rb_ring_space(head, tail, size) CIRC_SPACE(head, tail, size) argument 37 void *rb_base, u8 size) in scif_rb_init() argument 40 rb->size = (1 << size); in scif_rb_init() 49 void *msg, u32 size) in memcpy_torb() argument 53 if (header + size >= rb->rb_base + rb->size) { in memcpy_torb() 55 size1 = (u32)(rb->rb_base + rb->size - header); in memcpy_torb() 56 size2 = size - size1; in memcpy_torb() 61 memcpy_toio((void __iomem __force *)header, msg, size); in memcpy_torb() 67 void *msg, u32 size) in memcpy_fromrb() argument [all …]
|
/drivers/uwb/ |
D | est.c | 68 .size = sizeof(struct uwb_rc_evt_ie_rcv), 72 .size = sizeof(struct uwb_rc_evt_beacon), 76 .size = sizeof(struct uwb_rc_evt_beacon_size), 79 .size = sizeof(struct uwb_rc_evt_bpoie_change), 84 .size = sizeof(struct uwb_rc_evt_bp_slot_change), 87 .size = sizeof(struct uwb_rc_evt_bp_switch_ie_rcv), 91 .size = sizeof(struct uwb_rc_evt_dev_addr_conflict), 94 .size = sizeof(struct uwb_rc_evt_drp_avail) 97 .size = sizeof(struct uwb_rc_evt_drp), 101 .size = sizeof(struct uwb_rc_evt_bp_switch_status), [all …]
|
/drivers/ntb/test/ |
D | ntb_tool.c | 130 resource_size_t size; member 190 size_t size, loff_t *offp, in tool_dbfn_read() argument 200 buf_size = min_t(size_t, size, 0x20); in tool_dbfn_read() 209 rc = simple_read_from_buffer(ubuf, size, offp, buf, pos); in tool_dbfn_read() 218 size_t size, loff_t *offp, in tool_dbfn_write() argument 227 buf = kmalloc(size + 1, GFP_KERNEL); in tool_dbfn_write() 231 rc = simple_write_to_buffer(buf, size, offp, ubuf, size); in tool_dbfn_write() 237 buf[size] = 0; in tool_dbfn_write() 259 return rc ? : size; in tool_dbfn_write() 263 size_t size, loff_t *offp, in tool_spadfn_read() argument [all …]
|
/drivers/infiniband/hw/cxgb3/ |
D | cxio_dbg.c | 45 int size = 32; in cxio_dump_tpt() local 47 m = kmalloc(sizeof(*m) + size, GFP_ATOMIC); in cxio_dump_tpt() 54 m->len = size; in cxio_dump_tpt() 64 while (size > 0) { in cxio_dump_tpt() 66 size -= 8; in cxio_dump_tpt() 78 int size, npages; in cxio_dump_pbl() local 82 size = npages * sizeof(u64); in cxio_dump_pbl() 84 m = kmalloc(sizeof(*m) + size, GFP_ATOMIC); in cxio_dump_pbl() 91 m->len = size; in cxio_dump_pbl() 102 while (size > 0) { in cxio_dump_pbl() [all …]
|
/drivers/acpi/ |
D | nvs.c | 22 __u64 size; member 29 static int suspend_nvs_register(unsigned long start, unsigned long size); 37 int acpi_nvs_register(__u64 start, __u64 size) in acpi_nvs_register() argument 45 region->size = size; in acpi_nvs_register() 48 return suspend_nvs_register(start, size); in acpi_nvs_register() 51 int acpi_nvs_for_each_region(int (*func)(__u64 start, __u64 size, void *data), in acpi_nvs_for_each_region() argument 58 rc = func(region->phys_start, region->size, data); in acpi_nvs_for_each_region() 76 unsigned int size; member 94 static int suspend_nvs_register(unsigned long start, unsigned long size) in suspend_nvs_register() argument 99 start, start + size - 1, size); in suspend_nvs_register() [all …]
|
/drivers/pnp/isapnp/ |
D | core.c | 364 static int __init isapnp_read_tag(unsigned char *type, unsigned short *size) in isapnp_read_tag() argument 374 *size = (tmp[1] << 8) | tmp[0]; in isapnp_read_tag() 377 *size = tag & 0x07; in isapnp_read_tag() 379 if (*type == 0xff && *size == 0xffff) /* probably invalid data */ in isapnp_read_tag() 396 int size, int number) in isapnp_parse_device() argument 403 isapnp_peek(tmp, size); in isapnp_parse_device() 425 int size) in isapnp_parse_irq_resource() argument 432 isapnp_peek(tmp, size); in isapnp_parse_irq_resource() 438 if (size > 2) in isapnp_parse_irq_resource() 449 int size) in isapnp_parse_dma_resource() argument [all …]
|
/drivers/mtd/ |
D | mtdconcat.c | 77 size_t size, retsize; in concat_read() local 79 if (from >= subdev->size) { in concat_read() 81 size = 0; in concat_read() 82 from -= subdev->size; in concat_read() 85 if (from + len > subdev->size) in concat_read() 87 size = subdev->size - from; in concat_read() 90 size = len; in concat_read() 92 err = mtd_read(subdev, from, size, &retsize, buf); in concat_read() 109 len -= size; in concat_read() 113 buf += size; in concat_read() [all …]
|
/drivers/base/ |
D | dma-mapping.c | 20 size_t size; member 29 dma_free_coherent(dev, this->size, this->vaddr, this->dma_handle); in dmam_coherent_release() 36 dma_free_noncoherent(dev, this->size, this->vaddr, this->dma_handle); in dmam_noncoherent_release() 44 WARN_ON(this->size != match->size || in dmam_match() 64 void *dmam_alloc_coherent(struct device *dev, size_t size, in dmam_alloc_coherent() argument 74 vaddr = dma_alloc_coherent(dev, size, dma_handle, gfp); in dmam_alloc_coherent() 82 dr->size = size; in dmam_alloc_coherent() 99 void dmam_free_coherent(struct device *dev, size_t size, void *vaddr, in dmam_free_coherent() argument 102 struct dma_devres match_data = { size, vaddr, dma_handle }; in dmam_free_coherent() 104 dma_free_coherent(dev, size, vaddr, dma_handle); in dmam_free_coherent() [all …]
|
/drivers/gpu/drm/nouveau/nvkm/core/ |
D | ioctl.c | 32 nvkm_ioctl_nop(struct nvkm_object *object, void *data, u32 size) in nvkm_ioctl_nop() argument 39 nvif_ioctl(object, "nop size %d\n", size); in nvkm_ioctl_nop() 40 if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))) { in nvkm_ioctl_nop() 49 nvkm_ioctl_sclass(struct nvkm_object *object, void *data, u32 size) in nvkm_ioctl_sclass() argument 57 nvif_ioctl(object, "sclass size %d\n", size); in nvkm_ioctl_sclass() 58 if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, true))) { in nvkm_ioctl_sclass() 61 if (size != args->v0.count * sizeof(args->v0.oclass[0])) in nvkm_ioctl_sclass() 81 nvkm_ioctl_new(struct nvkm_object *parent, void *data, u32 size) in nvkm_ioctl_new() argument 91 nvif_ioctl(parent, "new size %d\n", size); in nvkm_ioctl_new() 92 if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, true))) { in nvkm_ioctl_new() [all …]
|
/drivers/usb/host/ |
D | ohci-dbg.c | 22 #define ohci_dbg_sw(ohci, next, size, format, arg...) \ argument 26 s_len = scnprintf (*next, *size, format, ## arg ); \ 27 *size -= s_len; *next += s_len; \ 33 #define ohci_dbg_nosw(ohci, next, size, format, arg...) \ argument 36 s_len = scnprintf(*next, *size, format, ## arg); \ 37 *size -= s_len; *next += s_len; \ 46 unsigned *size) in ohci_dump_intr_mask() argument 48 ohci_dbg_sw (ohci, next, size, "%s 0x%08x%s%s%s%s%s%s%s%s%s\n", in ohci_dump_intr_mask() 68 unsigned *size) in maybe_print_eds() argument 71 ohci_dbg_sw (ohci, next, size, "%s %08x\n", label, value); in maybe_print_eds() [all …]
|
D | ehci-dbg.c | 388 unsigned size = *sizep; in qh_lines() local 408 temp = scnprintf(next, size, in qh_lines() 422 size -= temp; in qh_lines() 456 temp = scnprintf(next, size, in qh_lines() 465 size -= temp; in qh_lines() 467 if (temp == size) in qh_lines() 471 temp = scnprintf(next, size, "\n"); in qh_lines() 472 size -= temp; in qh_lines() 476 *sizep = size; in qh_lines() 485 unsigned temp, size; in fill_async_buffer() local [all …]
|
/drivers/net/wireless/ath/wil6210/ |
D | fw_inc.c | 46 static int wil_fw_verify(struct wil6210_priv *wil, const u8 *data, size_t size) in wil_fw_verify() argument 54 if (size % 4) { in wil_fw_verify() 55 wil_err_fw(wil, "image size not aligned: %zu\n", size); in wil_fw_verify() 59 if (size < sizeof(*hdr) + sizeof(fh)) { in wil_fw_verify() 60 wil_err_fw(wil, "file too short: %zu bytes\n", size); in wil_fw_verify() 77 if (size < dlen) { in wil_fw_verify() 79 size, (ulong)dlen); in wil_fw_verify() 122 size_t size) in fw_ignore_section() argument 128 size_t size) in fw_handle_comment() argument 130 wil_hex_dump_fw("", DUMP_PREFIX_OFFSET, 16, 1, data, size, true); in fw_handle_comment() [all …]
|
/drivers/s390/char/ |
D | raw3270.h | 102 size_t size; /* size of output buffer. */ member 111 struct raw3270_request *raw3270_request_alloc(size_t size); 112 struct raw3270_request *raw3270_request_alloc_bootmem(size_t size); 209 unsigned long size; member 218 unsigned long size; in alloc_string() local 220 size = (len + 7L) & -8L; in alloc_string() 222 if (cs->size < size) in alloc_string() 224 if (cs->size > size + sizeof(struct string)) { in alloc_string() 225 char *endaddr = (char *) (cs + 1) + cs->size; in alloc_string() 226 tmp = (struct string *) (endaddr - size) - 1; in alloc_string() [all …]
|
/drivers/vfio/pci/ |
D | vfio_pci_igd.c | 34 if (pos >= vdev->region[i].size || iswrite) in vfio_pci_igd_rw() 37 count = min(count, (size_t)(vdev->region[i].size - pos)); in vfio_pci_igd_rw() 61 u32 addr, size; in vfio_pci_igd_opregion_init() local 81 size = le32_to_cpu(*(__le32 *)(base + 16)); in vfio_pci_igd_opregion_init() 82 if (!size) { in vfio_pci_igd_opregion_init() 87 size *= 1024; /* In KB */ in vfio_pci_igd_opregion_init() 89 if (size != OPREGION_SIZE) { in vfio_pci_igd_opregion_init() 91 base = memremap(addr, size, MEMREMAP_WB); in vfio_pci_igd_opregion_init() 99 &vfio_pci_igd_regops, size, VFIO_REGION_INFO_FLAG_READ, base); in vfio_pci_igd_opregion_init() 120 size_t size; in vfio_pci_igd_cfg_rw() local [all …]
|
/drivers/scsi/lpfc/ |
D | lpfc_ct.c | 79 struct lpfc_dmabuf *mp, uint32_t size) in lpfc_ct_ignore_hbq_buffer() argument 90 size, piocbq->iocb.ulpStatus); in lpfc_ct_ignore_hbq_buffer() 95 struct lpfc_dmabuf *mp, uint32_t size) in lpfc_ct_unsol_buffer() argument 97 lpfc_ct_ignore_hbq_buffer(phba, piocbq, mp, size); in lpfc_ct_unsol_buffer() 109 uint32_t size; in lpfc_ct_unsol_event() local 143 size = icmd->un.cont64[0].tus.f.bdeSize; in lpfc_ct_unsol_event() 144 lpfc_ct_unsol_buffer(phba, piocbq, bdeBuf, size); in lpfc_ct_unsol_event() 149 size = icmd->unsli3.rcvsli3.bde2.tus.f.bdeSize; in lpfc_ct_unsol_event() 151 size); in lpfc_ct_unsol_event() 168 size = icmd->un.cont64[i].tus.f.bdeSize; in lpfc_ct_unsol_event() [all …]
|
/drivers/pci/host/ |
D | pci-thunder-ecam.c | 17 static void set_val(u32 v, int where, int size, u32 *val) in set_val() argument 23 if (size == 1) in set_val() 25 else if (size == 2) in set_val() 31 unsigned int devfn, int where, int size, u32 *val) in handle_ea_bar() argument 40 set_val(e0, where, size, val); in handle_ea_bar() 52 set_val(v, where, size, val); in handle_ea_bar() 71 set_val(v, where, size, val); in handle_ea_bar() 81 set_val(v, where, size, val); in handle_ea_bar() 88 int where, int size, u32 *val) in thunder_ecam_p2_config_read() argument 104 return pci_generic_config_read(bus, devfn, where, size, val); in thunder_ecam_p2_config_read() [all …]
|
/drivers/gpu/drm/armada/ |
D | armada_gem.c | 44 static size_t roundup_gem_size(size_t size) in roundup_gem_size() argument 46 return roundup(size, PAGE_SIZE); in roundup_gem_size() 62 unsigned int order = get_order(dobj->obj.size); in armada_gem_free_object() 91 size_t size = obj->obj.size; in armada_gem_linear_back() local 104 if (size <= 8192) { in armada_gem_linear_back() 105 unsigned int order = get_order(size); in armada_gem_linear_back() 113 memset(obj->addr, 0, PAGE_ALIGN(size)); in armada_gem_linear_back() 143 unsigned align = min_t(unsigned, size, SZ_2M); in armada_gem_linear_back() 152 ret = drm_mm_insert_node(&priv->linear, node, size, align, in armada_gem_linear_back() 163 ptr = ioremap_wc(obj->linear->start, size); in armada_gem_linear_back() [all …]
|
/drivers/mtd/maps/ |
D | scx200_docflash.c | 27 static unsigned size = 0x1000000; /* 16 MiB the whole ISA address space */ variable 33 module_param(size, int, 0); 34 MODULE_PARM_DESC(size, "Size of the flash mapping"); 51 .size = 0xc0000 56 .size = 0x40000 61 .size = ~0 /* calculate from flash size */ 66 .size = 0x80000 109 size = ((ctrl&0x1fff)<<13) + (1<<13); in init_scx200_docflash() 111 for (u = size; u > 1; u >>= 1) in init_scx200_docflash() 122 docmem.end = base + size; in init_scx200_docflash() [all …]
|
/drivers/of/ |
D | fdt.c | 154 static void *unflatten_dt_alloc(void **mem, unsigned long size, in unflatten_dt_alloc() argument 161 *mem += size; in unflatten_dt_alloc() 475 void *(*dt_alloc)(u64 size, u64 align), in __unflatten_device_tree() argument 478 int size; in __unflatten_device_tree() local 499 size = unflatten_dt_nodes(blob, NULL, dad, NULL); in __unflatten_device_tree() 500 if (size < 0) in __unflatten_device_tree() 503 size = ALIGN(size, 4); in __unflatten_device_tree() 504 pr_debug(" size is %d, allocating...\n", size); in __unflatten_device_tree() 507 mem = dt_alloc(size + 4, __alignof__(struct device_node)); in __unflatten_device_tree() 511 memset(mem, 0, size); in __unflatten_device_tree() [all …]
|
/drivers/gpu/drm/nouveau/nvif/ |
D | object.c | 31 nvif_object_ioctl(struct nvif_object *object, void *data, u32 size, void **hack) in nvif_object_ioctl() argument 38 if (size >= sizeof(*args) && args->v0.version == 0) { in nvif_object_ioctl() 48 data, size, hack); in nvif_object_ioctl() 66 u32 size; in nvif_object_sclass_get() local 69 size = sizeof(*args) + cnt * sizeof(args->sclass.oclass[0]); in nvif_object_sclass_get() 70 if (!(args = kmalloc(size, GFP_KERNEL))) in nvif_object_sclass_get() 77 ret = nvif_object_ioctl(object, args, size, NULL); in nvif_object_sclass_get() 103 nvif_object_rd(struct nvif_object *object, int size, u64 addr) in nvif_object_rd() argument 110 .rd.size = size, in nvif_object_rd() 122 nvif_object_wr(struct nvif_object *object, int size, u64 addr, u32 data) in nvif_object_wr() argument [all …]
|
/drivers/staging/wilc1000/ |
D | wilc_wlan_cfg.c | 220 static int wilc_wlan_cfg_set_str(u8 *frame, u32 offset, u16 id, u8 *str, u32 size) in wilc_wlan_cfg_set_str() argument 224 if ((offset + size + 3) >= MAX_CFG_FRAME_SIZE) in wilc_wlan_cfg_set_str() 231 buf[2] = (u8)size; in wilc_wlan_cfg_set_str() 233 if ((str) && (size != 0)) in wilc_wlan_cfg_set_str() 234 memcpy(&buf[3], str, size); in wilc_wlan_cfg_set_str() 236 return (size + 3); in wilc_wlan_cfg_set_str() 239 static int wilc_wlan_cfg_set_bin(u8 *frame, u32 offset, u16 id, u8 *b, u32 size) in wilc_wlan_cfg_set_bin() argument 245 if ((offset + size + 5) >= MAX_CFG_FRAME_SIZE) in wilc_wlan_cfg_set_bin() 251 buf[2] = (u8)size; in wilc_wlan_cfg_set_bin() 252 buf[3] = (u8)(size >> 8); in wilc_wlan_cfg_set_bin() [all …]
|
/drivers/xen/ |
D | swiotlb-xen.c | 127 static inline int range_straddles_page_boundary(phys_addr_t p, size_t size) in range_straddles_page_boundary() argument 132 if (offset + size <= XEN_PAGE_SIZE) in range_straddles_page_boundary() 134 if (check_pages_physically_contiguous(xen_pfn, offset, size)) in range_straddles_page_boundary() 159 xen_swiotlb_fixup(void *buf, size_t size, unsigned long nslabs) in xen_swiotlb_fixup() argument 295 xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size, in xen_swiotlb_alloc_coherent() argument 300 int order = get_order(size); in xen_swiotlb_alloc_coherent() 318 ret = xen_alloc_coherent_pages(hwdev, size, dma_handle, flags, attrs); in xen_swiotlb_alloc_coherent() 332 if (((dev_addr + size - 1 <= dma_mask)) && in xen_swiotlb_alloc_coherent() 333 !range_straddles_page_boundary(phys, size)) in xen_swiotlb_alloc_coherent() 338 xen_free_coherent_pages(hwdev, size, ret, (dma_addr_t)phys, attrs); in xen_swiotlb_alloc_coherent() [all …]
|
/drivers/staging/lustre/include/linux/libcfs/ |
D | libcfs_private.h | 90 #define LIBCFS_ALLOC_PRE(size, mask) \ argument 93 ((size) <= LIBCFS_VMALLOC_SIZE && \ 97 #define LIBCFS_ALLOC_POST(ptr, size) \ argument 101 #ptr "' = %d)\n", __FILE__, __LINE__, (int)(size)); \ 103 memset((ptr), 0, (size)); \ 110 #define LIBCFS_ALLOC_GFP(ptr, size, mask) \ argument 112 LIBCFS_ALLOC_PRE((size), (mask)); \ 113 (ptr) = (size) <= LIBCFS_VMALLOC_SIZE ? \ 114 kmalloc((size), (mask)) : vmalloc(size); \ 115 LIBCFS_ALLOC_POST((ptr), (size)); \ [all …]
|
/drivers/media/usb/pwc/ |
D | pwc-ctrl.c | 153 static int set_video_mode_Nala(struct pwc_device *pdev, int size, int pixfmt, in set_video_mode_Nala() argument 178 if (size < 0 || size > PSZ_CIF) in set_video_mode_Nala() 182 else if (size > PSZ_QCIF && frames > 15) in set_video_mode_Nala() 188 pEntry = &Nala_table[size][fps]; in set_video_mode_Nala() 205 pdev->width = pwc_image_sizes[size][0]; in set_video_mode_Nala() 206 pdev->height = pwc_image_sizes[size][1]; in set_video_mode_Nala() 228 static int set_video_mode_Timon(struct pwc_device *pdev, int size, int pixfmt, in set_video_mode_Timon() argument 234 if (size >= PSZ_MAX || *compression < 0 || *compression > 3) in set_video_mode_Timon() 238 else if (size == PSZ_VGA && frames > 15) in set_video_mode_Timon() 247 pChoose = &Timon_table[size][fps][*compression]; in set_video_mode_Timon() [all …]
|