Commit a55067d7 authored by Lucas Russo's avatar Lucas Russo

sm_io/protocols/*/*i2c: use more descriptive transfer size message

parent 4c295d70
......@@ -486,14 +486,14 @@ static ssize_t _i2c_write_generic (smpr_t *self, uint8_t *data,
if (trans_size != size) {
DBE_DEBUG (DBG_SM_PR | DBG_LVL_WARN,
"[sm_pr:i2c] _i2c_read_generic: Data size differs from Transfer size.\n"
"\tChoosing the smallest value\n");
"[sm_pr:i2c] _i2c_write_generic: Data size differs from Transfer size.\n"
"\tChoosing the smallest value between trans_size (%u) and size (%lu)\n", trans_size, size);
}
/* Choose the smallest one */
trans_size = (trans_size > size) ? size : trans_size;
DBE_DEBUG (DBG_SM_PR | DBG_LVL_TRACE,
"[sm_pr:i2c] _i2c_write_generic: Transmission size = %u bytes\n", trans_size);
"[sm_pr:i2c] _i2c_write_generic: Transmission size (flags) = %u bytes\n", trans_size);
/* Send actual data, byte by byte*/
uint32_t i;
......@@ -572,7 +572,7 @@ static ssize_t _i2c_read_generic (smpr_t *self, uint8_t *data,
if (trans_size != size) {
DBE_DEBUG (DBG_SM_PR | DBG_LVL_WARN,
"[sm_pr:i2c] _i2c_read_generic: Data size differs from Transfer size.\n"
"\tChoosing the smallest value\n");
"\tChoosing the smallest value between trans_size (%u) and size (%lu)\n", trans_size, size);
}
/* Choose the smallest one */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment