Lines Matching refs:arr

1150 static int fill_from_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr,
1162 arr, arr_len);
1173 static int p_fill_from_dev_buffer(struct scsi_cmnd *scp, const void *arr,
1186 arr, arr_len, skip);
1196 * 'arr' or -1 if error.
1198 static int fetch_to_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr,
1206 return scsi_sg_copy_to_buffer(scp, arr, arr_len);
1218 /* Device identification VPD page. Returns number of bytes placed in arr */
1219 static int inquiry_vpd_83(unsigned char *arr, int port_group_id,
1229 arr[0] = 0x2; /* ASCII */
1230 arr[1] = 0x1;
1231 arr[2] = 0x0;
1232 memcpy(&arr[4], sdebug_inq_vendor_id, 8);
1233 memcpy(&arr[12], sdebug_inq_product_id, 16);
1234 memcpy(&arr[28], dev_id_str, dev_id_str_len);
1236 arr[3] = num;
1241 arr[num++] = 0x1; /* binary (not necessarily sas) */
1242 arr[num++] = 0xa; /* PIV=0, lu, naa */
1243 arr[num++] = 0x0;
1244 arr[num++] = 0x12;
1245 arr[num++] = 0x10; /* uuid type=1, locally assigned */
1246 arr[num++] = 0x0;
1247 memcpy(arr + num, lu_name, 16);
1251 arr[num++] = 0x1; /* binary (not necessarily sas) */
1252 arr[num++] = 0x3; /* PIV=0, lu, naa */
1253 arr[num++] = 0x0;
1254 arr[num++] = 0x8;
1255 put_unaligned_be64(naa3_comp_b + dev_id_num, arr + num);
1259 arr[num++] = 0x61; /* proto=sas, binary */
1260 arr[num++] = 0x94; /* PIV=1, target port, rel port */
1261 arr[num++] = 0x0; /* reserved */
1262 arr[num++] = 0x4; /* length */
1263 arr[num++] = 0x0; /* reserved */
1264 arr[num++] = 0x0; /* reserved */
1265 arr[num++] = 0x0;
1266 arr[num++] = 0x1; /* relative port A */
1269 arr[num++] = 0x61; /* proto=sas, binary */
1270 arr[num++] = 0x93; /* piv=1, target port, naa */
1271 arr[num++] = 0x0;
1272 arr[num++] = 0x8;
1273 put_unaligned_be64(naa3_comp_a + port_a, arr + num);
1276 arr[num++] = 0x61; /* proto=sas, binary */
1277 arr[num++] = 0x95; /* piv=1, target port group id */
1278 arr[num++] = 0x0;
1279 arr[num++] = 0x4;
1280 arr[num++] = 0;
1281 arr[num++] = 0;
1282 put_unaligned_be16(port_group_id, arr + num);
1285 arr[num++] = 0x61; /* proto=sas, binary */
1286 arr[num++] = 0xa3; /* piv=1, target device, naa */
1287 arr[num++] = 0x0;
1288 arr[num++] = 0x8;
1289 put_unaligned_be64(naa3_comp_a + target_dev_id, arr + num);
1292 arr[num++] = 0x63; /* proto=sas, UTF-8 */
1293 arr[num++] = 0xa8; /* piv=1, target device, SCSI name string */
1294 arr[num++] = 0x0;
1295 arr[num++] = 24;
1296 memcpy(arr + num, "naa.32222220", 12);
1299 memcpy(arr + num, b, 8);
1301 memset(arr + num, 0, 4);
1313 static int inquiry_vpd_84(unsigned char *arr)
1315 memcpy(arr, vpd84_data, sizeof(vpd84_data));
1320 static int inquiry_vpd_85(unsigned char *arr)
1327 arr[num++] = 0x1; /* lu, storage config */
1328 arr[num++] = 0x0; /* reserved */
1329 arr[num++] = 0x0;
1334 arr[num++] = plen; /* length, null termianted, padded */
1335 memcpy(arr + num, na1, olen);
1336 memset(arr + num + olen, 0, plen - olen);
1339 arr[num++] = 0x4; /* lu, logging */
1340 arr[num++] = 0x0; /* reserved */
1341 arr[num++] = 0x0;
1346 arr[num++] = plen; /* length, null terminated, padded */
1347 memcpy(arr + num, na2, olen);
1348 memset(arr + num + olen, 0, plen - olen);
1355 static int inquiry_vpd_88(unsigned char *arr, int target_dev_id)
1362 arr[num++] = 0x0; /* reserved */
1363 arr[num++] = 0x0; /* reserved */
1364 arr[num++] = 0x0;
1365 arr[num++] = 0x1; /* relative port 1 (primary) */
1366 memset(arr + num, 0, 6);
1368 arr[num++] = 0x0;
1369 arr[num++] = 12; /* length tp descriptor */
1371 arr[num++] = 0x61; /* proto=sas, binary */
1372 arr[num++] = 0x93; /* PIV=1, target port, NAA */
1373 arr[num++] = 0x0; /* reserved */
1374 arr[num++] = 0x8; /* length */
1375 put_unaligned_be64(naa3_comp_a + port_a, arr + num);
1377 arr[num++] = 0x0; /* reserved */
1378 arr[num++] = 0x0; /* reserved */
1379 arr[num++] = 0x0;
1380 arr[num++] = 0x2; /* relative port 2 (secondary) */
1381 memset(arr + num, 0, 6);
1383 arr[num++] = 0x0;
1384 arr[num++] = 12; /* length tp descriptor */
1386 arr[num++] = 0x61; /* proto=sas, binary */
1387 arr[num++] = 0x93; /* PIV=1, target port, NAA */
1388 arr[num++] = 0x0; /* reserved */
1389 arr[num++] = 0x8; /* length */
1390 put_unaligned_be64(naa3_comp_a + port_b, arr + num);
1442 static int inquiry_vpd_89(unsigned char *arr)
1444 memcpy(arr, vpd89_data, sizeof(vpd89_data));
1457 static int inquiry_vpd_b0(unsigned char *arr)
1461 memcpy(arr, vpdb0_data, sizeof(vpdb0_data));
1469 put_unaligned_be16(gran, arr + 2);
1473 put_unaligned_be32(sdebug_store_sectors, arr + 4);
1476 put_unaligned_be32(sdebug_opt_blks, &arr[8]);
1480 put_unaligned_be32(sdebug_unmap_max_blocks, &arr[16]);
1483 put_unaligned_be32(sdebug_unmap_max_desc, &arr[20]);
1488 put_unaligned_be32(sdebug_unmap_alignment, &arr[28]);
1489 arr[28] |= 0x80; /* UGAVALID */
1493 put_unaligned_be32(sdebug_unmap_granularity, &arr[24]);
1496 put_unaligned_be64(sdebug_write_same_length, &arr[32]);
1504 static int inquiry_vpd_b1(struct sdebug_dev_info *devip, unsigned char *arr)
1506 memset(arr, 0, 0x3c);
1507 arr[0] = 0;
1508 arr[1] = 1; /* non rotating medium (e.g. solid state) */
1509 arr[2] = 0;
1510 arr[3] = 5; /* less than 1.8" */
1512 arr[4] = 1 << 4; /* zoned field = 01b */
1518 static int inquiry_vpd_b2(unsigned char *arr)
1520 memset(arr, 0, 0x4);
1521 arr[0] = 0; /* threshold exponent */
1523 arr[1] = 1 << 7;
1525 arr[1] |= 1 << 6;
1527 arr[1] |= 1 << 5;
1529 arr[1] |= (sdebug_lbprz & 0x7) << 2; /* sbc4r07 and later */
1537 static int inquiry_vpd_b6(struct sdebug_dev_info *devip, unsigned char *arr)
1539 memset(arr, 0, 0x3c);
1540 arr[0] = 0x1; /* set URSWRZ (unrestricted read in seq. wr req zone) */
1547 put_unaligned_be32(0xffffffff, &arr[4]);
1548 put_unaligned_be32(0xffffffff, &arr[8]);
1550 put_unaligned_be32(devip->max_open, &arr[12]);
1552 put_unaligned_be32(0xffffffff, &arr[12]);
1562 unsigned char *arr;
1569 arr = kzalloc(SDEBUG_MAX_INQ_ARR_SZ, GFP_ATOMIC);
1570 if (! arr)
1582 arr[0] = pq_pdt;
1585 kfree(arr);
1603 arr[1] = cmd[2]; /*sanity */
1605 arr[n++] = 0x0; /* this page */
1606 arr[n++] = 0x80; /* unit serial number */
1607 arr[n++] = 0x83; /* device identification */
1608 arr[n++] = 0x84; /* software interface ident. */
1609 arr[n++] = 0x85; /* management network addresses */
1610 arr[n++] = 0x86; /* extended inquiry */
1611 arr[n++] = 0x87; /* mode page policy */
1612 arr[n++] = 0x88; /* SCSI ports */
1614 arr[n++] = 0x89; /* ATA information */
1615 arr[n++] = 0xb0; /* Block limits */
1616 arr[n++] = 0xb1; /* Block characteristics */
1618 arr[n++] = 0xb2; /* LB Provisioning */
1620 arr[n++] = 0xb6; /* ZB dev. char. */
1622 arr[3] = n - 4; /* number of supported VPD pages */
1624 arr[1] = cmd[2]; /*sanity */
1625 arr[3] = len;
1626 memcpy(&arr[4], lu_id_str, len);
1628 arr[1] = cmd[2]; /*sanity */
1629 arr[3] = inquiry_vpd_83(&arr[4], port_group_id,
1634 arr[1] = cmd[2]; /*sanity */
1635 arr[3] = inquiry_vpd_84(&arr[4]);
1637 arr[1] = cmd[2]; /*sanity */
1638 arr[3] = inquiry_vpd_85(&arr[4]);
1640 arr[1] = cmd[2]; /*sanity */
1641 arr[3] = 0x3c; /* number of following entries */
1643 arr[4] = 0x4; /* SPT: GRD_CHK:1 */
1645 arr[4] = 0x5; /* SPT: GRD_CHK:1, REF_CHK:1 */
1647 arr[4] = 0x0; /* no protection stuff */
1648 arr[5] = 0x7; /* head of q, ordered + simple q's */
1650 arr[1] = cmd[2]; /*sanity */
1651 arr[3] = 0x8; /* number of following entries */
1652 arr[4] = 0x2; /* disconnect-reconnect mp */
1653 arr[6] = 0x80; /* mlus, shared */
1654 arr[8] = 0x18; /* protocol specific lu */
1655 arr[10] = 0x82; /* mlus, per initiator port */
1657 arr[1] = cmd[2]; /*sanity */
1658 arr[3] = inquiry_vpd_88(&arr[4], target_dev_id);
1660 arr[1] = cmd[2]; /*sanity */
1661 n = inquiry_vpd_89(&arr[4]);
1662 put_unaligned_be16(n, arr + 2);
1664 arr[1] = cmd[2]; /*sanity */
1665 arr[3] = inquiry_vpd_b0(&arr[4]);
1667 arr[1] = cmd[2]; /*sanity */
1668 arr[3] = inquiry_vpd_b1(devip, &arr[4]);
1670 arr[1] = cmd[2]; /*sanity */
1671 arr[3] = inquiry_vpd_b2(&arr[4]);
1673 arr[1] = cmd[2]; /*sanity */
1674 arr[3] = inquiry_vpd_b6(devip, &arr[4]);
1677 kfree(arr);
1680 len = min_t(u32, get_unaligned_be16(arr + 2) + 4, alloc_len);
1681 ret = fill_from_dev_buffer(scp, arr,
1683 kfree(arr);
1687 arr[1] = sdebug_removable ? 0x80 : 0; /* Removable disk */
1688 arr[2] = sdebug_scsi_level;
1689 arr[3] = 2; /* response_data_format==2 */
1690 arr[4] = SDEBUG_LONG_INQ_SZ - 5;
1691 arr[5] = (int)have_dif_prot; /* PROTECT bit */
1693 arr[5] |= 0x10; /* claim: implicit TPGS */
1694 arr[6] = 0x10; /* claim: MultiP */
1695 /* arr[6] |= 0x40; ... claim: EncServ (enclosure services) */
1696 arr[7] = 0xa; /* claim: LINKED + CMDQUE */
1697 memcpy(&arr[8], sdebug_inq_vendor_id, 8);
1698 memcpy(&arr[16], sdebug_inq_product_id, 16);
1699 memcpy(&arr[32], sdebug_inq_product_rev, 4);
1701 memcpy(&arr[36], sdebug_version_date, 8);
1703 put_unaligned_be16(0xc0, arr + 58); /* SAM-6 no version claimed */
1704 put_unaligned_be16(0x5c0, arr + 60); /* SPC-5 no version claimed */
1707 put_unaligned_be16(0x600, arr + n);
1710 put_unaligned_be16(0x525, arr + n);
1713 put_unaligned_be16(0x624, arr + n);
1716 put_unaligned_be16(0x2100, arr + n); /* SPL-4 no version claimed */
1717 ret = fill_from_dev_buffer(scp, arr,
1719 kfree(arr);
1731 unsigned char arr[SCSI_SENSE_BUFFERSIZE]; /* assume >= 18 bytes */
1737 memset(arr, 0, sizeof(arr));
1740 arr[0] = 0x72;
1741 arr[1] = NOT_READY;
1742 arr[2] = LOGICAL_UNIT_NOT_READY;
1743 arr[3] = (stopped_state == 2) ? 0x1 : 0x2;
1746 arr[0] = 0x70;
1747 arr[2] = NOT_READY; /* NO_SENSE in sense_key */
1748 arr[7] = 0xa; /* 18 byte sense buffer */
1749 arr[12] = LOGICAL_UNIT_NOT_READY;
1750 arr[13] = (stopped_state == 2) ? 0x1 : 0x2;
1755 arr[0] = 0x72;
1756 arr[1] = 0x0; /* NO_SENSE in sense_key */
1757 arr[2] = THRESHOLD_EXCEEDED;
1758 arr[3] = 0xff; /* Failure prediction(false) */
1761 arr[0] = 0x70;
1762 arr[2] = 0x0; /* NO_SENSE in sense_key */
1763 arr[7] = 0xa; /* 18 byte sense buffer */
1764 arr[12] = THRESHOLD_EXCEEDED;
1765 arr[13] = 0xff; /* Failure prediction(false) */
1770 memset(arr, 0, len);
1771 arr[0] = 0x72;
1773 memset(arr, 0, len);
1774 arr[0] = 0x70;
1775 arr[7] = 0xa;
1778 return fill_from_dev_buffer(scp, arr, min_t(u32, len, alloc_len));
1839 unsigned char arr[SDEBUG_READCAP_ARR_SZ];
1844 memset(arr, 0, SDEBUG_READCAP_ARR_SZ);
1847 put_unaligned_be32(capac, arr + 0);
1849 put_unaligned_be32(0xffffffff, arr + 0);
1850 put_unaligned_be16(sdebug_sector_size, arr + 6);
1851 return fill_from_dev_buffer(scp, arr, SDEBUG_READCAP_ARR_SZ);
1859 unsigned char arr[SDEBUG_READCAP16_ARR_SZ];
1865 memset(arr, 0, SDEBUG_READCAP16_ARR_SZ);
1866 put_unaligned_be64((u64)(sdebug_capacity - 1), arr + 0);
1867 put_unaligned_be32(sdebug_sector_size, arr + 8);
1868 arr[13] = sdebug_physblk_exp & 0xf;
1869 arr[14] = (sdebug_lowest_aligned >> 8) & 0x3f;
1872 arr[14] |= 0x80; /* LBPME */
1878 arr[14] |= 0x40;
1886 arr[12] |= 1 << 4;
1888 arr[15] = sdebug_lowest_aligned & 0xff;
1891 arr[12] = (sdebug_dif - 1) << 1; /* P_TYPE */
1892 arr[12] |= 1; /* PROT_EN */
1895 return fill_from_dev_buffer(scp, arr,
1905 unsigned char *arr;
1912 arr = kzalloc(SDEBUG_MAX_TGTPGS_ARR_SZ, GFP_ATOMIC);
1913 if (! arr)
1933 arr[n++] = host_no % 3; /* Asymm access state */
1934 arr[n++] = 0x0F; /* claim: all states are supported */
1936 arr[n++] = 0x0; /* Active/Optimized path */
1937 arr[n++] = 0x01; /* only support active/optimized paths */
1939 put_unaligned_be16(port_group_a, arr + n);
1941 arr[n++] = 0; /* Reserved */
1942 arr[n++] = 0; /* Status code */
1943 arr[n++] = 0; /* Vendor unique */
1944 arr[n++] = 0x1; /* One port per group */
1945 arr[n++] = 0; /* Reserved */
1946 arr[n++] = 0; /* Reserved */
1947 put_unaligned_be16(port_a, arr + n);
1949 arr[n++] = 3; /* Port unavailable */
1950 arr[n++] = 0x08; /* claim: only unavailalbe paths are supported */
1951 put_unaligned_be16(port_group_b, arr + n);
1953 arr[n++] = 0; /* Reserved */
1954 arr[n++] = 0; /* Status code */
1955 arr[n++] = 0; /* Vendor unique */
1956 arr[n++] = 0x1; /* One port per group */
1957 arr[n++] = 0; /* Reserved */
1958 arr[n++] = 0; /* Reserved */
1959 put_unaligned_be16(port_b, arr + n);
1963 put_unaligned_be32(rlen, arr + 0);
1972 ret = fill_from_dev_buffer(scp, arr,
1974 kfree(arr);
1988 u8 *arr;
2004 arr = kzalloc((a_len < 256) ? 320 : a_len + 64, GFP_ATOMIC);
2005 if (NULL == arr) {
2020 put_unaligned_be32(count * bump, arr);
2026 arr[offset] = oip->opcode;
2027 put_unaligned_be16(oip->sa, arr + offset + 2);
2029 arr[offset + 5] |= 0x2;
2031 arr[offset + 5] |= 0x1;
2032 put_unaligned_be16(oip->len_mask[0], arr + offset + 6);
2034 put_unaligned_be16(0xa, arr + offset + 8);
2040 arr[offset] = oip->opcode;
2041 put_unaligned_be16(oip->sa, arr + offset + 2);
2043 arr[offset + 5] |= 0x2;
2045 arr[offset + 5] |= 0x1;
2047 arr + offset + 6);
2050 arr + offset + 8);
2069 kfree(arr);
2076 kfree(arr); /* point at requested sa */
2102 put_unaligned_be16(u, arr + 2);
2103 arr[4] = oip->opcode;
2105 arr[4 + k] = (k < 16) ?
2111 arr[1] = (rctd ? 0x80 : 0) | supp;
2113 put_unaligned_be16(0xa, arr + offset);
2119 kfree(arr);
2124 errsts = fill_from_dev_buffer(scp, arr, len);
2125 kfree(arr);
2134 u8 arr[16];
2137 memset(arr, 0, sizeof(arr));
2144 arr[0] = 0xc8; /* ATS | ATSS | LURS */
2145 arr[1] = 0x1; /* ITNRS */
2147 arr[3] = 0xc;
2153 return fill_from_dev_buffer(scp, arr, len);
2327 unsigned char arr[SDEBUG_MAX_MSENSE_SZ];
2344 memset(arr, 0, SDEBUG_MAX_MSENSE_SZ);
2359 arr[2] = dev_spec;
2360 arr[3] = bd_len;
2363 arr[3] = dev_spec;
2365 arr[4] = 0x1; /* set LONGLBA bit */
2366 arr[7] = bd_len; /* assume 255 or less */
2369 ap = arr + offset;
2380 ap = arr + offset;
2385 ap = arr + offset;
2477 arr[0] = offset - 1;
2479 put_unaligned_be16((offset - 2), arr + 0);
2480 return fill_from_dev_buffer(scp, arr, min_t(u32, alloc_len, offset));
2490 unsigned char arr[SDEBUG_MAX_MSELECT_SZ];
2494 memset(arr, 0, sizeof(arr));
2502 res = fetch_to_dev_buffer(scp, arr, param_len);
2509 md_len = mselect6 ? (arr[0] + 1) : (get_unaligned_be16(arr + 0) + 2);
2510 bd_len = mselect6 ? arr[3] : get_unaligned_be16(arr + 6);
2516 mpage = arr[off] & 0x3f;
2517 ps = !!(arr[off] & 0x80);
2522 spf = !!(arr[off] & 0x40);
2523 pg_len = spf ? (get_unaligned_be16(arr + off + 2) + 4) :
2524 (arr[off + 1] + 2);
2532 if (caching_pg[1] == arr[off + 1]) {
2533 memcpy(caching_pg + 2, arr + off + 2,
2539 if (ctrl_m_pg[1] == arr[off + 1]) {
2540 memcpy(ctrl_m_pg + 2, arr + off + 2,
2551 if (iec_m_pg[1] == arr[off + 1]) {
2552 memcpy(iec_m_pg + 2, arr + off + 2,
2567 static int resp_temp_l_pg(unsigned char *arr)
2573 memcpy(arr, temp_l_pg, sizeof(temp_l_pg));
2577 static int resp_ie_l_pg(unsigned char *arr)
2582 memcpy(arr, ie_l_pg, sizeof(ie_l_pg));
2584 arr[4] = THRESHOLD_EXCEEDED;
2585 arr[5] = 0xff;
2597 unsigned char arr[SDEBUG_MAX_LSENSE_SZ];
2600 memset(arr, 0, sizeof(arr));
2610 arr[0] = pcode;
2615 arr[n++] = 0x0; /* this page */
2616 arr[n++] = 0xd; /* Temperature */
2617 arr[n++] = 0x2f; /* Informational exceptions */
2618 arr[3] = n - 4;
2621 arr[3] = resp_temp_l_pg(arr + 4);
2624 arr[3] = resp_ie_l_pg(arr + 4);
2631 arr[0] |= 0x40;
2632 arr[1] = subpcode;
2636 arr[n++] = 0x0;
2637 arr[n++] = 0x0; /* 0,0 page */
2638 arr[n++] = 0x0;
2639 arr[n++] = 0xff; /* this page */
2640 arr[n++] = 0xd;
2641 arr[n++] = 0x0; /* Temperature */
2642 arr[n++] = 0x2f;
2643 arr[n++] = 0x0; /* Informational exceptions */
2644 arr[3] = n - 4;
2648 arr[n++] = 0xd;
2649 arr[n++] = 0x0; /* Temperature */
2650 arr[3] = n - 4;
2654 arr[n++] = 0x2f;
2655 arr[n++] = 0x0; /* Informational exceptions */
2656 arr[3] = n - 4;
2666 len = min_t(u32, get_unaligned_be16(arr + 2) + 4, alloc_len);
2667 return fill_from_dev_buffer(scp, arr,
2987 /* If sip->storep+lba compares equal to arr(num), then copy top half of
2988 * arr into sip->storep+lba and return true. If comparison fails then
2991 const u8 *arr, bool compare_only)
3003 res = !memcmp(fsp + (block * lb_size), arr, (num - rest) * lb_size);
3007 res = memcmp(fsp, arr + ((num - rest) * lb_size),
3013 arr += num * lb_size;
3014 memcpy(fsp + (block * lb_size), arr, (num - rest) * lb_size);
3016 memcpy(fsp, arr + ((num - rest) * lb_size), rest * lb_size);
3892 u8 *arr;
3920 arr = kcalloc(lb_size, dnum, GFP_ATOMIC);
3921 if (NULL == arr) {
3929 ret = do_dout_fetch(scp, dnum, arr);
3937 if (!comp_write_worker(sip, lba, num, arr, false)) {
3946 kfree(arr);
4021 u8 arr[SDEBUG_GET_LBA_STATUS_LEN];
4047 memset(arr, 0, SDEBUG_GET_LBA_STATUS_LEN);
4048 put_unaligned_be32(20, arr); /* Parameter Data Length */
4049 put_unaligned_be64(lba, arr + 8); /* LBA */
4050 put_unaligned_be32(num, arr + 16); /* Number of blocks */
4051 arr[20] = !mapped; /* prov_stat=0: mapped; 1: dealloc */
4053 return fill_from_dev_buffer(scp, arr, SDEBUG_GET_LBA_STATUS_LEN);
4150 u8 arr[RL_BUCKET_ELEMS * sizeof(struct scsi_lun)];
4204 memset(arr, 0, sizeof(arr));
4205 lun_p = (struct scsi_lun *)&arr[0];
4207 put_unaligned_be32(rlen, &arr[0]);
4221 res = p_fill_from_dev_buffer(scp, arr, n, off_rsp);
4231 res = p_fill_from_dev_buffer(scp, arr, j * sz_lun, off_rsp);
4243 u8 *arr;
4278 arr = kcalloc(lb_size, vnum, GFP_ATOMIC | __GFP_NOWARN);
4279 if (!arr) {
4287 ret = do_dout_fetch(scp, a_num, arr);
4298 memcpy(arr + off, arr, lb_size);
4301 if (!comp_write_worker(sip, lba, vnum, arr, true)) {
4308 kfree(arr);
4323 u8 *arr = NULL, *desc;
4349 arr = kzalloc(alloc_len, GFP_ATOMIC | __GFP_NOWARN);
4350 if (!arr) {
4358 desc = arr + 64;
4437 put_unaligned_be32(nrz * RZONES_DESC_HD, arr + 0);
4438 put_unaligned_be64(sdebug_capacity - 1, arr + 8);
4440 rep_len = (unsigned long)desc - (unsigned long)arr;
4441 ret = fill_from_dev_buffer(scp, arr, min_t(u32, alloc_len, rep_len));
4445 kfree(arr);
5765 char arr[16];
5771 memcpy(arr, buffer, minLen);
5772 arr[minLen] = '\0';
5773 if (1 != sscanf(arr, "%d", &opts))