mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ricky Wu <ricky_wu@realtek.com>,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	arnd@arndb.de, gregkh@linuxfoundation.org, chenhuacai@kernel.org,
	ulf.hansson@linaro.org, maximlevitsky@gmail.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] misc: rtsx: usb card reader: add OCP support
Date: Wed, 6 Aug 2025 18:24:15 +0800	[thread overview]
Message-ID: <202508061704.hwI8epAJ-lkp@intel.com> (raw)
In-Reply-To: <20250805032220.2355160-1-ricky_wu@realtek.com>

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@intel.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

      reply	other threads:[~2025-08-06 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-05  3:22 Ricky Wu
2025-08-06 10:24 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202508061704.hwI8epAJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=maximlevitsky@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ricky_wu@realtek.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®