CC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Daniel Palmer <[email protected]>

tree:   git://github.com/linux-chenxing/linux.git msc313_mainlining
head:   17a0ed91a3dc1dc1074446b16909ead13a6593a4
commit: 5119e24f7f04d53e9b2b0915e0129801befeb37c [40/79] pinctrl: mstar: msc313 
pinctrl driver
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: arm-randconfig-c002-20211225 
(https://download.01.org/0day-ci/archive/20211226/[email protected]/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
a9e8b1ee7fd44b53c555a7823ae8fd1a8209c520)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 
https://github.com/linux-chenxing/linux/commit/5119e24f7f04d53e9b2b0915e0129801befeb37c
        git remote add chenxing git://github.com/linux-chenxing/linux.git
        git fetch --no-tags chenxing msc313_mainlining
        git checkout 5119e24f7f04d53e9b2b0915e0129801befeb37c
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> drivers/pinctrl/mstar/pinctrl-msc313-pm.c:35:27: warning: unused variable 
>> 'pm_uart_groups' [-Wunused-const-variable]
   static const char * const pm_uart_groups[] = {
                             ^
>> drivers/pinctrl/mstar/pinctrl-msc313-pm.c:39:27: warning: unused variable 
>> 'pm_spi_groups' [-Wunused-const-variable]
   static const char * const pm_spi_groups[] = {
                             ^
>> drivers/pinctrl/mstar/pinctrl-msc313-pm.c:43:27: warning: unused variable 
>> 'pm_irin_groups' [-Wunused-const-variable]
   static const char * const pm_irin_groups[] = {
                             ^
   3 warnings generated.


clang-analyzer warnings: (new ones prefixed by >>)
                   ^~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c:68:3: note: Call to 
function 'strcpy' is insecure as it does not provide bounding of the memory 
buffer. Replace unbounded copy functions with analogous functions that support 
length arguments such as 'strlcpy'. CWE-119
                   strcpy(dst, prefix);
                   ^~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c:71:3: warning: Call 
to function 'strcpy' is insecure as it does not provide bounding of the memory 
buffer. Replace unbounded copy functions with analogous functions that support 
length arguments such as 'strlcpy'. CWE-119 
[clang-analyzer-security.insecureAPI.strcpy]
                   strcpy(dst, src);
                   ^~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c:71:3: note: Call to 
function 'strcpy' is insecure as it does not provide bounding of the memory 
buffer. Replace unbounded copy functions with analogous functions that support 
length arguments such as 'strlcpy'. CWE-119
                   strcpy(dst, src);
                   ^~~~~~
   Suppressed 15 warnings (15 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   16 warnings generated.
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:670:49: warning: The result of 
the left shift is undefined because the left operand is negative 
[clang-analyzer-core.UndefinedBinaryOperatorResult]
           dispc_write_reg(DISPC_OVL_CONV_COEF(plane, 2), CVAL(ct->gcb, 
ct->gcr));
                                                          ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:666:21: note: expanded from 
macro 'CVAL'
   #define CVAL(x, y) (FLD_VAL(x, 26, 16) | FLD_VAL(y, 10, 0))
                       ^
   drivers/video/fbdev/omap2/omapfb/dss/dss.h:60:42: note: expanded from macro 
'FLD_VAL'
   #define FLD_VAL(val, start, end) (((val) << (end)) & FLD_MASK(start, end))
                                            ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:4049:6: note: Assuming the 
condition is true
           if (REG_GET(DISPC_CONFIG, 2, 1) != OMAP_DSS_LOAD_FRAME_ONLY) {
               ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:49:2: note: expanded from macro 
'REG_GET'
           FLD_GET(dispc_read_reg(idx), start, end)
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dss.h:61:34: note: expanded from macro 
'FLD_GET'
   #define FLD_GET(val, start, end) (((val) & FLD_MASK(start, end)) >> (end))
                                    ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:4049:2: note: Taking true branch
           if (REG_GET(DISPC_CONFIG, 2, 1) != OMAP_DSS_LOAD_FRAME_ONLY) {
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:4050:3: note: Calling 
'_omap_dispc_initial_config'
                   _omap_dispc_initial_config();
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3721:6: note: Assuming the 
condition is false
           if (dss_has_feature(FEAT_CORE_CLK_DIV)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3721:2: note: Taking false 
branch
           if (dss_has_feature(FEAT_CORE_CLK_DIV)) {
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3732:6: note: Assuming the 
condition is false
           if (dss_has_feature(FEAT_FUNCGATED))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3732:2: note: Taking false 
branch
           if (dss_has_feature(FEAT_FUNCGATED))
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3735:2: note: Calling 
'dispc_setup_color_conv_coef'
           dispc_setup_color_conv_coef();
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:692:14: note: Assuming 'i' is 
>= 'num_ovl'
           for (i = 1; i < num_ovl; i++)
                       ^~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:692:2: note: Loop condition is 
false. Execution continues on line 695
           for (i = 1; i < num_ovl; i++)
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:695:6: note: Assuming field 
'has_writeback' is true
           if (dispc.feat->has_writeback)
               ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:695:2: note: Taking true branch
           if (dispc.feat->has_writeback)
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:696:3: note: Calling 
'dispc_ovl_write_color_conv_coef'
                   dispc_ovl_write_color_conv_coef(OMAP_DSS_WB, 
&ctbl_bt601_5_wb);
                   
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:670:49: note: The result of the 
left shift is undefined because the left operand is negative
           dispc_write_reg(DISPC_OVL_CONV_COEF(plane, 2), CVAL(ct->gcb, 
ct->gcr));
                                                          ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:666:21: note: expanded from 
macro 'CVAL'
   #define CVAL(x, y) (FLD_VAL(x, 26, 16) | FLD_VAL(y, 10, 0))
                       ^~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dss.h:60:42: note: expanded from macro 
'FLD_VAL'
   #define FLD_VAL(val, start, end) (((val) << (end)) & FLD_MASK(start, end))
                                      ~~~~~ ^
   Suppressed 15 warnings (15 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   17 warnings generated.
>> drivers/pinctrl/mstar/pinctrl-mstar.c:88:2: warning: Undefined or garbage 
>> value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
           return ret;
           ^      ~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:80:9: note: 'ret' declared without an 
initial value
           int i, ret;
                  ^~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:82:14: note: Assuming 'i' is >= field 
'ngroups'
           for (i = 0; i < pinctrl->info->ngroups; i++) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:82:2: note: Loop condition is false. 
Execution continues on line 88
           for (i = 0; i < pinctrl->info->ngroups; i++) {
           ^
   drivers/pinctrl/mstar/pinctrl-mstar.c:88:2: note: Undefined or garbage value 
returned to caller
           return ret;
           ^      ~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:112:2: warning: Undefined or garbage 
value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
           return ret;
           ^      ~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:93:9: note: 'ret' declared without an 
initial value
           int i, ret;
                  ^~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:95:14: note: Assuming 'i' is >= field 
'nfunctions'
           for (i = 0; i < pinctrl->info->nfunctions; i++) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:95:2: note: Loop condition is false. 
Execution continues on line 112
           for (i = 0; i < pinctrl->info->nfunctions; i++) {
           ^
   drivers/pinctrl/mstar/pinctrl-mstar.c:112:2: note: Undefined or garbage 
value returned to caller
           return ret;
           ^      ~~~
   Suppressed 15 warnings (15 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.
>> drivers/pinctrl/mstar/pinctrl-msc313-pm.c:391:2: warning: Value stored to 
>> 'ret' is never read [clang-analyzer-deadcode.DeadStores]
           ret = mstar_pinctrl_parse_functions(pinctrl);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-msc313-pm.c:391:2: note: Value stored to 'ret' 
is never read
           ret = mstar_pinctrl_parse_functions(pinctrl);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-msc313-pm.c:392:2: warning: Value stored to 
'ret' is never read [clang-analyzer-deadcode.DeadStores]
           ret = mstar_pinctrl_parse_groups(pinctrl);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-msc313-pm.c:392:2: note: Value stored to 'ret' 
is never read
           ret = mstar_pinctrl_parse_groups(pinctrl);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 3 warnings (3 with check filters).
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   20 warnings generated.
   fs/afs/fsclient.c:685:3: warning: Value stored to 'bp' is never read 
[clang-analyzer-deadcode.DeadStores]
                   bp = (void *) bp + padsz;
                   ^    ~~~~~~~~~~~~~~~~~~~
   fs/afs/fsclient.c:685:3: note: Value stored to 'bp' is never read
                   bp = (void *) bp + padsz;
                   ^    ~~~~~~~~~~~~~~~~~~~
   fs/afs/fsclient.c:732:3: warning: Value stored to 'bp' is never read 
[clang-analyzer-deadcode.DeadStores]
                   bp = (void *) bp + padsz;
                   ^    ~~~~~~~~~~~~~~~~~~~
   fs/afs/fsclient.c:732:3: note: Value stored to 'bp' is never read
                   bp = (void *) bp + padsz;
                   ^    ~~~~~~~~~~~~~~~~~~~
   fs/afs/fsclient.c:1003:3: warning: Value stored to 'bp' is never read 
[clang-analyzer-deadcode.DeadStores]
                   bp = (void *) bp + n_padsz;
                   ^    ~~~~~~~~~~~~~~~~~~~~~
   fs/afs/fsclient.c:1003:3: note: Value stored to 'bp' is never read
                   bp = (void *) bp + n_padsz;
                   ^    ~~~~~~~~~~~~~~~~~~~~~
   fs/afs/fsclient.c:1674:36: warning: The left operand of '-' is a garbage 
value [clang-analyzer-core.UndefinedBinaryOperatorResult]
                   afs_extract_discard(call, (count - 1) * sizeof(__be32));
                                              ~~~~~ ^
   fs/afs/fsclient.c:1638:2: note: 'count' declared without an initial value
           u32 count;
           ^~~~~~~~~
   fs/afs/fsclient.c:1641:2: note: Taking false branch
           _enter("{%u,%zu}", call->unmarshall, iov_iter_count(call->iter));
           ^
   fs/afs/internal.h:1677:25: note: expanded from macro '_enter'
   #define _enter(FMT,...) no_printk("==> %s("FMT")",__func__ ,##__VA_ARGS__)
                           ^
   include/linux/printk.h:131:2: note: expanded from macro 'no_printk'
           if (0)                                          \
           ^
   fs/afs/fsclient.c:1643:2: note: Control jumps to 'case 2:'  at line 1669
           switch (call->unmarshall) {
           ^
   fs/afs/fsclient.c:1671:7: note: Assuming 'ret' is >= 0
                   if (ret < 0)
                       ^~~~~~~
   fs/afs/fsclient.c:1671:3: note: Taking false branch
                   if (ret < 0)
                   ^
   fs/afs/fsclient.c:1674:36: note: The left operand of '-' is a garbage value
                   afs_extract_discard(call, (count - 1) * sizeof(__be32));
                                              ~~~~~ ^
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   17 warnings generated.
   drivers/clk/clk-vt8500.c:301:2: warning: Value stored to 'rc' is never read 
[clang-analyzer-deadcode.DeadStores]
           rc = of_clk_add_hw_provider(node, of_clk_hw_simple_get, hw);
           ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/clk/clk-vt8500.c:301:2: note: Value stored to 'rc' is never read
           rc = of_clk_add_hw_provider(node, of_clk_hw_simple_get, hw);
           ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/clk/clk-vt8500.c:715:2: warning: Value stored to 'rc' is never read 
[clang-analyzer-deadcode.DeadStores]
           rc = of_clk_add_hw_provider(node, of_clk_hw_simple_get, hw);
           ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/clk/clk-vt8500.c:715:2: note: Value stored to 'rc' is never read
           rc = of_clk_add_hw_provider(node, of_clk_hw_simple_get, hw);
           ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 15 warnings (15 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.
   17 warnings generated.
   drivers/clk/baikal-t1/ccu-pll.c:258:45: warning: The left operand of '-' is 
a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
           val = FIELD_PREP(CCU_PLL_CTL_CLKR_MASK, nr - 1) |
                                                      ^
   include/linux/bitfield.h:94:33: note: expanded from macro 'FIELD_PREP'
                   __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
                                                 ^~~~
   include/linux/bitfield.h:49:41: note: expanded from macro '__BF_FIELD_CHECK'
                   BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?           \
                                                         ^~~~
--
                           ^
   include/linux/printk.h:131:2: note: expanded from macro 'no_printk'
           if (0)                                          \
           ^
   fs/afs/fsclient.c:1643:2: note: Control jumps to 'case 2:'  at line 1669
           switch (call->unmarshall) {
           ^
   fs/afs/fsclient.c:1671:7: note: Assuming 'ret' is >= 0
                   if (ret < 0)
                       ^~~~~~~
   fs/afs/fsclient.c:1671:3: note: Taking false branch
                   if (ret < 0)
                   ^
   fs/afs/fsclient.c:1674:36: note: The left operand of '-' is a garbage value
                   afs_extract_discard(call, (count - 1) * sizeof(__be32));
                                              ~~~~~ ^
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   17 warnings generated.
   drivers/video/fbdev/omap2/omapfb/omapfb-main.c:1554:3: warning: Value stored 
to 'rg' is never read [clang-analyzer-deadcode.DeadStores]
                   rg = ofbi->region;
                   ^    ~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/omapfb-main.c:1554:3: note: Value stored to 
'rg' is never read
                   rg = ofbi->region;
                   ^    ~~~~~~~~~~~~
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   17 warnings generated.
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:514:6: warning: Value stored 
to 'mode_idx' during its initialization is never read 
[clang-analyzer-deadcode.DeadStores]
           int mode_idx = mode->mode_idx;
               ^~~~~~~~   ~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:514:6: note: Value stored to 
'mode_idx' during its initialization is never read
           int mode_idx = mode->mode_idx;
               ^~~~~~~~   ~~~~~~~~~~~~~~
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   17 warnings generated.
>> drivers/pinctrl/mstar/pinctrl-mstar.c:88:2: warning: Undefined or garbage 
>> value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
           return ret;
           ^      ~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:80:9: note: 'ret' declared without an 
initial value
           int i, ret;
                  ^~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:82:14: note: Assuming 'i' is >= field 
'ngroups'
           for (i = 0; i < pinctrl->info->ngroups; i++) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:82:2: note: Loop condition is false. 
Execution continues on line 88
           for (i = 0; i < pinctrl->info->ngroups; i++) {
           ^
   drivers/pinctrl/mstar/pinctrl-mstar.c:88:2: note: Undefined or garbage value 
returned to caller
           return ret;
           ^      ~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:112:2: warning: Undefined or garbage 
value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
           return ret;
           ^      ~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:93:9: note: 'ret' declared without an 
initial value
           int i, ret;
                  ^~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:95:14: note: Assuming 'i' is >= field 
'nfunctions'
           for (i = 0; i < pinctrl->info->nfunctions; i++) {
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-mstar.c:95:2: note: Loop condition is false. 
Execution continues on line 112
           for (i = 0; i < pinctrl->info->nfunctions; i++) {
           ^
   drivers/pinctrl/mstar/pinctrl-mstar.c:112:2: note: Undefined or garbage 
value returned to caller
           return ret;
           ^      ~~~
   Suppressed 15 warnings (15 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.
>> drivers/pinctrl/mstar/pinctrl-msc313-pm.c:391:2: warning: Value stored to 
>> 'ret' is never read [clang-analyzer-deadcode.DeadStores]
           ret = mstar_pinctrl_parse_functions(pinctrl);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-msc313-pm.c:391:2: note: Value stored to 'ret' 
is never read
           ret = mstar_pinctrl_parse_functions(pinctrl);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-msc313-pm.c:392:2: warning: Value stored to 
'ret' is never read [clang-analyzer-deadcode.DeadStores]
           ret = mstar_pinctrl_parse_groups(pinctrl);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pinctrl/mstar/pinctrl-msc313-pm.c:392:2: note: Value stored to 'ret' 
is never read
           ret = mstar_pinctrl_parse_groups(pinctrl);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 3 warnings (3 with check filters).
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   17 warnings generated.
   drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c:68:3: warning: Call 
to function 'strcpy' is insecure as it does not provide bounding of the memory 
buffer. Replace unbounded copy functions with analogous functions that support 
length arguments such as 'strlcpy'. CWE-119 
[clang-analyzer-security.insecureAPI.strcpy]
                   strcpy(dst, prefix);
                   ^~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c:68:3: note: Call to 
function 'strcpy' is insecure as it does not provide bounding of the memory 
buffer. Replace unbounded copy functions with analogous functions that support 
length arguments such as 'strlcpy'. CWE-119
                   strcpy(dst, prefix);
                   ^~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c:71:3: warning: Call 
to function 'strcpy' is insecure as it does not provide bounding of the memory 
buffer. Replace unbounded copy functions with analogous functions that support 
length arguments such as 'strlcpy'. CWE-119 
[clang-analyzer-security.insecureAPI.strcpy]
                   strcpy(dst, src);
                   ^~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/omapdss-boot-init.c:71:3: note: Call to 
function 'strcpy' is insecure as it does not provide bounding of the memory 
buffer. Replace unbounded copy functions with analogous functions that support 
length arguments such as 'strlcpy'. CWE-119
                   strcpy(dst, src);
                   ^~~~~~
   Suppressed 15 warnings (15 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   16 warnings generated.
   Suppressed 16 warnings (16 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.
   15 warnings generated.
   Suppressed 15 warnings (15 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.
   16 warnings generated.
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:670:49: warning: The result of 
the left shift is undefined because the left operand is negative 
[clang-analyzer-core.UndefinedBinaryOperatorResult]
           dispc_write_reg(DISPC_OVL_CONV_COEF(plane, 2), CVAL(ct->gcb, 
ct->gcr));
                                                          ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:666:21: note: expanded from 
macro 'CVAL'
   #define CVAL(x, y) (FLD_VAL(x, 26, 16) | FLD_VAL(y, 10, 0))
                       ^
   drivers/video/fbdev/omap2/omapfb/dss/dss.h:60:42: note: expanded from macro 
'FLD_VAL'
   #define FLD_VAL(val, start, end) (((val) << (end)) & FLD_MASK(start, end))
                                            ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:4049:6: note: Assuming the 
condition is true
           if (REG_GET(DISPC_CONFIG, 2, 1) != OMAP_DSS_LOAD_FRAME_ONLY) {
               ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:49:2: note: expanded from macro 
'REG_GET'
           FLD_GET(dispc_read_reg(idx), start, end)
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dss.h:61:34: note: expanded from macro 
'FLD_GET'
   #define FLD_GET(val, start, end) (((val) & FLD_MASK(start, end)) >> (end))
                                    ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:4049:2: note: Taking true branch
           if (REG_GET(DISPC_CONFIG, 2, 1) != OMAP_DSS_LOAD_FRAME_ONLY) {
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:4050:3: note: Calling 
'_omap_dispc_initial_config'
                   _omap_dispc_initial_config();
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3721:6: note: Assuming the 
condition is false
           if (dss_has_feature(FEAT_CORE_CLK_DIV)) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3721:2: note: Taking false 
branch
           if (dss_has_feature(FEAT_CORE_CLK_DIV)) {
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3732:6: note: Assuming the 
condition is false
           if (dss_has_feature(FEAT_FUNCGATED))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3732:2: note: Taking false 
branch
           if (dss_has_feature(FEAT_FUNCGATED))
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:3735:2: note: Calling 
'dispc_setup_color_conv_coef'
           dispc_setup_color_conv_coef();
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:692:14: note: Assuming 'i' is 
>= 'num_ovl'
           for (i = 1; i < num_ovl; i++)
                       ^~~~~~~~~~~
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:692:2: note: Loop condition is 
false. Execution continues on line 695
           for (i = 1; i < num_ovl; i++)
           ^
   drivers/video/fbdev/omap2/omapfb/dss/dispc.c:695:6: note: Assuming field 
'has_writeback' is true
           if (dispc.feat->has_writeback)
               ^~~~~~~~~~~~~~~~~~~~~~~~~

vim +/pm_uart_groups +35 drivers/pinctrl/mstar/pinctrl-msc313-pm.c

7094a49a4ca2d8 Daniel Palmer 2021-01-10  34  
7094a49a4ca2d8 Daniel Palmer 2021-01-10 @35  static const char * const 
pm_uart_groups[] = {
7094a49a4ca2d8 Daniel Palmer 2021-01-10  36     GROUPNAME_PM_UART,
7094a49a4ca2d8 Daniel Palmer 2021-01-10  37  };
7094a49a4ca2d8 Daniel Palmer 2021-01-10  38  
7094a49a4ca2d8 Daniel Palmer 2021-01-10 @39  static const char * const 
pm_spi_groups[] = {
7094a49a4ca2d8 Daniel Palmer 2021-01-10  40     GROUPNAME_PM_SPI,
7094a49a4ca2d8 Daniel Palmer 2021-01-10  41  };
7094a49a4ca2d8 Daniel Palmer 2021-01-10  42  
7094a49a4ca2d8 Daniel Palmer 2021-01-10 @43  static const char * const 
pm_irin_groups[] = {
7094a49a4ca2d8 Daniel Palmer 2021-01-10  44     GROUPNAME_PM_IRIN,
7094a49a4ca2d8 Daniel Palmer 2021-01-10  45  };
7094a49a4ca2d8 Daniel Palmer 2021-01-10  46  

:::::: The code at line 35 was first introduced by commit
:::::: 7094a49a4ca2d8ebb8a7bf96d8ee2acd717f5c6d pinctrl: mstar: msc313 pm 
pinctrl driver

:::::: TO: Daniel Palmer <[email protected]>
:::::: CC: Daniel Palmer <[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