From: Khusika Dhamar Gusti Date: Fri, 13 Sep 2019 16:05:32 +0000 (+0700) Subject: input: touchscreen: nt36xxx: fix snprintf warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fed424956dae801e567e7cd1d3532349ff1074c6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git input: touchscreen: nt36xxx: fix snprintf warning Fixes the following clang warning: ../drivers/input/touchscreen/nt36xxx/nt36xxx_mp_ctrlram.c:1293:3: error: 'snprintf' size argument is too large; destination buffer has size 32, $ snprintf(mpcriteria, PAGE_SIZE, "novatek-mp-criteria-%04X", ts->nvt_pid); ^ 1 error generated. Change-Id: Ieb3331a226cb6e183aaac2f22e7e8dccf27af7fc Signed-off-by: Khusika Dhamar Gusti --- diff --git a/drivers/input/touchscreen/nt36xxx/nt36xxx_mp_ctrlram.c b/drivers/input/touchscreen/nt36xxx/nt36xxx_mp_ctrlram.c index 481e643ffd55..832a14da3ec6 100755 --- a/drivers/input/touchscreen/nt36xxx/nt36xxx_mp_ctrlram.c +++ b/drivers/input/touchscreen/nt36xxx/nt36xxx_mp_ctrlram.c @@ -1426,7 +1426,7 @@ static int32_t nvt_selftest_open(struct inode *inode, struct file *file) * Ex. nvt_pid = 500A * mpcriteria = "novatek-mp-criteria-500A" */ - snprintf(mpcriteria, PAGE_SIZE, "novatek-mp-criteria-%04X", ts->nvt_pid); + snprintf(mpcriteria, sizeof(mpcriteria), "novatek-mp-criteria-%04X", ts->nvt_pid); nvt_mp_parse_dt(np, mpcriteria); } else {