All of lore.kernel.org
 help / color / mirror / Atom feed
* [linusw-nomadik:ux500-codina-v5.17-rc1 6/12] drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: add some parenthesis here?
@ 2022-02-28  6:48 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-02-26  8:17 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5169 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-arm-kernel(a)lists.infradead.org
TO: Linus Walleij <linus.walleij@linaro.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-codina-v5.17-rc1
head:   55196848adbcea2ea36561a056bb610bf3ab40bf
commit: 727f5e5be135b8f1f94922093b5c88565fdadcb0 [6/12] Input: zinitix - Do not report shadow fingers
:::::: branch date: 4 days ago
:::::: commit date: 8 days ago
config: microblaze-randconfig-m031-20220226 (https://download.01.org/0day-ci/archive/20220226/202202261608.xrQpogW4-lkp(a)intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: add some parenthesis here?
drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: maybe use && instead of &

vim +338 drivers/input/touchscreen/zinitix.c

26822652c85eff Michael Srba  2020-10-04  321  
727f5e5be135b8 Linus Walleij 2022-02-14  322  static void zinitix_report_fingers(struct bt541_ts_data *bt541, struct touch_event *te)
26822652c85eff Michael Srba  2020-10-04  323  {
727f5e5be135b8 Linus Walleij 2022-02-14  324  	struct point_coord *p;
727f5e5be135b8 Linus Walleij 2022-02-14  325  	u16 x, y;
727f5e5be135b8 Linus Walleij 2022-02-14  326  	unsigned long fmask;
727f5e5be135b8 Linus Walleij 2022-02-14  327  	int i;
727f5e5be135b8 Linus Walleij 2022-02-14  328  
727f5e5be135b8 Linus Walleij 2022-02-14  329  	/*
727f5e5be135b8 Linus Walleij 2022-02-14  330  	 * If the corresponding finger is not active, do not report
727f5e5be135b8 Linus Walleij 2022-02-14  331  	 * what is happening on it.
727f5e5be135b8 Linus Walleij 2022-02-14  332  	 */
727f5e5be135b8 Linus Walleij 2022-02-14  333  	fmask = te->finger_mask;
727f5e5be135b8 Linus Walleij 2022-02-14  334  	for_each_set_bit(i, &fmask, MAX_SUPPORTED_FINGER_NUM) {
727f5e5be135b8 Linus Walleij 2022-02-14  335  		p = &te->point_coord[i];
727f5e5be135b8 Linus Walleij 2022-02-14  336  
727f5e5be135b8 Linus Walleij 2022-02-14  337  		/* Skip nonexisting fingers */
727f5e5be135b8 Linus Walleij 2022-02-14 @338  		if (!p->sub_status & SUB_BIT_EXIST)
727f5e5be135b8 Linus Walleij 2022-02-14  339  			continue;
727f5e5be135b8 Linus Walleij 2022-02-14  340  
727f5e5be135b8 Linus Walleij 2022-02-14  341  		x = le16_to_cpu(p->x);
727f5e5be135b8 Linus Walleij 2022-02-14  342  		y = le16_to_cpu(p->y);
727f5e5be135b8 Linus Walleij 2022-02-14  343  
727f5e5be135b8 Linus Walleij 2022-02-14  344  		input_mt_slot(bt541->input_dev, i);
727f5e5be135b8 Linus Walleij 2022-02-14  345  
727f5e5be135b8 Linus Walleij 2022-02-14  346  		if (p->sub_status & BIT_DOWN) {
727f5e5be135b8 Linus Walleij 2022-02-14  347  			/* Finger down */
727f5e5be135b8 Linus Walleij 2022-02-14  348  			input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, true);
727f5e5be135b8 Linus Walleij 2022-02-14  349  			touchscreen_report_pos(bt541->input_dev, &bt541->prop, x, y, true);
727f5e5be135b8 Linus Walleij 2022-02-14  350  			input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, p->width);
727f5e5be135b8 Linus Walleij 2022-02-14  351  			dev_dbg(&bt541->client->dev, "finger %d down (%u, %u)\n", i, x, y);
727f5e5be135b8 Linus Walleij 2022-02-14  352  		} else if (p->sub_status & BIT_UP) {
727f5e5be135b8 Linus Walleij 2022-02-14  353  			/* Release finger */
727f5e5be135b8 Linus Walleij 2022-02-14  354  			input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, false);
727f5e5be135b8 Linus Walleij 2022-02-14  355  			touchscreen_report_pos(bt541->input_dev, &bt541->prop, x, y, true);
727f5e5be135b8 Linus Walleij 2022-02-14  356  			input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, 0);
727f5e5be135b8 Linus Walleij 2022-02-14  357  			dev_dbg(&bt541->client->dev, "finger %d up (%u, %u)\n", i, x, y);
727f5e5be135b8 Linus Walleij 2022-02-14  358  		} else if (p->sub_status & BIT_MOVE) {
727f5e5be135b8 Linus Walleij 2022-02-14  359  			/* Finger moves while pressed down */
26822652c85eff Michael Srba  2020-10-04  360  			input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, true);
727f5e5be135b8 Linus Walleij 2022-02-14  361  			touchscreen_report_pos(bt541->input_dev, &bt541->prop, x, y, true);
26822652c85eff Michael Srba  2020-10-04  362  			input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, p->width);
727f5e5be135b8 Linus Walleij 2022-02-14  363  			dev_dbg(&bt541->client->dev, "finger %d move (%u, %u)\n", i, x, y);
727f5e5be135b8 Linus Walleij 2022-02-14  364  		} else {
727f5e5be135b8 Linus Walleij 2022-02-14  365  			dev_dbg(&bt541->client->dev, "unknown finger event\n");
727f5e5be135b8 Linus Walleij 2022-02-14  366  		}
727f5e5be135b8 Linus Walleij 2022-02-14  367  	}
26822652c85eff Michael Srba  2020-10-04  368  }
26822652c85eff Michael Srba  2020-10-04  369  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

