aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/misc/ti-st/st_core.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@kernel.org>2023-07-31 10:02:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-31 17:16:05 +0200
commita60b3017601ef7f338ac44b942e917362f222b1c (patch)
tree12b2914851c2551aa5ee36a212ba4020e9c81a71 /drivers/misc/ti-st/st_core.c
parentmisc: ti-st: remove forward declarations and make st_int_recv() static (diff)
downloadwireguard-linux-a60b3017601ef7f338ac44b942e917362f222b1c.tar.xz
wireguard-linux-a60b3017601ef7f338ac44b942e917362f222b1c.zip
misc: ti-st: remove ptr from recv functions
ptr is the same as data, so use ptr directly as a parameter and drop the useless local variable. Likely, the two were introduced to have a different type. But 'char' and 'unsigned char' are the same in the kernel for a long time. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230731080244.2698-10-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/ti-st/st_core.c')
-rw-r--r--drivers/misc/ti-st/st_core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c
index 389901276ce3..e2add50b191c 100644
--- a/drivers/misc/ti-st/st_core.c
+++ b/drivers/misc/ti-st/st_core.c
@@ -224,9 +224,8 @@ static inline void st_wakeup_ack(struct st_data_s *st_gdata,
* CH-8 packets from FM, CH-9 packets from GPS cores.
*/
static void st_int_recv(void *disc_data,
- const unsigned char *data, long count)
+ const unsigned char *ptr, long count)
{
- char *ptr;
struct st_proto_s *proto;
unsigned short payload_len = 0;
int len = 0;
@@ -235,7 +234,6 @@ static void st_int_recv(void *disc_data,
struct st_data_s *st_gdata = (struct st_data_s *)disc_data;
unsigned long flags;
- ptr = (char *)data;
/* tty_receive sent null ? */
if (unlikely(ptr == NULL) || (st_gdata == NULL)) {
pr_err(" received null from TTY ");