Lines Matching defs:len
1196 static int init_pci_cap_msi_perm(struct perm_bits *perm, int len, u16 flags)
1198 if (alloc_perm_bits(perm, len))
1233 int len, ret;
1240 len = 10; /* Minimum size */
1242 len += 4;
1244 len += 10;
1247 return len;
1253 ret = init_pci_cap_msi_perm(vdev->msi_perm, len, flags);
1259 return len;
1268 int len = PCI_CAP_VC_BASE_SIZEOF;
1296 len += (1 + evcc) * PCI_CAP_VC_PER_VC_SIZEOF;
1298 len = round_up(len, 16);
1299 len += vc_arb / 8;
1301 return len;
1543 int i, len = 0;
1560 len = pci_cap_length[cap];
1561 if (len == 0xFF) { /* Variable length */
1562 len = vfio_cap_len(vdev, cap, pos);
1563 if (len < 0)
1564 return len;
1568 if (!len) {
1577 for (i = 0; i < len; i++) {
1587 memset(map + pos, cap, len);
1588 ret = vfio_fill_vconfig_bytes(vdev, pos, len);
1627 int i, len = 0;
1637 len = pci_ext_cap_length[ecap];
1638 if (len == 0xFF) {
1639 len = vfio_ext_cap_len(vdev, ecap, epos);
1640 if (len < 0)
1641 return len;
1645 if (!len) {
1661 len = PCI_CAP_SIZEOF;
1665 for (i = 0; i < len; i++) {
1680 memset(map + epos, ecap, len);
1681 ret = vfio_fill_vconfig_bytes(vdev, epos, len);