hc
2023-11-06 1622ff3442ff6aecc1f538cda437379d1f6a4a93
kernel/drivers/spi/spi-rockchip-test.c
....@@ -102,7 +102,11 @@
102102
103103 spi_message_init(&m);
104104 spi_message_add_tail(&t, &m);
105
- return spi_sync(spi, &m);
105
+ ret = spi_sync(spi, &m);
106
+ if (m.actual_length && m.actual_length != n)
107
+ pr_err("%s len=%d actual_length=%d\n", __func__, n, m.actual_length);
108
+
109
+ return ret;
106110 }
107111
108112 int spi_read_slt(int id, void *rxbuf, size_t n)
....@@ -127,7 +131,11 @@
127131
128132 spi_message_init(&m);
129133 spi_message_add_tail(&t, &m);
130
- return spi_sync(spi, &m);
134
+ ret = spi_sync(spi, &m);
135
+ if (m.actual_length && m.actual_length != n)
136
+ pr_err("%s len=%d actual_length=%d\n", __func__, n, m.actual_length);
137
+
138
+ return ret;
131139 }
132140
133141 int spi_write_then_read_slt(int id, const void *txbuf, unsigned n_tx,