Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: ti-st: make st_recv() conforming to tty_ldisc_ops::receive_buf()

That is change data type to u8 and count to unsigned int. And propagate
to both hooks (st_kim_recv() and kim_int_recv()).

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230810091510.13006-19-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
ead03e72 892bc209

+7 -8
+3 -4
drivers/misc/ti-st/st_core.c
··· 21 21 * st_kim_recv during registration to receive fw download responses 22 22 * st_int_recv after registration to receive proto stack responses 23 23 */ 24 - static void (*st_recv) (void *, const unsigned char *, long); 24 + static void (*st_recv)(void *disc_data, const u8 *ptr, size_t count); 25 25 26 26 /********************************************************************/ 27 27 static void add_channel_to_table(struct st_data_s *st_gdata, ··· 223 223 * HCI-Events, ACL, SCO, 4 types of HCI-LL PM packets 224 224 * CH-8 packets from FM, CH-9 packets from GPS cores. 225 225 */ 226 - static void st_int_recv(void *disc_data, 227 - const unsigned char *ptr, long count) 226 + static void st_int_recv(void *disc_data, const u8 *ptr, size_t count) 228 227 { 229 228 struct st_proto_s *proto; 230 229 unsigned short payload_len = 0; ··· 238 239 return; 239 240 } 240 241 241 - pr_debug("count %ld rx_state %ld" 242 + pr_debug("count %zu rx_state %ld" 242 243 "rx_count %ld", count, st_gdata->rx_state, 243 244 st_gdata->rx_count); 244 245
+3 -3
drivers/misc/ti-st/st_kim.c
··· 127 127 * have been observed to come in bursts of different 128 128 * tty_receive and hence the logic 129 129 */ 130 - static void kim_int_recv(struct kim_data_s *kim_gdata, 131 - const unsigned char *ptr, long count) 130 + static void kim_int_recv(struct kim_data_s *kim_gdata, const u8 *ptr, 131 + size_t count) 132 132 { 133 133 int len = 0; 134 134 unsigned char *plen; ··· 417 417 * 1. response to read local version 418 418 * 2. during send/recv's of firmware download 419 419 */ 420 - void st_kim_recv(void *disc_data, const unsigned char *data, long count) 420 + void st_kim_recv(void *disc_data, const u8 *data, size_t count) 421 421 { 422 422 struct st_data_s *st_gdata = (struct st_data_s *)disc_data; 423 423 struct kim_data_s *kim_gdata = st_gdata->kim_data;