lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202508061704.hwI8epAJ-lkp@intel.com>
Date: Wed, 6 Aug 2025 18:24:15 +0800
From: kernel test robot <lkp@...el.com>
To: Ricky Wu <ricky_wu@...ltek.com>, linux-kernel@...r.kernel.org,
	linux-mmc@...r.kernel.org, arnd@...db.de,
	gregkh@...uxfoundation.org, chenhuacai@...nel.org,
	ulf.hansson@...aro.org, maximlevitsky@...il.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH] misc: rtsx: usb card reader: add OCP support

Hi Ricky,

kernel test robot noticed the following build warnings:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus linus/master next-20250806]
[cannot apply to soc/for-next ulf-hansson-mmc-mirror/next v6.16]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ricky-Wu/misc-rtsx-usb-card-reader-add-OCP-support/20250806-101802
base:   char-misc/char-misc-testing
patch link:    https://lore.kernel.org/r/20250805032220.2355160-1-ricky_wu%40realtek.com
patch subject: [PATCH] misc: rtsx: usb card reader: add OCP support
config: i386-buildonly-randconfig-001-20250806 (https://download.01.org/0day-ci/archive/20250806/202508061704.hwI8epAJ-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250806/202508061704.hwI8epAJ-lkp@intel.com/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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508061704.hwI8epAJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/mmc/host/rtsx_usb_sdmmc.c:1054:7: warning: variable 'err' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    1054 |                 if (!(host->ocp_stat & (MS_OCP_NOW | MS_OCP_EVER)))
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/mmc/host/rtsx_usb_sdmmc.c:1056:7: note: uninitialized use occurs here
    1056 |                 if (err)
         |                     ^~~
   drivers/mmc/host/rtsx_usb_sdmmc.c:1054:3: note: remove the 'if' if its condition is always true
    1054 |                 if (!(host->ocp_stat & (MS_OCP_NOW | MS_OCP_EVER)))
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1055 |                         err = sd_power_on(host);
   drivers/mmc/host/rtsx_usb_sdmmc.c:1038:9: note: initialize the variable 'err' to silence this warning
    1038 |         int err;
         |                ^
         |                 = 0
   1 warning generated.


vim +1054 drivers/mmc/host/rtsx_usb_sdmmc.c

  1034	
  1035	static void sd_set_power_mode(struct rtsx_usb_sdmmc *host,
  1036			unsigned char power_mode)
  1037	{
  1038		int err;
  1039		struct rtsx_ucr *ucr = host->ucr;
  1040	
  1041		if (power_mode == host->power_mode)
  1042			return;
  1043	
  1044		switch (power_mode) {
  1045		case MMC_POWER_OFF:
  1046			err = sd_power_off(host);
  1047			if (err)
  1048				dev_dbg(sdmmc_dev(host), "power-off (err = %d)\n", err);
  1049			pm_runtime_put_noidle(sdmmc_dev(host));
  1050			break;
  1051	
  1052		case MMC_POWER_UP:
  1053			pm_runtime_get_noresume(sdmmc_dev(host));
> 1054			if (!(host->ocp_stat & (MS_OCP_NOW | MS_OCP_EVER)))
  1055				err = sd_power_on(host);
  1056			if (err)
  1057				dev_dbg(sdmmc_dev(host), "power-on (err = %d)\n", err);
  1058			/* issue the clock signals to card at least 74 clocks */
  1059			rtsx_usb_write_register(ucr, SD_BUS_STAT, SD_CLK_TOGGLE_EN, SD_CLK_TOGGLE_EN);
  1060			break;
  1061	
  1062		case MMC_POWER_ON:
  1063			/* stop to send the clock signals */
  1064			rtsx_usb_write_register(ucr, SD_BUS_STAT, SD_CLK_TOGGLE_EN, 0x00);
  1065			break;
  1066	
  1067		case MMC_POWER_UNDEFINED:
  1068			break;
  1069	
  1070		default:
  1071			break;
  1072		}
  1073	
  1074		host->power_mode = power_mode;
  1075	}
  1076	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