CC: [email protected] CC: [email protected] CC: [email protected] TO: Paul Kocialkowski <[email protected]> CC: Mauro Carvalho Chehab <[email protected]> CC: [email protected] CC: Sakari Ailus <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: a3fa7a101dcff93791d1b1bdb3affcad1410c8c1 commit: e43ccb0a045f34838b786e8021dc4838b4af5c38 media: i2c: Add support for the OV5648 image sensor date: 8 months ago :::::: branch date: 17 hours ago :::::: commit date: 8 months ago config: x86_64-randconfig-c007-20210907 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9c476172b93367d2cb88d7d3f4b1b5b456fa6020) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e43ccb0a045f34838b786e8021dc4838b4af5c38 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout e43ccb0a045f34838b786e8021dc4838b4af5c38 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) ^ drivers/hid/hid-topseed.c:30:6: note: Assuming the condition is false if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/hid-topseed.c:30:2: note: Taking false branch if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) ^ drivers/hid/hid-topseed.c:33:2: note: Control jumps to 'case 90:' at line 51 switch (usage->hid & HID_USAGE) { ^ drivers/hid/hid-topseed.c:51:14: note: Calling 'hid_map_usage_clear' case 0x05a: ts_map_key_clear(KEY_TEXT); break; ^ drivers/hid/hid-topseed.c:24:29: note: expanded from macro 'ts_map_key_clear' #define ts_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:1020:2: note: Calling 'hid_map_usage' hid_map_usage(hidinput, usage, bit, max, type, c); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:974:2: note: 'input' initialized here struct input_dev *input = hidinput->input; ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:978:2: note: Control jumps to 'case 1:' at line 987 switch (type) { ^ include/linux/hid.h:990:3: note: Execution continues on line 997 break; ^ include/linux/hid.h:997:15: note: 'c' is <= 'limit' if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:997:15: note: Left side of '||' is false if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:997:28: note: Assuming 'bmap' is null if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:997:28: note: Assuming pointer value is null if (unlikely(c > limit || !bmap)) { ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hid.h:997:2: note: Taking true branch if (unlikely(c > limit || !bmap)) { ^ include/linux/hid.h:998:3: note: Assuming the condition is true pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:528:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:511:6: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:41:28: note: expanded from macro '__ratelimit' #define __ratelimit(state) ___ratelimit(state, __func__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hid.h:998:3: note: Taking true branch pr_warn_ratelimited("%s: Invalid code %d type %d\n", ^ include/linux/printk.h:528:2: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:511:2: note: expanded from macro 'printk_ratelimited' if (__ratelimit(&_rs)) \ ^ include/linux/hid.h:999:9: note: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'input') input->name, c, type); ^ include/linux/printk.h:528:49: note: expanded from macro 'pr_warn_ratelimited' printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ include/linux/printk.h:512:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~ Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. drivers/media/i2c/ov5640.c:1005:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = ov5640_mod_reg(sensor, OV5640_REG_SC_PLL_CTRL0, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov5640.c:1005:2: note: Value stored to 'ret' is never read ret = ov5640_mod_reg(sensor, OV5640_REG_SC_PLL_CTRL0, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 7 warnings (7 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 7 warnings generated. Suppressed 7 warnings (7 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. >> drivers/media/i2c/ov5648.c:587:8: warning: Excessive padding in 'struct >> ov5648_mode' (10 padding bytes, where 2 is optimal). Optimal fields order: pll2_config, register_values, pll1_config, crop_start_x, offset_x, output_size_x, crop_end_x, hts, crop_start_y, offset_y, output_size_y, crop_end_y, vts, inc_x_odd, inc_x_even, inc_y_odd, inc_y_even, register_values_count, frame_interval, binning_x, binning_y, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct ov5648_mode { ~~~~~~~^~~~~~~~~~~~~ drivers/media/i2c/ov5648.c:587:8: note: Excessive padding in 'struct ov5648_mode' (10 padding bytes, where 2 is optimal). Optimal fields order: pll2_config, register_values, pll1_config, crop_start_x, offset_x, output_size_x, crop_end_x, hts, crop_start_y, offset_y, output_size_y, crop_end_y, vts, inc_x_odd, inc_x_even, inc_y_odd, inc_y_even, register_values_count, frame_interval, binning_x, binning_y, consider reordering the fields or adding explicit padding members struct ov5648_mode { ~~~~~~~^~~~~~~~~~~~~ Suppressed 7 warnings (7 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 7 warnings generated. Suppressed 7 warnings (7 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 6 warnings generated. Suppressed 6 warnings (6 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. drivers/media/i2c/ov7670.c:1291:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = ov7670_read(sd, REG_CMATRIX_SIGN, &signbits); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov7670.c:1291:2: note: Value stored to 'ret' is never read ret = ov7670_read(sd, REG_CMATRIX_SIGN, &signbits); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov7670.c:1527:15: warning: The left operand of '&' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] com1 = (com1 & 0xfc) | (value & 0x03); ^ drivers/media/i2c/ov7670.c:1596:2: note: Control jumps to 'case 10094849:' at line 1616 switch (ctrl->id) { ^ drivers/media/i2c/ov7670.c:1619:7: note: Assuming field 'val' is equal to V4L2_EXPOSURE_MANUAL if (ctrl->val == V4L2_EXPOSURE_MANUAL) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov7670.c:1619:3: note: Taking true branch if (ctrl->val == V4L2_EXPOSURE_MANUAL) { ^ drivers/media/i2c/ov7670.c:1621:11: note: Calling 'ov7670_s_exp' return ov7670_s_exp(sd, info->exposure->val); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov7670.c:1519:16: note: 'com1' declared without an initial value unsigned char com1, com8, aech, aechh; ^~~~ drivers/media/i2c/ov7670.c:1521:8: note: Calling 'ov7670_read' ret = ov7670_read(sd, REG_COM1, &com1) + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov7670.c:565:6: note: Assuming field 'use_smbus' is true if (info->use_smbus) ^~~~~~~~~~~~~~~ drivers/media/i2c/ov7670.c:565:2: note: Taking true branch if (info->use_smbus) ^ drivers/media/i2c/ov7670.c:566:10: note: Calling 'ov7670_read_smbus' return ov7670_read_smbus(sd, reg, value); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov7670.c:485:6: note: Assuming 'ret' is < 0 if (ret >= 0) { ^~~~~~~~ drivers/media/i2c/ov7670.c:485:2: note: Taking false branch if (ret >= 0) { ^ drivers/media/i2c/ov7670.c:489:2: note: Returning without writing to '*value' return ret; ^ drivers/media/i2c/ov7670.c:566:10: note: Returning from 'ov7670_read_smbus' return ov7670_read_smbus(sd, reg, value); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov7670.c:566:3: note: Returning without writing to '*value' return ov7670_read_smbus(sd, reg, value); ^ drivers/media/i2c/ov7670.c:1521:8: note: Returning from 'ov7670_read' ret = ov7670_read(sd, REG_COM1, &com1) + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/media/i2c/ov7670.c:1524:6: note: Assuming 'ret' is 0 if (ret) ^~~ vim +587 drivers/media/i2c/ov5648.c e43ccb0a045f34 Paul Kocialkowski 2020-12-31 575 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 576 /* e43ccb0a045f34 Paul Kocialkowski 2020-12-31 577 * General formulas for (array-centered) mode calculation: e43ccb0a045f34 Paul Kocialkowski 2020-12-31 578 * - photo_array_width = 2624 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 579 * - crop_start_x = (photo_array_width - output_size_x) / 2 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 580 * - crop_end_x = crop_start_x + offset_x + output_size_x - 1 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 581 * e43ccb0a045f34 Paul Kocialkowski 2020-12-31 582 * - photo_array_height = 1956 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 583 * - crop_start_y = (photo_array_height - output_size_y) / 2 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 584 * - crop_end_y = crop_start_y + offset_y + output_size_y - 1 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 585 */ e43ccb0a045f34 Paul Kocialkowski 2020-12-31 586 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 @587 struct ov5648_mode { e43ccb0a045f34 Paul Kocialkowski 2020-12-31 588 unsigned int crop_start_x; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 589 unsigned int offset_x; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 590 unsigned int output_size_x; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 591 unsigned int crop_end_x; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 592 unsigned int hts; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 593 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 594 unsigned int crop_start_y; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 595 unsigned int offset_y; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 596 unsigned int output_size_y; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 597 unsigned int crop_end_y; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 598 unsigned int vts; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 599 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 600 bool binning_x; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 601 bool binning_y; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 602 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 603 unsigned int inc_x_odd; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 604 unsigned int inc_x_even; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 605 unsigned int inc_y_odd; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 606 unsigned int inc_y_even; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 607 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 608 /* 8-bit frame interval followed by 10-bit frame interval. */ e43ccb0a045f34 Paul Kocialkowski 2020-12-31 609 struct v4l2_fract frame_interval[2]; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 610 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 611 /* 8-bit config followed by 10-bit config. */ e43ccb0a045f34 Paul Kocialkowski 2020-12-31 612 const struct ov5648_pll1_config *pll1_config[2]; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 613 const struct ov5648_pll2_config *pll2_config; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 614 e43ccb0a045f34 Paul Kocialkowski 2020-12-31 615 const struct ov5648_register_value *register_values; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 616 unsigned int register_values_count; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 617 }; e43ccb0a045f34 Paul Kocialkowski 2020-12-31 618 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
