LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* drivers/gpu/drm/bridge/analogix/anx7625.c:754:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-08-18 10:31 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-18 10:31 UTC (permalink / raw)
  Cc: clang-built-linux, kbuild-all, linux-kernel, Maxime Ripard

[-- Attachment #1: Type: text/plain, Size: 17079 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   614cb2751d3150850d459bee596c397f344a7936
commit: c489573b5b6ce6442ad4658d9d5ec77839b91622 Merge drm/drm-next into drm-misc-next
date:   10 months ago
config: x86_64-randconfig-c001-20210813 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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=c489573b5b6ce6442ad4658d9d5ec77839b91622
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout c489573b5b6ce6442ad4658d9d5ec77839b91622
        # 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 <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
           ^     ~
   net/9p/client.c:2093:2: note: Value stored to 'err' is never read
           err = 0;
           ^     ~
   net/9p/client.c:2153:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
           err = 0;
           ^     ~
   net/9p/client.c:2153:2: note: Value stored to 'err' is never read
           err = 0;
           ^     ~
   net/9p/client.c:2184:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
           err = 0;
           ^     ~
   net/9p/client.c:2184:2: note: Value stored to 'err' is never read
           err = 0;
           ^     ~
   net/9p/client.c:2214:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
           err = 0;
           ^     ~
   net/9p/client.c:2214:2: note: Value stored to 'err' is never read
           err = 0;
           ^     ~
   net/9p/client.c:2247:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
           err = 0;
           ^     ~
   net/9p/client.c:2247:2: note: Value stored to 'err' is never read
           err = 0;
           ^     ~
   net/9p/client.c:2281:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
           err = 0;
           ^     ~
   net/9p/client.c:2281:2: note: Value stored to 'err' is never read
           err = 0;
           ^     ~
   Suppressed 4 warnings (4 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.
   fs/jffs2/nodelist.c:600:9: warning: Access to field 'flash_offset' results in a dereference of a null pointer (loaded from variable 'ref') [clang-analyzer-core.NullDereference]
           while (ref->flash_offset != REF_EMPTY_NODE) {
                  ^
   fs/jffs2/nodelist.c:665:6: note: Assuming 'size' is not equal to 0
           if (!size)
               ^~~~~
   fs/jffs2/nodelist.c:665:2: note: Taking false branch
           if (!size)
           ^
   fs/jffs2/nodelist.c:667:15: note: Assuming 'size' is <= field 'free_size'
           if (unlikely(size > jeb->free_size)) {
                        ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/jffs2/nodelist.c:667:2: note: Taking false branch
           if (unlikely(size > jeb->free_size)) {
           ^
   fs/jffs2/nodelist.c:673:6: note: Assuming field 'last_node' is null
           if (jeb->last_node && ref_obsolete(jeb->last_node)) {
               ^~~~~~~~~~~~~~
   fs/jffs2/nodelist.c:673:21: note: Left side of '&&' is false
           if (jeb->last_node && ref_obsolete(jeb->last_node)) {
                              ^
   fs/jffs2/nodelist.c:685:3: note: Calling 'jffs2_link_node_ref'
                   jffs2_link_node_ref(c, jeb, ofs, size, NULL);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/jffs2/nodelist.c:592:9: note: Assuming field 'allocated_refs' is not equal to 0
           BUG_ON(!jeb->allocated_refs);
                  ^
   include/asm-generic/bug.h:63:45: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                               ^~~~~~~~~
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   fs/jffs2/nodelist.c:592:2: note: Taking false branch
           BUG_ON(!jeb->allocated_refs);
           ^
   include/asm-generic/bug.h:63:32: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                  ^
   fs/jffs2/nodelist.c:592:2: note: Loop condition is false.  Exiting loop
           BUG_ON(!jeb->allocated_refs);
           ^
   include/asm-generic/bug.h:63:27: note: expanded from macro 'BUG_ON'
   #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                             ^
   fs/jffs2/nodelist.c:595:2: note: Null pointer value stored to 'ref'
           ref = jeb->last_node;
           ^~~~~~~~~~~~~~~~~~~~
   fs/jffs2/nodelist.c:600:9: note: Access to field 'flash_offset' results in a dereference of a null pointer (loaded from variable 'ref')
           while (ref->flash_offset != REF_EMPTY_NODE) {
                  ^~~
   Suppressed 4 warnings (4 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.
   Suppressed 4 warnings (4 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.
   Suppressed 4 warnings (4 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/gpu/drm/bridge/analogix/anx7625.c:754:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                           ret = sp_tx_rst_aux(ctx);
                           ^     ~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/anx7625.c:754:4: note: Value stored to 'ret' is never read
                           ret = sp_tx_rst_aux(ctx);
                           ^     ~~~~~~~~~~~~~~~~~~
   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.
   8 warnings generated.
   drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:536:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
           err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2],
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:536:2: note: Value stored to 'err' is never read
           err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2],
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   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/gpu/drm/bridge/analogix/analogix_dp_reg.c:424:2: warning: Value stored to 'reg' is never read [clang-analyzer-deadcode.DeadStores]
           reg = readl(dp->reg_base + ANALOGIX_DP_SYS_CTL_3);
           ^
   drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:424:2: note: Value stored to 'reg' is never read
   Suppressed 7 warnings (6 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.
   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.
   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.
   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.
   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.
   drivers/iio/magnetometer/hmc5843_core.c:127:8: warning: Excessive padding in 'struct hmc5843_chip_info' (8 padding bytes, where 0 is optimal). 
   Optimal fields order: 
   channels, 
   regval_to_samp_freq, 
   regval_to_nanoscale, 
   n_regval_to_samp_freq, 
   n_regval_to_nanoscale, 
   consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
   struct hmc5843_chip_info {
   ~~~~~~~^~~~~~~~~~~~~~~~~~~
   drivers/iio/magnetometer/hmc5843_core.c:127:8: note: Excessive padding in 'struct hmc5843_chip_info' (8 padding bytes, where 0 is optimal). Optimal fields order: channels, regval_to_samp_freq, regval_to_nanoscale, n_regval_to_samp_freq, n_regval_to_nanoscale, consider reordering the fields or adding explicit padding members
   struct hmc5843_chip_info {
   ~~~~~~~^~~~~~~~~~~~~~~~~~~
   Suppressed 4 warnings (4 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.
   4 warnings generated.
   Suppressed 4 warnings (4 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/iio/potentiometer/mcp41010.c:58:8: warning: Excessive padding in 'struct mcp41010_data' (86 padding bytes, where 22 is optimal). 
   Optimal fields order: 
   buf, 
   value, 
   spi, 
   cfg, 
   lock, 
   consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
   struct mcp41010_data {
   ~~~~~~~^~~~~~~~~~~~~~~
   drivers/iio/potentiometer/mcp41010.c:58:8: note: Excessive padding in 'struct mcp41010_data' (86 padding bytes, where 22 is optimal). Optimal fields order: buf, value, spi, cfg, lock, consider reordering the fields or adding explicit padding members
   struct mcp41010_data {
   ~~~~~~~^~~~~~~~~~~~~~~
   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.
   4 warnings generated.
   Suppressed 4 warnings (4 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.
   Suppressed 4 warnings (4 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.
   4 warnings generated.
   Suppressed 4 warnings (4 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.
   Suppressed 4 warnings (4 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.
   Suppressed 4 warnings (4 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.
   Suppressed 4 warnings (4 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.

vim +/ret +754 drivers/gpu/drm/bridge/analogix/anx7625.c

8bdfc5dae4e3ba Xin Ji 2020-09-18  720  
8bdfc5dae4e3ba Xin Ji 2020-09-18  721  static int segments_edid_read(struct anx7625_data *ctx,
8bdfc5dae4e3ba Xin Ji 2020-09-18  722  			      u8 segment, u8 *buf, u8 offset)
8bdfc5dae4e3ba Xin Ji 2020-09-18  723  {
8bdfc5dae4e3ba Xin Ji 2020-09-18  724  	u8 cnt;
8bdfc5dae4e3ba Xin Ji 2020-09-18  725  	int ret;
8bdfc5dae4e3ba Xin Ji 2020-09-18  726  	struct device *dev = &ctx->client->dev;
8bdfc5dae4e3ba Xin Ji 2020-09-18  727  
8bdfc5dae4e3ba Xin Ji 2020-09-18  728  	/* Write address only */
8bdfc5dae4e3ba Xin Ji 2020-09-18  729  	ret = anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  730  				AP_AUX_ADDR_7_0, 0x30);
8bdfc5dae4e3ba Xin Ji 2020-09-18  731  	ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  732  				 AP_AUX_COMMAND, 0x04);
8bdfc5dae4e3ba Xin Ji 2020-09-18  733  	ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  734  				 AP_AUX_CTRL_STATUS,
8bdfc5dae4e3ba Xin Ji 2020-09-18  735  				 AP_AUX_CTRL_ADDRONLY | AP_AUX_CTRL_OP_EN);
8bdfc5dae4e3ba Xin Ji 2020-09-18  736  
8bdfc5dae4e3ba Xin Ji 2020-09-18  737  	ret |= wait_aux_op_finish(ctx);
8bdfc5dae4e3ba Xin Ji 2020-09-18  738  	/* Write segment address */
8bdfc5dae4e3ba Xin Ji 2020-09-18  739  	ret |= sp_tx_aux_wr(ctx, segment);
8bdfc5dae4e3ba Xin Ji 2020-09-18  740  	/* Data read */
8bdfc5dae4e3ba Xin Ji 2020-09-18  741  	ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  742  				 AP_AUX_ADDR_7_0, 0x50);
8bdfc5dae4e3ba Xin Ji 2020-09-18  743  	if (ret) {
8bdfc5dae4e3ba Xin Ji 2020-09-18  744  		DRM_DEV_ERROR(dev, "IO error : aux initial fail.\n");
8bdfc5dae4e3ba Xin Ji 2020-09-18  745  		return ret;
8bdfc5dae4e3ba Xin Ji 2020-09-18  746  	}
8bdfc5dae4e3ba Xin Ji 2020-09-18  747  
8bdfc5dae4e3ba Xin Ji 2020-09-18  748  	for (cnt = 0; cnt <= EDID_TRY_CNT; cnt++) {
8bdfc5dae4e3ba Xin Ji 2020-09-18  749  		sp_tx_aux_wr(ctx, offset);
8bdfc5dae4e3ba Xin Ji 2020-09-18  750  		/* Set I2C read com 0x01 mot = 0 and read 16 bytes */
8bdfc5dae4e3ba Xin Ji 2020-09-18  751  		ret = sp_tx_aux_rd(ctx, 0xf1);
8bdfc5dae4e3ba Xin Ji 2020-09-18  752  
8bdfc5dae4e3ba Xin Ji 2020-09-18  753  		if (ret) {
8bdfc5dae4e3ba Xin Ji 2020-09-18 @754  			ret = sp_tx_rst_aux(ctx);
8bdfc5dae4e3ba Xin Ji 2020-09-18  755  			DRM_DEV_ERROR(dev, "segment read fail, reset!\n");
8bdfc5dae4e3ba Xin Ji 2020-09-18  756  		} else {
8bdfc5dae4e3ba Xin Ji 2020-09-18  757  			ret = anx7625_reg_block_read(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  758  						     AP_AUX_BUFF_START,
8bdfc5dae4e3ba Xin Ji 2020-09-18  759  						     MAX_DPCD_BUFFER_SIZE, buf);
8bdfc5dae4e3ba Xin Ji 2020-09-18  760  			if (ret > 0)
8bdfc5dae4e3ba Xin Ji 2020-09-18  761  				break;
8bdfc5dae4e3ba Xin Ji 2020-09-18  762  		}
8bdfc5dae4e3ba Xin Ji 2020-09-18  763  	}
8bdfc5dae4e3ba Xin Ji 2020-09-18  764  
8bdfc5dae4e3ba Xin Ji 2020-09-18  765  	if (cnt > EDID_TRY_CNT)
8bdfc5dae4e3ba Xin Ji 2020-09-18  766  		return -EIO;
8bdfc5dae4e3ba Xin Ji 2020-09-18  767  
8bdfc5dae4e3ba Xin Ji 2020-09-18  768  	return 0;
8bdfc5dae4e3ba Xin Ji 2020-09-18  769  }
8bdfc5dae4e3ba Xin Ji 2020-09-18  770  

:::::: The code at line 754 was first introduced by commit
:::::: 8bdfc5dae4e3ba4d99dfb430ef43249e5f1b7730 drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP

:::::: TO: Xin Ji <xji@analogixsemi.com>
:::::: CC: Sam Ravnborg <sam@ravnborg.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36569 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/gpu/drm/bridge/analogix/anx7625.c:754:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
@ 2021-08-15 14:29 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-15 14:29 UTC (permalink / raw)
  Cc: clang-built-linux, kbuild-all, linux-kernel, Maxime Ripard

[-- Attachment #1: Type: text/plain, Size: 17904 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0aa78d17099b04fd9d36fe338af48ad6fe2d7fca
commit: c489573b5b6ce6442ad4658d9d5ec77839b91622 Merge drm/drm-next into drm-misc-next
date:   10 months ago
config: x86_64-randconfig-c001-20210813 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c489573b5b6ce6442ad4658d9d5ec77839b91622
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout c489573b5b6ce6442ad4658d9d5ec77839b91622
        # 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 <lkp@intel.com>


clang-analyzer warnings: (new ones prefixed by >>)
   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.
   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.
   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.
   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.
   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.
   15 warnings generated.
   net/core/filter.c:1736:2: warning: Null pointer passed as 1st argument to memory set function [clang-analyzer-unix.cstring.NullArg]
           memset(to, 0, len);
           ^
   net/core/filter.c:9941:57: note: Passing value via 3rd parameter 'to'
           return ____bpf_skb_load_bytes(reuse_kern->skb, offset, to, len);
                                                                  ^~
   net/core/filter.c:9941:9: note: Calling '____bpf_skb_load_bytes'
           return ____bpf_skb_load_bytes(reuse_kern->skb, offset, to, len);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:1725:15: note: Assuming 'offset' is <= 65535
           if (unlikely(offset > 0xffff))
                        ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   net/core/filter.c:1725:2: note: Taking false branch
           if (unlikely(offset > 0xffff))
           ^
   net/core/filter.c:1729:15: note: Assuming 'ptr' is null
           if (unlikely(!ptr))
                        ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   net/core/filter.c:1729:2: note: Taking true branch
           if (unlikely(!ptr))
           ^
   net/core/filter.c:1730:3: note: Control jumps to line 1736
                   goto err_clear;
                   ^
   net/core/filter.c:1736:2: note: Null pointer passed as 1st argument to memory set function
           memset(to, 0, len);
           ^      ~~
   net/core/filter.c:1770:2: warning: Null pointer passed as 1st argument to memory set function [clang-analyzer-unix.cstring.NullArg]
           memset(to, 0, len);
           ^      ~~
   net/core/filter.c:1756:15: note: Assuming 'offset' is <= 65535
           if (unlikely(offset > 0xffff))
                        ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   net/core/filter.c:1756:2: note: Taking false branch
           if (unlikely(offset > 0xffff))
           ^
   net/core/filter.c:1759:15: note: Assuming field 'skb' is non-null
           if (unlikely(!ctx->skb))
                        ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   net/core/filter.c:1759:2: note: Taking false branch
           if (unlikely(!ctx->skb))
           ^
   net/core/filter.c:1763:15: note: Assuming 'ptr' is null
           if (unlikely(!ptr))
                        ^
   include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
   # define unlikely(x)    __builtin_expect(!!(x), 0)
                                               ^
   net/core/filter.c:1763:2: note: Taking true branch
           if (unlikely(!ptr))
           ^
   net/core/filter.c:1764:3: note: Control jumps to line 1770
                   goto err_clear;
                   ^
   net/core/filter.c:1770:2: note: Null pointer passed as 1st argument to memory set function
           memset(to, 0, len);
           ^      ~~
   Suppressed 13 warnings (13 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.
   12 warnings generated.
   Suppressed 12 warnings (12 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/gpu/drm/bridge/analogix/anx7625.c:754:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
                           ret = sp_tx_rst_aux(ctx);
                           ^     ~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/anx7625.c:754:4: note: Value stored to 'ret' is never read
                           ret = sp_tx_rst_aux(ctx);
                           ^     ~~~~~~~~~~~~~~~~~~
   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.
   8 warnings generated.
   drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:536:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
           err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2],
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c:536:2: note: Value stored to 'err' is never read
           err = anx78xx_clear_bits(anx78xx->map[I2C_IDX_TX_P2],
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   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/gpu/drm/bridge/analogix/analogix_dp_reg.c:424:2: warning: Value stored to 'reg' is never read [clang-analyzer-deadcode.DeadStores]
           reg = readl(dp->reg_base + ANALOGIX_DP_SYS_CTL_3);
           ^
   drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c:424:2: note: Value stored to 'reg' is never read
   Suppressed 7 warnings (6 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.
   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.
   8 warnings generated.
   Suppressed 8 warnings (8 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.
   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.
   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.
   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.
   Suppressed 8 warnings (8 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.
   4 warnings generated.
   Suppressed 4 warnings (4 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/media/dvb-frontends/tda1004x.c:547:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
           ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10046H_CODE_CPT, TDA10046H_CODE_IN);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/dvb-frontends/tda1004x.c:547:2: note: Value stored to 'ret' is never read
           ret = tda1004x_do_upload(state, fw->data, fw->size, TDA10046H_CODE_CPT, TDA10046H_CODE_IN);
           ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 4 warnings (4 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.
   drivers/media/dvb-frontends/sp887x.c:143:23: warning: Value stored to 'mem' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
           const unsigned char *mem = fw->data;
                                ^~~   ~~~~~~~~
   drivers/media/dvb-frontends/sp887x.c:143:23: note: Value stored to 'mem' during its initialization is never read
           const unsigned char *mem = fw->data;
                                ^~~   ~~~~~~~~
   drivers/media/dvb-frontends/sp887x.c:458:39: warning: The result of the left shift is undefined because the left operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
                  (sp887x_readreg(state, 0xc07) << 6);
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
   drivers/media/dvb-frontends/sp887x.c:458:10: note: Calling 'sp887x_readreg'
                  (sp887x_readreg(state, 0xc07) << 6);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/dvb-frontends/sp887x.c:84:6: note: Assuming the condition is true
           if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/dvb-frontends/sp887x.c:84:2: note: Taking true branch
           if ((ret = i2c_transfer(state->i2c, msg, 2)) != 2) {
           ^
   drivers/media/dvb-frontends/sp887x.c:86:3: note: Returning the value -1
                   return -1;
                   ^~~~~~~~~
   drivers/media/dvb-frontends/sp887x.c:458:10: note: Returning from 'sp887x_readreg'
                  (sp887x_readreg(state, 0xc07) << 6);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/media/dvb-frontends/sp887x.c:458:39: note: The result of the left shift is undefined because the left operand is negative
                  (sp887x_readreg(state, 0xc07) << 6);
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
   Suppressed 4 warnings (4 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.
   Suppressed 4 warnings (4 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.
   Suppressed 4 warnings (4 in non-user code).

vim +/ret +754 drivers/gpu/drm/bridge/analogix/anx7625.c

8bdfc5dae4e3ba Xin Ji 2020-09-18  720  
8bdfc5dae4e3ba Xin Ji 2020-09-18  721  static int segments_edid_read(struct anx7625_data *ctx,
8bdfc5dae4e3ba Xin Ji 2020-09-18  722  			      u8 segment, u8 *buf, u8 offset)
8bdfc5dae4e3ba Xin Ji 2020-09-18  723  {
8bdfc5dae4e3ba Xin Ji 2020-09-18  724  	u8 cnt;
8bdfc5dae4e3ba Xin Ji 2020-09-18  725  	int ret;
8bdfc5dae4e3ba Xin Ji 2020-09-18  726  	struct device *dev = &ctx->client->dev;
8bdfc5dae4e3ba Xin Ji 2020-09-18  727  
8bdfc5dae4e3ba Xin Ji 2020-09-18  728  	/* Write address only */
8bdfc5dae4e3ba Xin Ji 2020-09-18  729  	ret = anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  730  				AP_AUX_ADDR_7_0, 0x30);
8bdfc5dae4e3ba Xin Ji 2020-09-18  731  	ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  732  				 AP_AUX_COMMAND, 0x04);
8bdfc5dae4e3ba Xin Ji 2020-09-18  733  	ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  734  				 AP_AUX_CTRL_STATUS,
8bdfc5dae4e3ba Xin Ji 2020-09-18  735  				 AP_AUX_CTRL_ADDRONLY | AP_AUX_CTRL_OP_EN);
8bdfc5dae4e3ba Xin Ji 2020-09-18  736  
8bdfc5dae4e3ba Xin Ji 2020-09-18  737  	ret |= wait_aux_op_finish(ctx);
8bdfc5dae4e3ba Xin Ji 2020-09-18  738  	/* Write segment address */
8bdfc5dae4e3ba Xin Ji 2020-09-18  739  	ret |= sp_tx_aux_wr(ctx, segment);
8bdfc5dae4e3ba Xin Ji 2020-09-18  740  	/* Data read */
8bdfc5dae4e3ba Xin Ji 2020-09-18  741  	ret |= anx7625_reg_write(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  742  				 AP_AUX_ADDR_7_0, 0x50);
8bdfc5dae4e3ba Xin Ji 2020-09-18  743  	if (ret) {
8bdfc5dae4e3ba Xin Ji 2020-09-18  744  		DRM_DEV_ERROR(dev, "IO error : aux initial fail.\n");
8bdfc5dae4e3ba Xin Ji 2020-09-18  745  		return ret;
8bdfc5dae4e3ba Xin Ji 2020-09-18  746  	}
8bdfc5dae4e3ba Xin Ji 2020-09-18  747  
8bdfc5dae4e3ba Xin Ji 2020-09-18  748  	for (cnt = 0; cnt <= EDID_TRY_CNT; cnt++) {
8bdfc5dae4e3ba Xin Ji 2020-09-18  749  		sp_tx_aux_wr(ctx, offset);
8bdfc5dae4e3ba Xin Ji 2020-09-18  750  		/* Set I2C read com 0x01 mot = 0 and read 16 bytes */
8bdfc5dae4e3ba Xin Ji 2020-09-18  751  		ret = sp_tx_aux_rd(ctx, 0xf1);
8bdfc5dae4e3ba Xin Ji 2020-09-18  752  
8bdfc5dae4e3ba Xin Ji 2020-09-18  753  		if (ret) {
8bdfc5dae4e3ba Xin Ji 2020-09-18 @754  			ret = sp_tx_rst_aux(ctx);
8bdfc5dae4e3ba Xin Ji 2020-09-18  755  			DRM_DEV_ERROR(dev, "segment read fail, reset!\n");
8bdfc5dae4e3ba Xin Ji 2020-09-18  756  		} else {
8bdfc5dae4e3ba Xin Ji 2020-09-18  757  			ret = anx7625_reg_block_read(ctx, ctx->i2c.rx_p0_client,
8bdfc5dae4e3ba Xin Ji 2020-09-18  758  						     AP_AUX_BUFF_START,
8bdfc5dae4e3ba Xin Ji 2020-09-18  759  						     MAX_DPCD_BUFFER_SIZE, buf);
8bdfc5dae4e3ba Xin Ji 2020-09-18  760  			if (ret > 0)
8bdfc5dae4e3ba Xin Ji 2020-09-18  761  				break;
8bdfc5dae4e3ba Xin Ji 2020-09-18  762  		}
8bdfc5dae4e3ba Xin Ji 2020-09-18  763  	}
8bdfc5dae4e3ba Xin Ji 2020-09-18  764  
8bdfc5dae4e3ba Xin Ji 2020-09-18  765  	if (cnt > EDID_TRY_CNT)
8bdfc5dae4e3ba Xin Ji 2020-09-18  766  		return -EIO;
8bdfc5dae4e3ba Xin Ji 2020-09-18  767  
8bdfc5dae4e3ba Xin Ji 2020-09-18  768  	return 0;
8bdfc5dae4e3ba Xin Ji 2020-09-18  769  }
8bdfc5dae4e3ba Xin Ji 2020-09-18  770  

:::::: The code at line 754 was first introduced by commit
:::::: 8bdfc5dae4e3ba4d99dfb430ef43249e5f1b7730 drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP

:::::: TO: Xin Ji <xji@analogixsemi.com>
:::::: CC: Sam Ravnborg <sam@ravnborg.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36569 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-18 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 10:31 drivers/gpu/drm/bridge/analogix/anx7625.c:754:4: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-08-15 14:29 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).