* [dtor-input:next 188/188] drivers/input/input.c:1489:9: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) << 12)) *' (aka 'unsigned long *'))
@ 2024-05-19 21:29 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-05-19 21:29 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: llvm, oe-kbuild-all, linux-input, Peter Hutterer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
head: c1307f8a152ac69f7efb759edfb8d71b4aa228f4
commit: c1307f8a152ac69f7efb759edfb8d71b4aa228f4 [188/188] Input: try trimming too long modalias strings
config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20240520/202405200547.y7iHuRu6-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project fa9b1be45088dce1e4b602d451f118128b94237b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240520/202405200547.y7iHuRu6-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405200547.y7iHuRu6-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/input/input.c:1489:9: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) << 12)) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
1489 | return min(len, PAGE_SIZE);
| ^~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:67:19: note: expanded from macro 'min'
67 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +1489 drivers/input/input.c
1477
1478 static ssize_t input_dev_show_modalias(struct device *dev,
1479 struct device_attribute *attr,
1480 char *buf)
1481 {
1482 struct input_dev *id = to_input_dev(dev);
1483 size_t len;
1484
1485 len = input_print_modalias(buf, PAGE_SIZE, id);
1486 if (len < PAGE_SIZE - 2)
1487 len += snprintf(buf + len, PAGE_SIZE - len, "\n");
1488
> 1489 return min(len, PAGE_SIZE);
1490 }
1491 static DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);
1492
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dtor-input:next 188/188] drivers/input/input.c:1489:9: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof ((1UL << 12)) *' (aka 'unsigned long *'))
@ 2024-05-19 21:39 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-05-19 21:39 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: llvm, oe-kbuild-all, linux-input, Peter Hutterer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
head: c1307f8a152ac69f7efb759edfb8d71b4aa228f4
commit: c1307f8a152ac69f7efb759edfb8d71b4aa228f4 [188/188] Input: try trimming too long modalias strings
config: hexagon-allnoconfig (https://download.01.org/0day-ci/archive/20240520/202405200512.hpbZWegE-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project fa9b1be45088dce1e4b602d451f118128b94237b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240520/202405200512.hpbZWegE-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405200512.hpbZWegE-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/input/input.c:1489:9: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof ((1UL << 12)) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
1489 | return min(len, PAGE_SIZE);
| ^~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:67:19: note: expanded from macro 'min'
67 | #define min(x, y) __careful_cmp(x, y, <)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
36 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
26 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +1489 drivers/input/input.c
1477
1478 static ssize_t input_dev_show_modalias(struct device *dev,
1479 struct device_attribute *attr,
1480 char *buf)
1481 {
1482 struct input_dev *id = to_input_dev(dev);
1483 size_t len;
1484
1485 len = input_print_modalias(buf, PAGE_SIZE, id);
1486 if (len < PAGE_SIZE - 2)
1487 len += snprintf(buf + len, PAGE_SIZE - len, "\n");
1488
> 1489 return min(len, PAGE_SIZE);
1490 }
1491 static DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);
1492
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-19 21:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-19 21:39 [dtor-input:next 188/188] drivers/input/input.c:1489:9: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof ((1UL << 12)) *' (aka 'unsigned long *')) kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2024-05-19 21:29 [dtor-input:next 188/188] drivers/input/input.c:1489:9: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) " kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).