diff options
author | Lee Jones <[email protected]> | 2020-06-23 10:26:11 +0100 |
---|---|---|
committer | Lee Jones <[email protected]> | 2020-07-06 08:31:55 +0100 |
commit | 54daa5d47c47662067115a78dd317fba3de9e828 (patch) | |
tree | b752290f23da26ee8960d2c2c1bc4826ca32ff84 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | 3d4a87576f3762c8c986950af157bc9025808b5c (diff) |
mfd: ab3100-core: Fix incompatible types in comparison expression warning
Smatch reports:
drivers/mfd/ab3100-core.c:501:20: error: incompatible types in comparison expression (different type sizes):
drivers/mfd/ab3100-core.c:501:20: unsigned int *
drivers/mfd/ab3100-core.c:501:20: unsigned long *
drivers/mfd/ab8500-debugfs.c:1804:20: error: incompatible types in comparison expression (different type sizes):
drivers/mfd/ab8500-debugfs.c:1804:20: unsigned int *
drivers/mfd/ab8500-debugfs.c:1804:20: unsigned long *
Since the second min() argument can be less than 0 a signed
variable is required for assignment. However, the non-sized
type size_t is passed in from the userspace handlers. In order
to firstly compare, then assign the smallest value, we firstly
need to cast them both to the same as the receiving size_t typed
variable.
Cc: Linus Walleij <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions