linux-pm.vger.kernel.org archive mirror
 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
Subject: [rafael-pm:bleeding-edge 72/86] drivers/acpi/thermal.c:1028:32: warning: variable 'result' set but not used
Date: Wed, 2 Aug 2023 03:05:01 +0800	[thread overview]
Message-ID: <202308020253.WHEHp60K-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   57fb4aeb308cdc2169b440c112bcbbbbdc7b6cc5
commit: dabc621a311007d78bfcf60f8125c5e8c33ded7b [72/86] ACPI: thermal: Drop enabled flag from struct acpi_thermal_active
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20230802/202308020253.WHEHp60K-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230802/202308020253.WHEHp60K-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/202308020253.WHEHp60K-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/acpi/thermal.c: In function 'acpi_thermal_resume':
>> drivers/acpi/thermal.c:1028:32: warning: variable 'result' set but not used [-Wunused-but-set-variable]
    1028 |         int i, j, power_state, result;
         |                                ^~~~~~


vim +/result +1028 drivers/acpi/thermal.c

a59ffb2062df3a Aaron Lu            2014-03-04  1024  
167cffb646aa4a Rafael J. Wysocki   2012-06-27  1025  static int acpi_thermal_resume(struct device *dev)
74ce1468128e29 Konstantin Karasyov 2006-05-08  1026  {
167cffb646aa4a Rafael J. Wysocki   2012-06-27  1027  	struct acpi_thermal *tz;
b1028c545ced13 Konstantin Karasyov 2007-02-16 @1028  	int i, j, power_state, result;
b1028c545ced13 Konstantin Karasyov 2007-02-16  1029  
167cffb646aa4a Rafael J. Wysocki   2012-06-27  1030  	if (!dev)
d550d98d331737 Patrick Mochel      2006-06-27  1031  		return -EINVAL;
74ce1468128e29 Konstantin Karasyov 2006-05-08  1032  
167cffb646aa4a Rafael J. Wysocki   2012-06-27  1033  	tz = acpi_driver_data(to_acpi_device(dev));
167cffb646aa4a Rafael J. Wysocki   2012-06-27  1034  	if (!tz)
167cffb646aa4a Rafael J. Wysocki   2012-06-27  1035  		return -EINVAL;
74ce1468128e29 Konstantin Karasyov 2006-05-08  1036  
bed936f7eab946 Konstantin Karasyov 2006-07-10  1037  	for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
7266c88cbaa3de Rafael J. Wysocki   2023-06-04  1038  		if (!tz->trips.active[i].valid)
b1028c545ced13 Konstantin Karasyov 2007-02-16  1039  			break;
52ce50498c6f43 Rafael J. Wysocki   2022-10-04  1040  
b1028c545ced13 Konstantin Karasyov 2007-02-16  1041  		for (j = 0; j < tz->trips.active[i].devices.count; j++) {
488a76c5260619 Rafael J. Wysocki   2010-11-25  1042  			result = acpi_bus_update_power(
488a76c5260619 Rafael J. Wysocki   2010-11-25  1043  					tz->trips.active[i].devices.handles[j],
488a76c5260619 Rafael J. Wysocki   2010-11-25  1044  					&power_state);
bed936f7eab946 Konstantin Karasyov 2006-07-10  1045  		}
bed936f7eab946 Konstantin Karasyov 2006-07-10  1046  	}
bed936f7eab946 Konstantin Karasyov 2006-07-10  1047  
81b704d3e4674e Rafael J. Wysocki   2021-01-14  1048  	acpi_queue_thermal_check(tz);
74ce1468128e29 Konstantin Karasyov 2006-05-08  1049  
74ce1468128e29 Konstantin Karasyov 2006-05-08  1050  	return AE_OK;
74ce1468128e29 Konstantin Karasyov 2006-05-08  1051  }
607d265fc1ab06 Rafael J. Wysocki   2023-06-04  1052  #else
607d265fc1ab06 Rafael J. Wysocki   2023-06-04  1053  #define acpi_thermal_suspend	NULL
607d265fc1ab06 Rafael J. Wysocki   2023-06-04  1054  #define acpi_thermal_resume	NULL
9069240480e24a Rafael J. Wysocki   2012-08-09  1055  #endif
607d265fc1ab06 Rafael J. Wysocki   2023-06-04  1056  static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, acpi_thermal_suspend, acpi_thermal_resume);
607d265fc1ab06 Rafael J. Wysocki   2023-06-04  1057  

:::::: The code at line 1028 was first introduced by commit
:::::: b1028c545ced13590dd9a9a8086543aef26c7187 ACPI: fix fan after resume from S3

:::::: TO: Konstantin Karasyov <konstantin.a.karasyov@intel.com>
:::::: CC: Len Brown <len.brown@intel.com>

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

                 reply	other threads:[~2023-08-01 19:05 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=202308020253.WHEHp60K-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devel@acpica.org \
    --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;
as well as URLs for NNTP newsgroup(s).