Lines Matching refs:msg
24 int cros_kunit_ec_xfer_mock(struct cros_ec_device *ec_dev, struct cros_ec_command *msg) in cros_kunit_ec_xfer_mock() argument
30 msg->result = cros_kunit_ec_xfer_mock_default_result; in cros_kunit_ec_xfer_mock()
36 memcpy(&mock->msg, msg, sizeof(*msg)); in cros_kunit_ec_xfer_mock()
37 if (msg->outsize) { in cros_kunit_ec_xfer_mock()
38 mock->i_data = kunit_kzalloc(mock->test, msg->outsize, GFP_KERNEL); in cros_kunit_ec_xfer_mock()
40 memcpy(mock->i_data, msg->data, msg->outsize); in cros_kunit_ec_xfer_mock()
43 msg->result = mock->result; in cros_kunit_ec_xfer_mock()
44 if (msg->insize) in cros_kunit_ec_xfer_mock()
45 memcpy(msg->data, mock->o_data, min(msg->insize, mock->o_data_len)); in cros_kunit_ec_xfer_mock()
52 int cros_kunit_ec_cmd_xfer_mock(struct cros_ec_device *ec_dev, struct cros_ec_command *msg) in cros_kunit_ec_cmd_xfer_mock() argument
55 return cros_kunit_ec_xfer_mock(ec_dev, msg); in cros_kunit_ec_cmd_xfer_mock()
58 int cros_kunit_ec_pkt_xfer_mock(struct cros_ec_device *ec_dev, struct cros_ec_command *msg) in cros_kunit_ec_pkt_xfer_mock() argument
61 return cros_kunit_ec_xfer_mock(ec_dev, msg); in cros_kunit_ec_pkt_xfer_mock()