Lines Matching full:length
57 int length = sizeof(*hdr); in usb_desc_msos_compat() local
60 func = (void *)(dest + length); in usb_desc_msos_compat()
67 length += sizeof(*func); in usb_desc_msos_compat()
70 hdr->dwLength = cpu_to_le32(length); in usb_desc_msos_compat()
76 return length; in usb_desc_msos_compat()
117 int length = wcslen(name) + 1; in usb_desc_msos_prop_name() local
120 prop->dwPropertyNameLength_lo = usb_lo(length*2); in usb_desc_msos_prop_name()
121 prop->dwPropertyNameLength_hi = usb_hi(length*2); in usb_desc_msos_prop_name()
122 for (i = 0; i < length; i++) { in usb_desc_msos_prop_name()
126 return length*2; in usb_desc_msos_prop_name()
134 int length = sizeof(*prop); in usb_desc_msos_prop_str() local
138 length += usb_desc_msos_prop_name(prop, name); in usb_desc_msos_prop_str()
139 data = (void *)(dest + length); in usb_desc_msos_prop_str()
142 length += sizeof(*prop); in usb_desc_msos_prop_str()
148 length += vlen*2; in usb_desc_msos_prop_str()
150 prop->dwLength = cpu_to_le32(length); in usb_desc_msos_prop_str()
151 return length; in usb_desc_msos_prop_str()
159 int length = sizeof(*prop); in usb_desc_msos_prop_dword() local
162 length += usb_desc_msos_prop_name(prop, name); in usb_desc_msos_prop_dword()
163 data = (void *)(dest + length); in usb_desc_msos_prop_dword()
170 length += sizeof(*prop) + 4; in usb_desc_msos_prop_dword()
172 prop->dwLength = cpu_to_le32(length); in usb_desc_msos_prop_dword()
173 return length; in usb_desc_msos_prop_dword()
179 int length = sizeof(*hdr); in usb_desc_msos_prop() local
187 length += usb_desc_msos_prop_str(dest+length, MSOS_REG_SZ, in usb_desc_msos_prop()
199 length += usb_desc_msos_prop_dword(dest+length, in usb_desc_msos_prop()
204 hdr->dwLength = cpu_to_le32(length); in usb_desc_msos_prop()
211 return length; in usb_desc_msos_prop()
220 int length = 0; in usb_desc_msos() local
224 length = usb_desc_msos_compat(desc, buf); in usb_desc_msos()
227 length = usb_desc_msos_prop(desc, buf); in usb_desc_msos()
231 if (length > len) { in usb_desc_msos()
232 length = len; in usb_desc_msos()
234 memcpy(dest, buf, length); in usb_desc_msos()
237 p->actual_length = length; in usb_desc_msos()