public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: oe-kbuild-all@lists.linux.dev, linux-acpi@vger.kernel.org,
	devel@acpica.org, linux-pm@vger.kernel.org,
	Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Subject: [rafael-pm:bleeding-edge 136/137] drivers/thermal/uniphier_thermal.c:269:13: warning: unused variable 'i'
Date: Wed, 3 Jul 2024 20:43:25 +0800	[thread overview]
Message-ID: <202407032000.Lvc01b58-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   afefac1395033609973da997224eceaece6dadf5
commit: 9b418d5c9b5a55f320ee2fef00825ec9a8cf582f [136/137] thermal: uniphier: Use thermal_zone_for_each_trip() for walking trip points
config: i386-buildonly-randconfig-002-20240703 (https://download.01.org/0day-ci/archive/20240703/202407032000.Lvc01b58-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240703/202407032000.Lvc01b58-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/202407032000.Lvc01b58-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/thermal/uniphier_thermal.c: In function 'uniphier_tm_probe':
>> drivers/thermal/uniphier_thermal.c:269:13: warning: unused variable 'i' [-Wunused-variable]
     269 |         int i, ret, irq;
         |             ^


vim +/i +269 drivers/thermal/uniphier_thermal.c

   261	
   262	static int uniphier_tm_probe(struct platform_device *pdev)
   263	{
   264		struct trip_walk_data twd = { .crit_temp = INT_MAX, .index = 0 };
   265		struct device *dev = &pdev->dev;
   266		struct regmap *regmap;
   267		struct device_node *parent;
   268		struct uniphier_tm_dev *tdev;
 > 269		int i, ret, irq;
   270	
   271		tdev = devm_kzalloc(dev, sizeof(*tdev), GFP_KERNEL);
   272		if (!tdev)
   273			return -ENOMEM;
   274		tdev->dev = dev;
   275	
   276		tdev->data = of_device_get_match_data(dev);
   277		if (WARN_ON(!tdev->data))
   278			return -EINVAL;
   279	
   280		irq = platform_get_irq(pdev, 0);
   281		if (irq < 0)
   282			return irq;
   283	
   284		/* get regmap from syscon node */
   285		parent = of_get_parent(dev->of_node); /* parent should be syscon node */
   286		regmap = syscon_node_to_regmap(parent);
   287		of_node_put(parent);
   288		if (IS_ERR(regmap)) {
   289			dev_err(dev, "failed to get regmap (error %ld)\n",
   290				PTR_ERR(regmap));
   291			return PTR_ERR(regmap);
   292		}
   293		tdev->regmap = regmap;
   294	
   295		ret = uniphier_tm_initialize_sensor(tdev);
   296		if (ret) {
   297			dev_err(dev, "failed to initialize sensor\n");
   298			return ret;
   299		}
   300	
   301		ret = devm_request_threaded_irq(dev, irq, uniphier_tm_alarm_irq,
   302						uniphier_tm_alarm_irq_thread,
   303						0, "thermal", tdev);
   304		if (ret)
   305			return ret;
   306	
   307		platform_set_drvdata(pdev, tdev);
   308	
   309		tdev->tz_dev = devm_thermal_of_zone_register(dev, 0, tdev,
   310							     &uniphier_of_thermal_ops);
   311		if (IS_ERR(tdev->tz_dev)) {
   312			dev_err(dev, "failed to register sensor device\n");
   313			return PTR_ERR(tdev->tz_dev);
   314		}
   315	
   316		/* set alert temperatures */
   317		twd.tdev = tdev;
   318		thermal_zone_for_each_trip(tdev->tz_dev, uniphier_tm_trip_walk_cb, &twd);
   319	
   320		if (twd.crit_temp > CRITICAL_TEMP_LIMIT) {
   321			dev_err(dev, "critical trip is over limit(>%d), or not set\n",
   322				CRITICAL_TEMP_LIMIT);
   323			return -EINVAL;
   324		}
   325	
   326		uniphier_tm_enable_sensor(tdev);
   327	
   328		return 0;
   329	}
   330	

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

                 reply	other threads:[~2024-07-03 12:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202407032000.Lvc01b58-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devel@acpica.org \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rjw@rjwysocki.net \
    /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