ili9882_mmi: fix build breakage on R

Fix below forbidden warnings:
motorola/kernel/modules/drivers/input/touchscreen/ili9882_mmi/ili9882_qcom.c:443:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation]
motorola/kernel/modules/drivers/input/touchscreen/ili9882_mmi/ili9882.c:569:6: warning: comparison of array 'cmd' equal to a null pointer is always false [-Wtautological-pointer-compare]
motorola/kernel/modules/drivers/input/touchscreen/ili9882_mmi/ili9882_node.c:201:12: warning: comparison of array 'file->fname' equal to a null pointer is always false [-Wtautological-pointer-compare]
motorola/kernel/modules/drivers/input/touchscreen/chipone_tddi_mmi/cts_sysfs.c:2056:15: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]

Change-Id: I46b24a8078b9e7e28c5fbfa6a7d32731368c96a1
Reviewed-on: https://gerrit.mot.com/1740710
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
This commit is contained in:
liujg6 2020-08-21 16:46:55 +08:00 • committed by Jianguo Liu
commit 2114772e38
4 changed files with 20 additions and 18 deletions

View file

@ -2053,7 +2053,7 @@ static ssize_t jitter_store(struct device *dev,
ret = kstrtou16(argv[0], 0, &cnt);
if (ret == 0) {
if (cnt > 2 || cnt < 10000) {
if (cnt < 2 || cnt > 10000) {
jitter_test_frame = cnt;
}
}

View file

@ -566,10 +566,10 @@ int ili_set_tp_data_len(int format, bool send, u8* data)
ctrl = DATA_FORMAT_DEBUG_LITE_CMD;
break;
case DATA_FORMAT_DEBUG_LITE_AREA:
if(cmd == NULL) {
/*if(cmd == NULL) {
ILI_ERR("DATA_FORMAT_DEBUG_LITE_AREA error cmd\n");
return -1;
}
}*/
debug_ctrl = DATA_FORMAT_DEBUG_LITE_AREA_CMD;
ctrl = DATA_FORMAT_DEBUG_LITE_CMD;
cmd[3] = data[0];

View file

@ -198,10 +198,10 @@ static int file_write(struct file_buffer *file, bool new_open)
return -1;
}
if (file->fname == NULL) {
/*if (file->fname == NULL) {
ILI_ERR("file name is invaild\n");
return -1;
}
}*/
if (file->flen >= file->max_size) {
ILI_ERR("The length saved to file is too long !\n");

View file

@ -426,8 +426,8 @@ static int ilitek_plat_notifier_fb(struct notifier_block *self, unsigned long ev
blank = evdata->data;
switch (*blank) {
case DRM_PANEL_BLANK_POWERDOWN:
switch (*blank) {
case DRM_PANEL_BLANK_POWERDOWN:
/*
if (TP_SUSPEND_PRIO) {
if (event != MSM_DRM_EARLY_EVENT_BLANK)
@ -438,22 +438,24 @@ static int ilitek_plat_notifier_fb(struct notifier_block *self, unsigned long ev
}
*/
if (event == DRM_PANEL_EARLY_EVENT_BLANK)
{
if (ili_sleep_handler(TP_SUSPEND) < 0)
ILI_ERR("TP suspend failed\n");
break;
case DRM_PANEL_BLANK_UNBLANK:
if (event == DRM_PANEL_EVENT_BLANK)
{
if (ili_sleep_handler(TP_RESUME) < 0)
ILI_ERR("TP resume failed\n");
}
break;
default:
ILI_ERR("Unknown event, blank = %d\n", *blank);
break;
}
break;
case DRM_PANEL_BLANK_UNBLANK:
if (event == DRM_PANEL_EVENT_BLANK)
{
if (ili_sleep_handler(TP_RESUME) < 0)
ILI_ERR("TP resume failed\n");
}
break;
default:
ILI_ERR("Unknown event, blank = %d\n", *blank);
break;
}
return NOTIFY_OK;
}
#else