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:   9ff50bf2f2ff5fab01cac26d8eed21a89308e6ef
commit: e43ccb0a045f34838b786e8021dc4838b4af5c38 media: i2c: Add support for 
the OV5648 image sensor
date:   7 months ago
:::::: branch date: 18 hours ago
:::::: commit date: 7 months ago
config: x86_64-randconfig-c007-20210821 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
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 >>)
           ^
   net/socket.c:2856:9: note: Taking false branch
           call = array_index_nospec(call, SYS_SENDMMSG + 1);
                  ^
   include/linux/nospec.h:58:2: note: expanded from macro 'array_index_nospec'
           BUILD_BUG_ON(sizeof(_s) > sizeof(long));                        \
           ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
           BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
           ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ^
   include/linux/compiler_types.h:326:2: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           ^
   include/linux/compiler_types.h:314:2: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:306:3: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                   ^
   net/socket.c:2856:9: note: Loop condition is false.  Exiting loop
           call = array_index_nospec(call, SYS_SENDMMSG + 1);
                  ^
   include/linux/nospec.h:58:2: note: expanded from macro 'array_index_nospec'
           BUILD_BUG_ON(sizeof(_s) > sizeof(long));                        \
           ^
   include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
           BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
           ^
   include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ^
   include/linux/compiler_types.h:326:2: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           ^
   include/linux/compiler_types.h:314:2: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:304:2: note: expanded from macro 
'__compiletime_assert'
           do {                                                            \
           ^
   net/socket.c:2859:6: note: Assuming the condition is false
           if (len > sizeof(a))
               ^~~~~~~~~~~~~~~
   net/socket.c:2859:2: note: Taking false branch
           if (len > sizeof(a))
           ^
   net/socket.c:2863:6: note: Calling 'copy_from_user'
           if (copy_from_user(a, args, len))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/uaccess.h:191:6: note: Assuming the condition is true
           if (likely(check_copy_size(to, n, false)))
               ^
   include/linux/compiler.h:77:38: note: expanded from macro 'likely'
   # define likely(x)      __builtin_expect(!!(x), 1)
                                             ^~~~
   include/linux/uaccess.h:191:2: note: Taking false branch
           if (likely(check_copy_size(to, n, false)))
           ^
   include/linux/uaccess.h:193:2: note: Returning without writing to '*to'
           return n;
           ^
   include/linux/uaccess.h:193:2: note: Returning value (loaded from 'n'), 
which participates in a condition later
           return n;
           ^~~~~~~~
   net/socket.c:2863:6: note: Returning from 'copy_from_user'
           if (copy_from_user(a, args, len))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/socket.c:2863:6: note: Assuming the condition is false
           if (copy_from_user(a, args, len))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/socket.c:2863:2: note: Taking false branch
           if (copy_from_user(a, args, len))
           ^
   net/socket.c:2866:8: note: Calling 'audit_socketcall'
           err = audit_socketcall(nargs[call] / sizeof(unsigned long), a);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/audit.h:611:2: note: Returning without writing to '*args'
           return 0;
           ^
   include/linux/audit.h:611:2: note: Returning zero, which participates in a 
condition later
           return 0;
           ^~~~~~~~
   net/socket.c:2866:8: note: Returning from 'audit_socketcall'
           err = audit_socketcall(nargs[call] / sizeof(unsigned long), a);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/socket.c:2867:6: note: 'err' is 0
           if (err)
               ^~~
   net/socket.c:2867:2: note: Taking false branch
           if (err)
           ^
   net/socket.c:2870:5: note: Assigned value is garbage or undefined
           a0 = a[0];
              ^ ~~~~
   Suppressed 11 warnings (11 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.
>> 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 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.
   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.
   drivers/media/i2c/ov5695.c:1135:3: warning: Value stored to 'ret' is never 
read [clang-analyzer-deadcode.DeadStores]
                   ret = ov5695_write_reg(ov5695->client, 
OV5695_REG_DIGI_GAIN_L,
                   ^     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/ov5695.c:1135:3: note: Value stored to 'ret' is never read
                   ret = ov5695_write_reg(ov5695->client, 
OV5695_REG_DIGI_GAIN_L,
                   ^     
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   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.
   drivers/media/i2c/ov772x.c:583:21: warning: Value stored to 'client' during 
its initialization is never read [clang-analyzer-deadcode.DeadStores]
           struct i2c_client *client = v4l2_get_subdevdata(sd);
                              ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/i2c/ov772x.c:583:21: note: Value stored to 'client' during its 
initialization is never read
           struct i2c_client *client = v4l2_get_subdevdata(sd);
                              ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~
   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.
   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.
   11 warnings generated.
   Suppressed 11 warnings (11 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.
   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.
   3 warnings generated.
   Suppressed 3 warnings (3 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.
   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.
   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.
   kernel/workqueue.c:147:8: warning: Excessive padding in 'struct worker_pool' 
(64 padding bytes, where 0 is optimal). 
   Optimal fields order: 
   nr_running, 
   cpu, 
   watchdog_ts, 
   manager, 
   detach_completion, 
   attrs, 
   worklist, 
   idle_list, 
   workers, 
   hash_node, 
   rcu, 
   lock, 
   idle_timer, 

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]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to