Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-scsi@vger.kernel.org,
	Bart Van Assche <bvanassche@acm.org>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	Peter Wang <peter.wang@mediatek.com>,
	Avri Altman <avri.altman@sandisk.com>,
	Bean Huo <beanhuo@micron.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"Bao D. Nguyen" <quic_nguyenb@quicinc.com>
Subject: Re: [PATCH 5/7] ufs: core: Remove unused code and data structures
Date: Sat, 17 Jan 2026 10:16:02 +0800	[thread overview]
Message-ID: <202601170952.UMdlSqAD-lkp@intel.com> (raw)
In-Reply-To: <20260116182628.3255116-6-bvanassche@acm.org>

Hi Bart,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jejb-scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master v6.19-rc5 next-20260116]
[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/Bart-Van-Assche/ufs-core-Change-the-type-of-an-ufshcd_clkgate_delay_set-argument/20260117-022907
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link:    https://lore.kernel.org/r/20260116182628.3255116-6-bvanassche%40acm.org
patch subject: [PATCH 5/7] ufs: core: Remove unused code and data structures
config: i386-randconfig-141-20260117 (https://download.01.org/0day-ci/archive/20260117/202601170952.UMdlSqAD-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
smatch version: v0.5.0-8985-g2614ff1a
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260117/202601170952.UMdlSqAD-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/202601170952.UMdlSqAD-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/ufs/core/ufshcd.c: In function 'ufshcd_setup_clocks':
>> drivers/ufs/core/ufshcd.c:9304:14: warning: variable 'clk_state_changed' set but not used [-Wunused-but-set-variable]
    9304 |         bool clk_state_changed = false;
         |              ^~~~~~~~~~~~~~~~~


vim +/clk_state_changed +9304 drivers/ufs/core/ufshcd.c

6a771a656041f4 drivers/scsi/ufs/ufshcd.c Raviv Shvili       2014-09-25  9298  
81309c247a4dcd drivers/scsi/ufs/ufshcd.c Can Guo            2020-11-25  9299  static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on)
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9300  {
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9301  	int ret = 0;
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9302  	struct ufs_clk_info *clki;
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9303  	struct list_head *head = &hba->clk_list_head;
911a0771b6fa7b drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-12-22 @9304  	bool clk_state_changed = false;
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9305  
566ec9ad315b46 drivers/scsi/ufs/ufshcd.c Szymon Mielczarek  2017-06-05  9306  	if (list_empty(head))
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9307  		goto out;
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9308  
1e879e8fa9f62e drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-10-06  9309  	ret = ufshcd_vops_setup_clocks(hba, on, PRE_CHANGE);
1e879e8fa9f62e drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-10-06  9310  	if (ret)
1e879e8fa9f62e drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-10-06  9311  		return ret;
1e879e8fa9f62e drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-10-06  9312  
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9313  	list_for_each_entry(clki, head, list) {
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9314  		if (!IS_ERR_OR_NULL(clki->clk)) {
81309c247a4dcd drivers/scsi/ufs/ufshcd.c Can Guo            2020-11-25  9315  			/*
81309c247a4dcd drivers/scsi/ufs/ufshcd.c Can Guo            2020-11-25  9316  			 * Don't disable clocks which are needed
81309c247a4dcd drivers/scsi/ufs/ufshcd.c Can Guo            2020-11-25  9317  			 * to keep the link active.
81309c247a4dcd drivers/scsi/ufs/ufshcd.c Can Guo            2020-11-25  9318  			 */
81309c247a4dcd drivers/scsi/ufs/ufshcd.c Can Guo            2020-11-25  9319  			if (ufshcd_is_link_active(hba) &&
81309c247a4dcd drivers/scsi/ufs/ufshcd.c Can Guo            2020-11-25  9320  			    clki->keep_link_active)
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2014-09-25  9321  				continue;
57d104c153d3d6 drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2014-09-25  9322  
911a0771b6fa7b drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-12-22  9323  			clk_state_changed = on ^ clki->enabled;
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9324  			if (on && !clki->enabled) {
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9325  				ret = clk_prepare_enable(clki->clk);
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9326  				if (ret) {
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9327  					dev_err(hba->dev, "%s: %s prepare enable failed, %d\n",
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9328  						__func__, clki->name, ret);
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9329  					goto out;
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9330  				}
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9331  			} else if (!on && clki->enabled) {
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9332  				clk_disable_unprepare(clki->clk);
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9333  			}
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9334  			clki->enabled = on;
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9335  			dev_dbg(hba->dev, "%s: clk: %s %sabled\n", __func__,
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9336  					clki->name, on ? "en" : "dis");
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9337  		}
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9338  	}
1ab27c9cf8b63d drivers/scsi/ufs/ufshcd.c Sahitya Tummala    2014-09-25  9339  
1e879e8fa9f62e drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-10-06  9340  	ret = ufshcd_vops_setup_clocks(hba, on, POST_CHANGE);
1e879e8fa9f62e drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-10-06  9341  	if (ret)
1e879e8fa9f62e drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-10-06  9342  		return ret;
1e879e8fa9f62e drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-10-06  9343  
2777e73fc154e2 drivers/ufs/core/ufshcd.c Maramaina Naresh   2023-12-19  9344  	if (!ufshcd_is_clkscaling_supported(hba))
2777e73fc154e2 drivers/ufs/core/ufshcd.c Maramaina Naresh   2023-12-19  9345  		ufshcd_pm_qos_update(hba, on);
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9346  out:
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9347  	if (ret) {
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9348  		list_for_each_entry(clki, head, list) {
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9349  			if (!IS_ERR_OR_NULL(clki->clk) && clki->enabled)
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9350  				clk_disable_unprepare(clki->clk);
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9351  		}
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9352  	}
7ff5ab47363334 drivers/scsi/ufs/ufshcd.c Subhash Jadavani   2016-12-22  9353  
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9354  	return ret;
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9355  }
c6e79dacd86fd7 drivers/scsi/ufs/ufshcd.c Sujit Reddy Thumma 2014-09-25  9356  

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

  reply	other threads:[~2026-01-17  2:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16 18:26 [PATCH 0/7] ufs: Remove the clock gating code Bart Van Assche
2026-01-16 18:26 ` [PATCH 1/7] ufs: core: Change the type of an ufshcd_clkgate_delay_set() argument Bart Van Assche
2026-01-16 18:26 ` [PATCH 2/7] ufs: host: mediatek: Use ufshcd_clkgate_delay_set() Bart Van Assche
2026-01-16 18:26 ` [PATCH 3/7] ufs: core: Redirect clock gating to RPM Bart Van Assche
2026-01-17  2:05   ` kernel test robot
2026-01-17  2:16   ` kernel test robot
2026-01-16 18:26 ` [PATCH 4/7] ufs: core: Switch from " Bart Van Assche
2026-01-16 18:26 ` [PATCH 5/7] ufs: core: Remove unused code and data structures Bart Van Assche
2026-01-17  2:16   ` kernel test robot [this message]
2026-01-16 18:26 ` [PATCH 6/7] ufs: core: Remove superfluous ufshcd_{hold,release}() calls Bart Van Assche
2026-01-16 18:26 ` [PATCH 7/7] ufs: core: Remove ufshcd_{hold,release}() calls from the I/O path Bart Van Assche
2026-01-22 17:30 ` [PATCH 0/7] ufs: Remove the clock gating code Manivannan Sadhasivam
2026-01-23  7:26   ` Peter Wang (王信友)
2026-01-23 23:27     ` Bart Van Assche
2026-01-26  3:44       ` Peter Wang (王信友)
2026-01-26 22:27         ` Bart Van Assche

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=202601170952.UMdlSqAD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@sandisk.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peter.wang@mediatek.com \
    --cc=quic_nguyenb@quicinc.com \
    /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