Lines Matching defs:buf

242 	uint8_t *data_ptr;		/* Ptr to the data buf/SG list */
1689 uint8_t buf = 0;
1699 err = usbd_do_request(sc->sc_udev, NULL, &req, &buf);
1701 buf = 0;
1707 return (buf);
1738 uint8_t buf[UMASS_CBI_DIAGNOSTIC_CMDLEN];
1776 buf[0] = 0x1d; /* Command Block Reset */
1777 buf[1] = 0x04;
1780 buf[i] = 0xff;
1786 usbd_copy_in(pc, 0, buf, sizeof(buf));
1789 usbd_xfer_set_frame_len(xfer, 1, sizeof(buf));
2781 unsigned int nsectors, unsigned char *buf)
2784 uint8_t *data_buf = buf;
2818 if (!LOS_IsUserAddressRange((vaddr_t)buf, blocksize * nsectors - sc->data_ccb->csio.resid)) {
2819 ret = memcpy_s(buf, nsectors * blocksize, data_buf, blocksize * nsectors - sc->data_ccb->csio.resid);
2822 LOS_ArchCopyToUser(buf, data_buf, blocksize * nsectors - sc->data_ccb->csio.resid) : ERANGE_AND_RESET);
2840 unsigned int nsectors, unsigned char *buf)
2843 uint8_t *data_buf = buf;
2877 if (!LOS_IsUserAddressRange((vaddr_t)buf, blocksize * nsectors - sc->data_ccb->csio.resid)) {
2878 ret = memcpy_s(buf, nsectors * blocksize, data_buf, blocksize * nsectors - sc->data_ccb->csio.resid);
2881 LOS_ArchCopyToUser(buf, data_buf, blocksize * nsectors - sc->data_ccb->csio.resid) : ERANGE_AND_RESET);
2899 unsigned int nsectors, const unsigned char *buf)
2902 uint8_t *data_buf = (uint8_t *)buf;
2921 if (!LOS_IsUserAddressRange((vaddr_t)buf, blocksize * nsectors)) {
2922 (void)memcpy_s(data_buf, blocksize * nsectors, buf, blocksize * nsectors);
2924 ret = LOS_ArchCopyFromUser(data_buf, buf, blocksize * nsectors);
2954 unsigned int nsectors, const unsigned char *buf)
2957 uint8_t *data_buf = (uint8_t *)buf;
2979 if (!LOS_IsUserAddressRange((vaddr_t)buf, blocksize * nsectors)) {
2980 (void)memcpy_s(data_buf, blocksize * nsectors, buf, blocksize * nsectors);
2982 ret = LOS_ArchCopyFromUser(data_buf, buf, blocksize * nsectors);