CC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Robert Foss <[email protected]>
CC: Mauro Carvalho Chehab <[email protected]>
CC: [email protected]
CC: Hans Verkuil <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   99613159ad749543621da8238acf1a122880144e
commit: 2fa698e3da84edc6b7a2d670f8bd5035891a744e media: camss: vfe: Decrease 
priority of of VFE HW version to 'dbg'
date:   4 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 4 months ago
config: riscv-randconfig-c006-20220111 
(https://download.01.org/0day-ci/archive/20220119/[email protected]/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
244dd2913a43a200f5a6544d424cdc37b771028b)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2fa698e3da84edc6b7a2d670f8bd5035891a744e
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 2fa698e3da84edc6b7a2d670f8bd5035891a744e
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 
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 >>)
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   drivers/media/dvb-frontends/stv0297.c:64:2: note: Taking true branch
           if (state->config->stop_during_read) {
           ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/media/dvb-frontends/stv0297.c:65:7: note: Assuming the condition is 
false
                   if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) {
                       ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                      ^~~~
   drivers/media/dvb-frontends/stv0297.c:65:3: note: '?' condition is false
                   if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) {
                   ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                 ^
   drivers/media/dvb-frontends/stv0297.c:65:7: note: Assuming the condition is 
true
                   if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) {
                       ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                                
        ^~~~
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^~~~
   drivers/media/dvb-frontends/stv0297.c:65:3: note: '?' condition is true
                   if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) {
                   ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   drivers/media/dvb-frontends/stv0297.c:65:3: note: Taking true branch
                   if ((ret = i2c_transfer(state->i2c, &msg[0], 1)) != 1) {
                   ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/media/dvb-frontends/stv0297.c:66:4: note: Loop condition is false.  
Exiting loop
                           dprintk("%s: readreg error (reg == 0x%02x, ret == 
%i)\n", __func__, reg, ret);
                           ^
   drivers/media/dvb-frontends/stv0297.c:31:23: note: expanded from macro 
'dprintk'
   #define dprintk(x...) printk(x)
                         ^
   include/linux/printk.h:446:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                            ^
   include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap'
                   __printk_index_emit(_fmt, NULL, NULL);                  \
                   ^
   include/linux/printk.h:392:34: note: expanded from macro 
'__printk_index_emit'
   #define __printk_index_emit(...) do {} while (0)
                                    ^
   drivers/media/dvb-frontends/stv0297.c:67:4: note: Returning the value -1
                           return -1;
                           ^~~~~~~~~
   drivers/media/dvb-frontends/stv0297.c:130:10: note: Returning from 
'stv0297_readreg'
                       | (stv0297_readreg(state, 0x58) << 24));
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/dvb-frontends/stv0297.c:130:39: note: The result of the left 
shift is undefined because the left operand is negative
                       | (stv0297_readreg(state, 0x58) << 24));
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
   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.
   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.
   2 warnings generated.
   Suppressed 2 warnings (2 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.
   2 warnings generated.
   Suppressed 2 warnings (2 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/platform/qcom/camss/camss-vfe-170.c:184:6: warning: Value 
>> stored to 'gen' during its initialization is never read 
>> [clang-analyzer-deadcode.DeadStores]
           u32 gen = (hw_version >> 28) & 0xF;
               ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:184:6: note: Value stored 
to 'gen' during its initialization is never read
           u32 gen = (hw_version >> 28) & 0xF;
               ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/qcom/camss/camss-vfe-170.c:185:6: warning: Value 
>> stored to 'rev' during its initialization is never read 
>> [clang-analyzer-deadcode.DeadStores]
           u32 rev = (hw_version >> 16) & 0xFFF;
               ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:185:6: note: Value stored 
to 'rev' during its initialization is never read
           u32 rev = (hw_version >> 16) & 0xFFF;
               ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/qcom/camss/camss-vfe-170.c:186:6: warning: Value 
>> stored to 'step' during its initialization is never read 
>> [clang-analyzer-deadcode.DeadStores]
           u32 step = hw_version & 0xFFFF;
               ^~~~   ~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:186:6: note: Value stored 
to 'step' during its initialization is never read
           u32 step = hw_version & 0xFFFF;
               ^~~~   ~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:336:6: warning: Value 
stored to 'violation' during its initialization is never read 
[clang-analyzer-deadcode.DeadStores]
           u32 violation = readl_relaxed(vfe->base + VFE_VIOLATION_STATUS);
               ^~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:336:6: note: Value stored 
to 'violation' during its initialization is never read
           u32 violation = readl_relaxed(vfe->base + VFE_VIOLATION_STATUS);
               ^~~~~~~~~
   Suppressed 4 warnings (3 in non-user code, 1 with check filters).
   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.
   4 warnings generated.
   include/media/v4l2-subdev.h:1000:10: warning: Access to field 'pads' results 
in a dereference of a null pointer (loaded from variable 'state') 
[clang-analyzer-core.NullDereference]
           return &state->pads[pad].try_fmt;
                   ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1531:14: note: Assuming 'i' is 
< field 'line_num'
           for (i = 0; i < vfe->line_num; i++) {
                       ^~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1531:2: note: Loop condition 
is true.  Entering loop body
           for (i = 0; i < vfe->line_num; i++) {
           ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1541:3: note: '?' condition is 
false
                   if (i == VFE_LINE_PIX)
                   ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                 ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1541:7: note: 'i' is not equal 
to VFE_LINE_PIX
                   if (i == VFE_LINE_PIX)
                       ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                                
        ^~~~
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1541:3: note: '?' condition is 
false
                   if (i == VFE_LINE_PIX)
                   ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1541:3: note: Taking false 
branch
                   if (i == VFE_LINE_PIX)
                   ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1550:9: note: Calling 
'vfe_init_formats'
                   ret = vfe_init_formats(sd, NULL);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1256:12: note: 'fh' is null
                   .which = fh ? V4L2_SUBDEV_FORMAT_TRY :
                            ^~
   drivers/media/platform/qcom/camss/camss-vfe.c:1256:12: note: '?' condition 
is false
   drivers/media/platform/qcom/camss/camss-vfe.c:1265:28: note: 'fh' is null
           return vfe_set_format(sd, fh ? fh->state : NULL, &format);
                                     ^~
   drivers/media/platform/qcom/camss/camss-vfe.c:1265:28: note: '?' condition 
is false
   drivers/media/platform/qcom/camss/camss-vfe.c:1265:28: note: Passing null 
pointer value via 2nd parameter 'sd_state'
           return vfe_set_format(sd, fh ? fh->state : NULL, &format);
                                     ^~
   drivers/media/platform/qcom/camss/camss-vfe.c:1265:9: note: Calling 
'vfe_set_format'
           return vfe_set_format(sd, fh ? fh->state : NULL, &format);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1074:6: note: 'format' is not 
equal to null
           if (format == NULL)
               ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                      ^~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1074:2: note: '?' condition is 
false
           if (format == NULL)
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                 ^
--
           ^
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:71:7: note: Assuming the 
condition is true
                   if ((PAGE_SIZE << order) > size)
                       ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                      ^~~~
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:71:3: note: '?' condition 
is false
                   if ((PAGE_SIZE << order) > size)
                   ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                 ^
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:71:3: note: '?' condition 
is true
                   if ((PAGE_SIZE << order) > size)
                   ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:71:3: note: Taking true 
branch
                   if ((PAGE_SIZE << order) > size)
                   ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:72:4: note: The value -1 
is assigned to 'order'
                           order--;
                           ^~~~~~~
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:75:3: note: Loop condition 
is true.  Entering loop body
                   while (!pages) {
                   ^
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:78:4: note: Assuming 
'pages' is non-null
                           if (pages)
                           ^
   include/linux/compiler.h:56:45: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                      ^~~~
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:78:4: note: '?' condition 
is false
                           if (pages)
                           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                 ^
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:78:8: note: 'pages' is 
non-null
                           if (pages)
                               ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                                
        ^~~~
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^~~~
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:78:4: note: '?' condition 
is true
                           if (pages)
                           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:78:4: note: Taking true 
branch
                           if (pages)
                           ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:79:5: note:  Execution 
continues on line 89
                                   break;
                                   ^
   drivers/media/common/videobuf2/videobuf2-dma-sg.c:90:22: note: The result of 
the left shift is undefined because the right operand is negative
                   for (i = 0; i < (1 << order); i++)
                                      ^  ~~~~~
   Suppressed 2 warnings (2 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/platform/qcom/camss/camss-vfe-170.c:184:6: warning: Value 
>> stored to 'gen' during its initialization is never read 
>> [clang-analyzer-deadcode.DeadStores]
           u32 gen = (hw_version >> 28) & 0xF;
               ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:184:6: note: Value stored 
to 'gen' during its initialization is never read
           u32 gen = (hw_version >> 28) & 0xF;
               ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/qcom/camss/camss-vfe-170.c:185:6: warning: Value 
>> stored to 'rev' during its initialization is never read 
>> [clang-analyzer-deadcode.DeadStores]
           u32 rev = (hw_version >> 16) & 0xFFF;
               ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:185:6: note: Value stored 
to 'rev' during its initialization is never read
           u32 rev = (hw_version >> 16) & 0xFFF;
               ^~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/platform/qcom/camss/camss-vfe-170.c:186:6: warning: Value 
>> stored to 'step' during its initialization is never read 
>> [clang-analyzer-deadcode.DeadStores]
           u32 step = hw_version & 0xFFFF;
               ^~~~   ~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:186:6: note: Value stored 
to 'step' during its initialization is never read
           u32 step = hw_version & 0xFFFF;
               ^~~~   ~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:336:6: warning: Value 
stored to 'violation' during its initialization is never read 
[clang-analyzer-deadcode.DeadStores]
           u32 violation = readl_relaxed(vfe->base + VFE_VIOLATION_STATUS);
               ^~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe-170.c:336:6: note: Value stored 
to 'violation' during its initialization is never read
           u32 violation = readl_relaxed(vfe->base + VFE_VIOLATION_STATUS);
               ^~~~~~~~~
   Suppressed 4 warnings (3 in non-user code, 1 with check filters).
   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.
   4 warnings generated.
   include/media/v4l2-subdev.h:1000:10: warning: Access to field 'pads' results 
in a dereference of a null pointer (loaded from variable 'state') 
[clang-analyzer-core.NullDereference]
           return &state->pads[pad].try_fmt;
                   ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1531:14: note: Assuming 'i' is 
< field 'line_num'
           for (i = 0; i < vfe->line_num; i++) {
                       ^~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1531:2: note: Loop condition 
is true.  Entering loop body
           for (i = 0; i < vfe->line_num; i++) {
           ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1541:3: note: '?' condition is 
false
                   if (i == VFE_LINE_PIX)
                   ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                 ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1541:7: note: 'i' is not equal 
to VFE_LINE_PIX
                   if (i == VFE_LINE_PIX)
                       ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                                
        ^~~~
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1541:3: note: '?' condition is 
false
                   if (i == VFE_LINE_PIX)
                   ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1541:3: note: Taking false 
branch
                   if (i == VFE_LINE_PIX)
                   ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/media/platform/qcom/camss/camss-vfe.c:1550:9: note: Calling 
'vfe_init_formats'
                   ret = vfe_init_formats(sd, NULL);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1256:12: note: 'fh' is null
                   .which = fh ? V4L2_SUBDEV_FORMAT_TRY :
                            ^~
   drivers/media/platform/qcom/camss/camss-vfe.c:1256:12: note: '?' condition 
is false
   drivers/media/platform/qcom/camss/camss-vfe.c:1265:28: note: 'fh' is null
           return vfe_set_format(sd, fh ? fh->state : NULL, &format);
                                     ^~
   drivers/media/platform/qcom/camss/camss-vfe.c:1265:28: note: '?' condition 
is false
   drivers/media/platform/qcom/camss/camss-vfe.c:1265:28: note: Passing null 
pointer value via 2nd parameter 'sd_state'
           return vfe_set_format(sd, fh ? fh->state : NULL, &format);
                                     ^~
   drivers/media/platform/qcom/camss/camss-vfe.c:1265:9: note: Calling 
'vfe_set_format'
           return vfe_set_format(sd, fh ? fh->state : NULL, &format);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1074:6: note: 'format' is not 
equal to null
           if (format == NULL)
               ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                      ^~~~
   drivers/media/platform/qcom/camss/camss-vfe.c:1074:2: note: '?' condition is 
false
           if (format == NULL)
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                 ^

vim +/gen +184 drivers/media/platform/qcom/camss/camss-vfe-170.c

7319cdf189bb64 Robert Foss 2021-03-16  179  
7319cdf189bb64 Robert Foss 2021-03-16  180  static void 
vfe_hw_version_read(struct vfe_device *vfe, struct device *dev)
7319cdf189bb64 Robert Foss 2021-03-16  181  {
7319cdf189bb64 Robert Foss 2021-03-16  182      u32 hw_version = 
readl_relaxed(vfe->base + VFE_HW_VERSION);
7319cdf189bb64 Robert Foss 2021-03-16  183  
7319cdf189bb64 Robert Foss 2021-03-16 @184      u32 gen = (hw_version >> 28) & 
0xF;
7319cdf189bb64 Robert Foss 2021-03-16 @185      u32 rev = (hw_version >> 16) & 
0xFFF;
7319cdf189bb64 Robert Foss 2021-03-16 @186      u32 step = hw_version & 0xFFFF;
7319cdf189bb64 Robert Foss 2021-03-16  187  
2fa698e3da84ed Robert Foss 2021-07-26  188      dev_dbg(dev, "VFE HW Version = 
%u.%u.%u\n", gen, rev, step);
7319cdf189bb64 Robert Foss 2021-03-16  189  }
7319cdf189bb64 Robert Foss 2021-03-16  190  

:::::: The code at line 184 was first introduced by commit
:::::: 7319cdf189bb643c6d56e5898ef89ad7c3ef6c31 media: camss: Add support for 
VFE hardware version Titan 170

:::::: TO: Robert Foss <[email protected]>
:::::: CC: Mauro Carvalho Chehab <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to