* [linusw-nomadik:ux500-codina-v5.17-rc1 6/12] drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: add some parenthesis here?
@ 2022-02-28  6:48 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-02-28  6:48 UTC (permalink / raw)
  To: kbuild, Linus Walleij; +Cc: lkp, kbuild-all, linux-arm-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-codina-v5.17-rc1
head:   55196848adbcea2ea36561a056bb610bf3ab40bf
commit: 727f5e5be135b8f1f94922093b5c88565fdadcb0 [6/12] Input: zinitix - Do not report shadow fingers
config: microblaze-randconfig-m031-20220226 (https://download.01.org/0day-ci/archive/20220226/202202261608.xrQpogW4-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: add some parenthesis here?
drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: maybe use && instead of &

vim +338 drivers/input/touchscreen/zinitix.c

727f5e5be135b8 Linus Walleij 2022-02-14  322  static void zinitix_report_fingers(struct bt541_ts_data *bt541, struct touch_event *te)
26822652c85eff Michael Srba  2020-10-04  323  {
727f5e5be135b8 Linus Walleij 2022-02-14  324  	struct point_coord *p;
727f5e5be135b8 Linus Walleij 2022-02-14  325  	u16 x, y;
727f5e5be135b8 Linus Walleij 2022-02-14  326  	unsigned long fmask;
727f5e5be135b8 Linus Walleij 2022-02-14  327  	int i;
727f5e5be135b8 Linus Walleij 2022-02-14  328  
727f5e5be135b8 Linus Walleij 2022-02-14  329  	/*
727f5e5be135b8 Linus Walleij 2022-02-14  330  	 * If the corresponding finger is not active, do not report
727f5e5be135b8 Linus Walleij 2022-02-14  331  	 * what is happening on it.
727f5e5be135b8 Linus Walleij 2022-02-14  332  	 */
727f5e5be135b8 Linus Walleij 2022-02-14  333  	fmask = te->finger_mask;
727f5e5be135b8 Linus Walleij 2022-02-14  334  	for_each_set_bit(i, &fmask, MAX_SUPPORTED_FINGER_NUM) {
727f5e5be135b8 Linus Walleij 2022-02-14  335  		p = &te->point_coord[i];
727f5e5be135b8 Linus Walleij 2022-02-14  336  
727f5e5be135b8 Linus Walleij 2022-02-14  337  		/* Skip nonexisting fingers */
727f5e5be135b8 Linus Walleij 2022-02-14 @338  		if (!p->sub_status & SUB_BIT_EXIST)

Supposed to be: if (!(p->sub_status & SUB_BIT_EXIST))

727f5e5be135b8 Linus Walleij 2022-02-14  339  			continue;
727f5e5be135b8 Linus Walleij 2022-02-14  340  
727f5e5be135b8 Linus Walleij 2022-02-14  341  		x = le16_to_cpu(p->x);
727f5e5be135b8 Linus Walleij 2022-02-14  342  		y = le16_to_cpu(p->y);
727f5e5be135b8 Linus Walleij 2022-02-14  343  
727f5e5be135b8 Linus Walleij 2022-02-14  344  		input_mt_slot(bt541->input_dev, i);
727f5e5be135b8 Linus Walleij 2022-02-14  345  
727f5e5be135b8 Linus Walleij 2022-02-14  346  		if (p->sub_status & BIT_DOWN) {
727f5e5be135b8 Linus Walleij 2022-02-14  347  			/* Finger down */
727f5e5be135b8 Linus Walleij 2022-02-14  348  			input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, true);
727f5e5be135b8 Linus Walleij 2022-02-14  349  			touchscreen_report_pos(bt541->input_dev, &bt541->prop, x, y, true);
727f5e5be135b8 Linus Walleij 2022-02-14  350  			input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, p->width);
727f5e5be135b8 Linus Walleij 2022-02-14  351  			dev_dbg(&bt541->client->dev, "finger %d down (%u, %u)\n", i, x, y);
727f5e5be135b8 Linus Walleij 2022-02-14  352  		} else if (p->sub_status & BIT_UP) {
727f5e5be135b8 Linus Walleij 2022-02-14  353  			/* Release finger */
727f5e5be135b8 Linus Walleij 2022-02-14  354  			input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, false);
727f5e5be135b8 Linus Walleij 2022-02-14  355  			touchscreen_report_pos(bt541->input_dev, &bt541->prop, x, y, true);
727f5e5be135b8 Linus Walleij 2022-02-14  356  			input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, 0);
727f5e5be135b8 Linus Walleij 2022-02-14  357  			dev_dbg(&bt541->client->dev, "finger %d up (%u, %u)\n", i, x, y);
727f5e5be135b8 Linus Walleij 2022-02-14  358  		} else if (p->sub_status & BIT_MOVE) {
727f5e5be135b8 Linus Walleij 2022-02-14  359  			/* Finger moves while pressed down */
26822652c85eff Michael Srba  2020-10-04  360  			input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, true);
727f5e5be135b8 Linus Walleij 2022-02-14  361  			touchscreen_report_pos(bt541->input_dev, &bt541->prop, x, y, true);
26822652c85eff Michael Srba  2020-10-04  362  			input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, p->width);
727f5e5be135b8 Linus Walleij 2022-02-14  363  			dev_dbg(&bt541->client->dev, "finger %d move (%u, %u)\n", i, x, y);
727f5e5be135b8 Linus Walleij 2022-02-14  364  		} else {
727f5e5be135b8 Linus Walleij 2022-02-14  365  			dev_dbg(&bt541->client->dev, "unknown finger event\n");
727f5e5be135b8 Linus Walleij 2022-02-14  366  		}
727f5e5be135b8 Linus Walleij 2022-02-14  367  	}
26822652c85eff Michael Srba  2020-10-04  368  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [linusw-nomadik:ux500-codina-v5.17-rc1 6/12] drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: add some parenthesis here?
@ 2022-02-28  6:48 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-02-28  6:48 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4925 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ux500-codina-v5.17-rc1
head:   55196848adbcea2ea36561a056bb610bf3ab40bf
commit: 727f5e5be135b8f1f94922093b5c88565fdadcb0 [6/12] Input: zinitix - Do not report shadow fingers
config: microblaze-randconfig-m031-20220226 (https://download.01.org/0day-ci/archive/20220226/202202261608.xrQpogW4-lkp(a)intel.com/config)
compiler: microblaze-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: add some parenthesis here?
drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: maybe use && instead of &

vim +338 drivers/input/touchscreen/zinitix.c

727f5e5be135b8 Linus Walleij 2022-02-14  322  static void zinitix_report_fingers(struct bt541_ts_data *bt541, struct touch_event *te)
26822652c85eff Michael Srba  2020-10-04  323  {
727f5e5be135b8 Linus Walleij 2022-02-14  324  	struct point_coord *p;
727f5e5be135b8 Linus Walleij 2022-02-14  325  	u16 x, y;
727f5e5be135b8 Linus Walleij 2022-02-14  326  	unsigned long fmask;
727f5e5be135b8 Linus Walleij 2022-02-14  327  	int i;
727f5e5be135b8 Linus Walleij 2022-02-14  328  
727f5e5be135b8 Linus Walleij 2022-02-14  329  	/*
727f5e5be135b8 Linus Walleij 2022-02-14  330  	 * If the corresponding finger is not active, do not report
727f5e5be135b8 Linus Walleij 2022-02-14  331  	 * what is happening on it.
727f5e5be135b8 Linus Walleij 2022-02-14  332  	 */
727f5e5be135b8 Linus Walleij 2022-02-14  333  	fmask = te->finger_mask;
727f5e5be135b8 Linus Walleij 2022-02-14  334  	for_each_set_bit(i, &fmask, MAX_SUPPORTED_FINGER_NUM) {
727f5e5be135b8 Linus Walleij 2022-02-14  335  		p = &te->point_coord[i];
727f5e5be135b8 Linus Walleij 2022-02-14  336  
727f5e5be135b8 Linus Walleij 2022-02-14  337  		/* Skip nonexisting fingers */
727f5e5be135b8 Linus Walleij 2022-02-14 @338  		if (!p->sub_status & SUB_BIT_EXIST)

Supposed to be: if (!(p->sub_status & SUB_BIT_EXIST))

727f5e5be135b8 Linus Walleij 2022-02-14  339  			continue;
727f5e5be135b8 Linus Walleij 2022-02-14  340  
727f5e5be135b8 Linus Walleij 2022-02-14  341  		x = le16_to_cpu(p->x);
727f5e5be135b8 Linus Walleij 2022-02-14  342  		y = le16_to_cpu(p->y);
727f5e5be135b8 Linus Walleij 2022-02-14  343  
727f5e5be135b8 Linus Walleij 2022-02-14  344  		input_mt_slot(bt541->input_dev, i);
727f5e5be135b8 Linus Walleij 2022-02-14  345  
727f5e5be135b8 Linus Walleij 2022-02-14  346  		if (p->sub_status & BIT_DOWN) {
727f5e5be135b8 Linus Walleij 2022-02-14  347  			/* Finger down */
727f5e5be135b8 Linus Walleij 2022-02-14  348  			input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, true);
727f5e5be135b8 Linus Walleij 2022-02-14  349  			touchscreen_report_pos(bt541->input_dev, &bt541->prop, x, y, true);
727f5e5be135b8 Linus Walleij 2022-02-14  350  			input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, p->width);
727f5e5be135b8 Linus Walleij 2022-02-14  351  			dev_dbg(&bt541->client->dev, "finger %d down (%u, %u)\n", i, x, y);
727f5e5be135b8 Linus Walleij 2022-02-14  352  		} else if (p->sub_status & BIT_UP) {
727f5e5be135b8 Linus Walleij 2022-02-14  353  			/* Release finger */
727f5e5be135b8 Linus Walleij 2022-02-14  354  			input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, false);
727f5e5be135b8 Linus Walleij 2022-02-14  355  			touchscreen_report_pos(bt541->input_dev, &bt541->prop, x, y, true);
727f5e5be135b8 Linus Walleij 2022-02-14  356  			input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, 0);
727f5e5be135b8 Linus Walleij 2022-02-14  357  			dev_dbg(&bt541->client->dev, "finger %d up (%u, %u)\n", i, x, y);
727f5e5be135b8 Linus Walleij 2022-02-14  358  		} else if (p->sub_status & BIT_MOVE) {
727f5e5be135b8 Linus Walleij 2022-02-14  359  			/* Finger moves while pressed down */
26822652c85eff Michael Srba  2020-10-04  360  			input_mt_report_slot_state(bt541->input_dev, MT_TOOL_FINGER, true);
727f5e5be135b8 Linus Walleij 2022-02-14  361  			touchscreen_report_pos(bt541->input_dev, &bt541->prop, x, y, true);
26822652c85eff Michael Srba  2020-10-04  362  			input_report_abs(bt541->input_dev, ABS_MT_TOUCH_MAJOR, p->width);
727f5e5be135b8 Linus Walleij 2022-02-14  363  			dev_dbg(&bt541->client->dev, "finger %d move (%u, %u)\n", i, x, y);
727f5e5be135b8 Linus Walleij 2022-02-14  364  		} else {
727f5e5be135b8 Linus Walleij 2022-02-14  365  			dev_dbg(&bt541->client->dev, "unknown finger event\n");
727f5e5be135b8 Linus Walleij 2022-02-14  366  		}
727f5e5be135b8 Linus Walleij 2022-02-14  367  	}
26822652c85eff Michael Srba  2020-10-04  368  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

end of thread, other threads:[~2022-02-28  6:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26  8:17 [linusw-nomadik:ux500-codina-v5.17-rc1 6/12] drivers/input/touchscreen/zinitix.c:338 zinitix_report_fingers() warn: add some parenthesis here? kernel test robot
2022-02-28  6:48 ` Dan Carpenter
2022-02-28  6:48 ` Dan Carpenter

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.