• Home
  • Raw
  • Download

Lines Matching refs:len

59 	return (u8 *)block->cn - (u8 *)block->first_cn + block->cn->len;  in w1_reply_len()
65 u16 len = w1_reply_len(block); in w1_unref_block() local
66 if (len) { in w1_unref_block()
67 cn_netlink_send_mult(block->first_cn, len, in w1_unref_block()
85 u16 len = w1_reply_len(block); in w1_reply_make_space() local
86 if (len + space >= block->maxlen) { in w1_reply_make_space()
87 cn_netlink_send_mult(block->first_cn, len, block->portid, in w1_reply_make_space()
89 block->first_cn->len = 0; in w1_reply_make_space()
115 block->msg = (struct w1_netlink_msg *)(block->cn->data + block->cn->len); in w1_netlink_setup_msg()
120 block->cn->len); in w1_netlink_setup_msg()
125 block->cn->len = 0; in w1_netlink_setup_msg()
140 sizeof(struct w1_netlink_msg) + sizeof(*cmd) + cmd->len); in w1_netlink_queue_cmd()
148 block->cn->len += sizeof(*block->msg); in w1_netlink_queue_cmd()
149 block->msg->len = 0; in w1_netlink_queue_cmd()
152 space = sizeof(*cmd) + cmd->len; in w1_netlink_queue_cmd()
155 block->cn->len += space; in w1_netlink_queue_cmd()
156 block->msg->len += space; in w1_netlink_queue_cmd()
171 block->cn->len += sizeof(*req_msg); in w1_netlink_queue_status()
172 block->msg->len = 0; in w1_netlink_queue_status()
177 block->cn->len += sizeof(*cmd); in w1_netlink_queue_status()
178 block->msg->len += sizeof(*cmd); in w1_netlink_queue_status()
179 cmd->len = 0; in w1_netlink_queue_status()
203 packet.cn.len = sizeof(packet.msg); in w1_netlink_send_error()
204 packet.msg.len = 0; in w1_netlink_send_error()
228 packet.cn.len = sizeof(*msg); in w1_netlink_send()
231 packet.msg.len = 0; in w1_netlink_send()
246 cache_cmd->len = 0; in w1_send_slave()
250 data = (u64 *)(block->cmd->data + block->cmd->len); in w1_send_slave()
253 block->cn->len += sizeof(*data); in w1_send_slave()
254 block->msg->len += sizeof(*data); in w1_send_slave()
255 block->cmd->len += sizeof(*data); in w1_send_slave()
271 req_cmd->len = 0; in w1_get_slaves()
297 w1_touch_block(dev, cmd->data, cmd->len); in w1_process_command_io()
301 w1_read_block(dev, cmd->data, cmd->len); in w1_process_command_io()
305 w1_write_block(dev, cmd->data, cmd->len); in w1_process_command_io()
322 if (cmd->len != sizeof(*id)) in w1_process_command_addremove()
394 sl->reg_num.crc, cmd->cmd, cmd->len); in w1_process_command_slave()
415 cn->len = sizeof(struct w1_netlink_msg); in w1_process_command_root()
420 msg->len = 0; in w1_process_command_root()
425 if (cn->len + sizeof(*id) > PAGE_SIZE - sizeof(struct cn_msg)) { in w1_process_command_root()
427 cn->len = sizeof(struct w1_netlink_msg); in w1_process_command_root()
428 msg->len = 0; in w1_process_command_root()
433 msg->len += sizeof(*id); in w1_process_command_root()
434 cn->len += sizeof(*id); in w1_process_command_root()
448 u16 mlen = node->msg->len; in w1_process_cb()
449 u16 len; in w1_process_cb() local
461 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) { in w1_process_cb()
475 len = sizeof(*cmd) + cmd->len; in w1_process_cb()
476 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); in w1_process_cb()
477 mlen -= len; in w1_process_cb()
504 u16 mlen = msg->len; in w1_list_count_cmds()
505 u16 len; in w1_list_count_cmds() local
508 if (cmd->len + sizeof(struct w1_netlink_cmd) > mlen) in w1_list_count_cmds()
518 len = sizeof(*cmd) + cmd->len; in w1_list_count_cmds()
519 cmd = (struct w1_netlink_cmd *)((u8 *)cmd + len); in w1_list_count_cmds()
520 mlen -= len; in w1_list_count_cmds()
562 msg_len = cn->len; in w1_cn_callback()
564 if (msg->len + sizeof(struct w1_netlink_msg) > msg_len) { in w1_cn_callback()
577 msg_len -= sizeof(struct w1_netlink_msg) + msg->len; in w1_cn_callback()
579 sizeof(struct w1_netlink_msg) + msg->len); in w1_cn_callback()
584 int reply_size = sizeof(*cn) + cn->len + slave_len; in w1_cn_callback()
600 sizeof(struct w1_cb_block) + sizeof(*cn) + cn->len + in w1_cn_callback()
617 memcpy(block->request_cn.data, cn->data, cn->len); in w1_cn_callback()
618 node = (struct w1_cb_node *)(block->request_cn.data + cn->len); in w1_cn_callback()
634 msg_len = cn->len; in w1_cn_callback()
640 if (msg->len + sizeof(struct w1_netlink_msg) > msg_len) { in w1_cn_callback()
654 if (!msg->len) { in w1_cn_callback()
669 msg->type, msg->len); in w1_cn_callback()
702 msg_len -= sizeof(struct w1_netlink_msg) + msg->len; in w1_cn_callback()
704 sizeof(struct w1_netlink_msg) + msg->len); in w1_cn_callback()