All of lore.kernel.org
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH] staging: rtl8723bs: change sscanf to kstrtoint
@ 2019-06-22  7:31 ` Harshavardhan Unnibhavi
  0 siblings, 0 replies; 4+ messages in thread
From: hvubfoss @ 2019-06-22  7:31 UTC (permalink / raw)


Fixes following checkpath.pl warning:
Prefer kstrto<type> to single variable sscanf

Signed-off-by: Harshavardhan Unnibhavi <hvubfoss at gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/rtw_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/rtw_proc.c b/drivers/staging/rtl8723bs/os_dep/rtw_proc.c
index 5f950fda48ea..b700363c899c 100644
--- a/drivers/staging/rtl8723bs/os_dep/rtw_proc.c
+++ b/drivers/staging/rtl8723bs/os_dep/rtw_proc.c
@@ -468,7 +468,7 @@ ssize_t proc_set_odm_dbg_comp(struct file *file, const char __user *buffer, size
 
 	if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
 
-		int num = sscanf(tmp, "%llx", &dbg_comp);
+		int num = kstrtoint(tmp, "%llx", &dbg_comp);
 
 		if (num != 1)
 			return count;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-22  7:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-22  7:31 [Linux-kernel-mentees] [PATCH] staging: rtl8723bs: change sscanf to kstrtoint hvubfoss
2019-06-22  7:31 ` Harshavardhan Unnibhavi
2019-06-22  7:38 ` gregkh
2019-06-22  7:38   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.