Subject: Re: [PATCH net-next 2/9] r8152: Add support for RTL8157 SRAM access and ADV indirect access

From: kernel test robot <[email-masked]>
Date: Fri, 10 Apr 2026 13:17:25 +0800

Hi Birger,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 5c9e55fecf9365890c64f14761a80f9413a3b1d1]

url:    https://github.com/intel-lab-lkp/linux/commits/Birger-Koblitz/r8152-Add-support-for-RTL8157-RX-TX-descriptor-format/20260315-014044
base:   5c9e55fecf9365890c64f14761a80f9413a3b1d1
patch link:    https://lore.kernel.org/r/20260314-rtl8157_next-v1-2-9ba77b428afd%40birger-koblitz.de
patch subject: [PATCH net-next 2/9] r8152: Add support for RTL8157 SRAM access and ADV indirect access
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260410/[email-masked]/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c80443cd37b2e2788cba67ffa180a6331e5f0791)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260410/[email-masked]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All warnings (new ones prefixed by >>):

>> drivers/net/usb/r8152.c:1682:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    1682 |         if (i == 10)
         |             ^~~~~~~
   drivers/net/usb/r8152.c:1685:9: note: uninitialized use occurs here
    1685 |         return ret;
         |                ^~~
   drivers/net/usb/r8152.c:1682:2: note: remove the 'if' if its condition is always true
    1682 |         if (i == 10)
         |         ^~~~~~~~~~~~
    1683 |                 ret = -ETIMEDOUT;
   drivers/net/usb/r8152.c:1672:12: note: initialize the variable 'ret' to silence this warning
    1672 |         int i, ret;
         |                   ^
         |                    = 0
   drivers/net/usb/r8152.c:1757:12: warning: unused function 'rtl_bmu_clr_bits' [-Wunused-function]
    1757 | static int rtl_bmu_clr_bits(struct r8152 *tp, u16 addr, u32 clear)
         |            ^~~~~~~~~~~~~~~~
   drivers/net/usb/r8152.c:1788:12: warning: unused function 'rtl_ip_clr_bits' [-Wunused-function]
    1788 | static int rtl_ip_clr_bits(struct r8152 *tp, u16 addr, u32 clear)
         |            ^~~~~~~~~~~~~~~
   drivers/net/usb/r8152.c:1793:12: warning: unused function 'rtl_ip_set_bits' [-Wunused-function]
    1793 | static int rtl_ip_set_bits(struct r8152 *tp, u16 addr, u32 set)
         |            ^~~~~~~~~~~~~~~
   drivers/net/usb/r8152.c:1810:13: warning: unused function 'sram_write_w0w1' [-Wunused-function]
    1810 | static void sram_write_w0w1(struct r8152 *tp, u16 addr, u16 clear, u16 set)
         |             ^~~~~~~~~~~~~~~
   drivers/net/usb/r8152.c:1824:13: warning: unused function 'sram2_write_w0w1' [-Wunused-function]
    1824 | static void sram2_write_w0w1(struct r8152 *tp, u16 addr, u16 clear, u16 set)
         |             ^~~~~~~~~~~~~~~~
   drivers/net/usb/r8152.c:9807:12: warning: unused function 'r8157_desc_init' [-Wunused-function]
    9807 | static int r8157_desc_init(struct r8152 *tp)
         |            ^~~~~~~~~~~~~~~
   7 warnings generated.

vim +1682 drivers/net/usb/r8152.c

  1669	
  1670	static int wait_cmd_ready(struct r8152 *tp, u16 cmd)
  1671	{
  1672		int i, ret;
  1673	
  1674		for (i = 0; i < 10; i++) {
  1675			u16 ocp_data = ocp_read_word(tp, MCU_TYPE_USB, cmd);
  1676	
  1677			if (!(ocp_data & ADV_CMD_BUSY))
  1678				break;
  1679			usleep_range(1000, 2000);
  1680		}
  1681	
> 1682		if (i == 10)
  1683			ret = -ETIMEDOUT;
  1684	
  1685		return ret;
  1686	}
  1687	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki