Lines Matching refs:p
246 const struct efi_device_path *p = dp; in efi_dp_size() local
248 if (!p) in efi_dp_size()
250 while (p->type != DEVICE_PATH_TYPE_END || in efi_dp_size()
251 p->sub_type != DEVICE_PATH_SUB_TYPE_END) in efi_dp_size()
252 p = (void *)p + p->length; in efi_dp_size()
254 return (void *)p - (void *)dp; in efi_dp_size()
290 void *p = dp_alloc(sz1 + sz2 + sizeof(END)); in efi_dp_append() local
291 if (!p) in efi_dp_append()
293 memcpy(p, dp1, sz1); in efi_dp_append()
295 memcpy(p + sz1, dp2, sz2 + sizeof(END)); in efi_dp_append()
296 ret = p; in efi_dp_append()
313 void *p = dp_alloc(sz + sizeof(END)); in efi_dp_append_node() local
314 if (!p) in efi_dp_append_node()
316 memcpy(p, node, sz); in efi_dp_append_node()
317 memcpy(p + sz, &END, sizeof(END)); in efi_dp_append_node()
318 ret = p; in efi_dp_append_node()
322 void *p = dp_alloc(sz + node->length + sizeof(END)); in efi_dp_append_node() local
323 if (!p) in efi_dp_append_node()
325 memcpy(p, dp, sz); in efi_dp_append_node()
326 memcpy(p + sz, node, node->length); in efi_dp_append_node()
327 memcpy(p + sz + node->length, &END, sizeof(END)); in efi_dp_append_node()
328 ret = p; in efi_dp_append_node()
354 struct efi_device_path *p, *ret; in efi_dp_append_instance() local
362 p = dp_alloc(sz + szi + 2 * sizeof(END)); in efi_dp_append_instance()
363 if (!p) in efi_dp_append_instance()
365 ret = p; in efi_dp_append_instance()
366 memcpy(p, dp, sz + sizeof(END)); in efi_dp_append_instance()
367 p = (void *)p + sz; in efi_dp_append_instance()
368 p->sub_type = DEVICE_PATH_SUB_TYPE_INSTANCE_END; in efi_dp_append_instance()
369 p = (void *)p + sizeof(END); in efi_dp_append_instance()
370 memcpy(p, dpi, szi); in efi_dp_append_instance()
371 p = (void *)p + szi; in efi_dp_append_instance()
372 memcpy(p, &END, sizeof(END)); in efi_dp_append_instance()
380 struct efi_device_path *p; in efi_dp_get_next_instance() local
387 p = dp_alloc(sz + sizeof(END)); in efi_dp_get_next_instance()
388 if (!p) in efi_dp_get_next_instance()
390 memcpy(p, *dp, sz + sizeof(END)); in efi_dp_get_next_instance()
398 return p; in efi_dp_get_next_instance()
403 const struct efi_device_path *p = dp; in efi_dp_is_multi_instance() local
405 if (!p) in efi_dp_is_multi_instance()
407 while (p->type != DEVICE_PATH_TYPE_END) in efi_dp_is_multi_instance()
408 p = (void *)p + p->length; in efi_dp_is_multi_instance()
409 return p->sub_type == DEVICE_PATH_SUB_TYPE_INSTANCE_END; in efi_dp_is_multi_instance()
929 struct efi_device_path *p, *dp, *fp; in efi_dp_split_file_path() local
936 p = dp; in efi_dp_split_file_path()
937 while (!EFI_DP_TYPE(p, MEDIA_DEVICE, FILE_PATH)) { in efi_dp_split_file_path()
938 p = efi_dp_next(p); in efi_dp_split_file_path()
939 if (!p) in efi_dp_split_file_path()
942 fp = efi_dp_dup(p); in efi_dp_split_file_path()
945 p->type = DEVICE_PATH_TYPE_END; in efi_dp_split_file_path()
946 p->sub_type = DEVICE_PATH_SUB_TYPE_END; in efi_dp_split_file_path()
947 p->length = sizeof(*p); in efi_dp_split_file_path()