master/mailbox.c
changeset 1606 6c5849669900
parent 1550 81a16ba13ae6
child 1921 d9cf40facbc4
equal deleted inserted replaced
1605:1a588303083a 1606:6c5849669900
    64     }
    64     }
    65 
    65 
    66     total_size = EC_MBOX_HEADER_SIZE + size;
    66     total_size = EC_MBOX_HEADER_SIZE + size;
    67 
    67 
    68     if (unlikely(total_size > slave->configured_rx_mailbox_size)) {
    68     if (unlikely(total_size > slave->configured_rx_mailbox_size)) {
    69         EC_ERR("Data size (%u) does not fit in mailbox (%u)!\n",
    69         EC_ERR("Data size (%zu) does not fit in mailbox (%u)!\n",
    70                 total_size, slave->configured_rx_mailbox_size);
    70                 total_size, slave->configured_rx_mailbox_size);
    71         return ERR_PTR(-EOVERFLOW);
    71         return ERR_PTR(-EOVERFLOW);
    72     }
    72     }
    73 
    73 
    74     ec_datagram_zero(datagram);
       
    75     ret = ec_datagram_fpwr(datagram, slave->station_address,
    74     ret = ec_datagram_fpwr(datagram, slave->station_address,
    76             slave->configured_rx_mailbox_offset,
    75             slave->configured_rx_mailbox_offset,
    77             slave->configured_rx_mailbox_size);
    76             slave->configured_rx_mailbox_size);
    78     if (ret)
    77     if (ret)
    79         return ERR_PTR(ret);
    78         return ERR_PTR(ret);