All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [sre-power-supply:psy-battery-cleanup 72/82] drivers/power/supply/ab8500_charger.c:1952:31: error: incompatible type for argument 1 of 'class_for_each_device'
Date: Tue, 26 Sep 2023 09:01:44 +0800	[thread overview]
Message-ID: <202309260840.RhikPOC0-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git psy-battery-cleanup
head:   7e5a5a9f81f57cdb12b9e334f1352bacbb4eaad8
commit: 59b7ed1c1fc6d17cb361ad3892fe0b8920b3da7d [72/82] power: supply: core: make power_supply_class const
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20230926/202309260840.RhikPOC0-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230926/202309260840.RhikPOC0-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/202309260840.RhikPOC0-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/power/supply/ab8500_charger.c: In function 'ab8500_charger_check_vbat_work':
>> drivers/power/supply/ab8500_charger.c:1952:31: error: incompatible type for argument 1 of 'class_for_each_device'
    1952 |         class_for_each_device(power_supply_class, NULL,
         |                               ^~~~~~~~~~~~~~~~~~
         |                               |
         |                               struct class
   In file included from include/linux/device.h:31,
                    from drivers/power/supply/ab8500_charger.c:15:
   include/linux/device/class.h:97:47: note: expected 'const struct class *' but argument is of type 'struct class'
      97 | int class_for_each_device(const struct class *class, const struct device *start, void *data,
         |                           ~~~~~~~~~~~~~~~~~~~~^~~~~
--
   drivers/power/supply/ab8500_fg.c: In function 'ab8500_fg_external_power_changed':
>> drivers/power/supply/ab8500_fg.c:2410:31: error: incompatible type for argument 1 of 'class_for_each_device'
    2410 |         class_for_each_device(power_supply_class, NULL, psy,
         |                               ^~~~~~~~~~~~~~~~~~
         |                               |
         |                               struct class
   In file included from include/linux/device.h:31,
                    from drivers/power/supply/ab8500_fg.c:21:
   include/linux/device/class.h:97:47: note: expected 'const struct class *' but argument is of type 'struct class'
      97 | int class_for_each_device(const struct class *class, const struct device *start, void *data,
         |                           ~~~~~~~~~~~~~~~~~~~~^~~~~
--
   drivers/power/supply/ab8500_btemp.c: In function 'ab8500_btemp_external_power_changed':
>> drivers/power/supply/ab8500_btemp.c:627:31: error: incompatible type for argument 1 of 'class_for_each_device'
     627 |         class_for_each_device(power_supply_class, NULL, psy,
         |                               ^~~~~~~~~~~~~~~~~~
         |                               |
         |                               struct class
   In file included from include/linux/device.h:31,
                    from drivers/power/supply/ab8500_btemp.c:15:
   include/linux/device/class.h:97:47: note: expected 'const struct class *' but argument is of type 'struct class'
      97 | int class_for_each_device(const struct class *class, const struct device *start, void *data,
         |                           ~~~~~~~~~~~~~~~~~~~~^~~~~
--
   drivers/power/supply/ab8500_chargalg.c: In function 'ab8500_chargalg_algorithm':
>> drivers/power/supply/ab8500_chargalg.c:1234:31: error: incompatible type for argument 1 of 'class_for_each_device'
    1234 |         class_for_each_device(power_supply_class, NULL,
         |                               ^~~~~~~~~~~~~~~~~~
         |                               |
         |                               struct class
   In file included from include/linux/device.h:31,
                    from drivers/power/supply/ab8500_chargalg.c:17:
   include/linux/device/class.h:97:47: note: expected 'const struct class *' but argument is of type 'struct class'
      97 | int class_for_each_device(const struct class *class, const struct device *start, void *data,
         |                           ~~~~~~~~~~~~~~~~~~~~^~~~~


vim +/class_for_each_device +1952 drivers/power/supply/ab8500_charger.c

84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1936  
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1937  /**
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1938   * ab8500_charger_check_vbat_work() - keep vbus current within spec
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1939   * @work	pointer to the work_struct structure
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1940   *
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1941   * Due to a asic bug it is necessary to lower the input current to the vbus
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1942   * charger when charging with at some specific levels. This issue is only valid
03b33d4ac41e4d drivers/power/supply/ab8500_charger.c wangjianli          2022-10-22  1943   * for below a certain battery voltage. This function makes sure that
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1944   * the allowed current limit isn't exceeded.
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1945   */
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1946  static void ab8500_charger_check_vbat_work(struct work_struct *work)
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1947  {
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1948  	int t = 10;
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1949  	struct ab8500_charger *di = container_of(work,
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1950  		struct ab8500_charger, check_vbat_work.work);
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1951  
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29 @1952  	class_for_each_device(power_supply_class, NULL,
21ad180d0fdfb2 drivers/power/supply/ab8500_charger.c Linus Walleij       2022-01-29  1953  			      &di->usb_chg, ab8500_charger_get_ext_psy_data);
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1954  
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1955  	/* First run old_vbat is 0. */
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1956  	if (di->old_vbat == 0)
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1957  		di->old_vbat = di->vbat;
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1958  
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1959  	if (!((di->old_vbat <= VBAT_TRESH_IP_CUR_RED &&
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1960  		di->vbat <= VBAT_TRESH_IP_CUR_RED) ||
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1961  		(di->old_vbat > VBAT_TRESH_IP_CUR_RED &&
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1962  		di->vbat > VBAT_TRESH_IP_CUR_RED))) {
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1963  
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1964  		dev_dbg(di->dev, "Vbat did cross threshold, curr: %d, new: %d,"
83e5aa77d1120f drivers/power/supply/ab8500_charger.c Linus Walleij       2021-11-20  1965  			" old: %d\n", di->max_usb_in_curr.usb_type_max_ua,
f7470b5d246294 drivers/power/ab8500_charger.c        Lee Jones           2013-02-14  1966  			di->vbat, di->old_vbat);
f7470b5d246294 drivers/power/ab8500_charger.c        Lee Jones           2013-02-14  1967  		ab8500_charger_set_vbus_in_curr(di,
83e5aa77d1120f drivers/power/supply/ab8500_charger.c Linus Walleij       2021-11-20  1968  					di->max_usb_in_curr.usb_type_max_ua);
297d716f6260cc drivers/power/ab8500_charger.c        Krzysztof Kozlowski 2015-03-12  1969  		power_supply_changed(di->usb_chg.psy);
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1970  	}
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1971  
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1972  	di->old_vbat = di->vbat;
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1973  
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1974  	/*
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1975  	 * No need to check the battery voltage every second when not close to
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1976  	 * the threshold.
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1977  	 */
21ad180d0fdfb2 drivers/power/supply/ab8500_charger.c Linus Walleij       2022-01-29  1978  	if (di->vbat < (VBAT_TRESH_IP_CUR_RED + 100000) &&
21ad180d0fdfb2 drivers/power/supply/ab8500_charger.c Linus Walleij       2022-01-29  1979  		(di->vbat > (VBAT_TRESH_IP_CUR_RED - 100000)))
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1980  			t = 1;
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1981  
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1982  	queue_delayed_work(di->charger_wq, &di->check_vbat_work, t * HZ);
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1983  }
84edbeeab67c15 drivers/power/ab8500_charger.c        Arun Murthy         2012-02-29  1984  

:::::: The code at line 1952 was first introduced by commit
:::::: 84edbeeab67c1575067335179513150115da367b ab8500-charger: AB8500 charger driver

:::::: TO: Arun Murthy <arun.murthy@stericsson.com>
:::::: CC: Anton Vorontsov <anton.vorontsov@linaro.org>

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

                 reply	other threads:[~2023-09-26  1:02 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=202309260840.RhikPOC0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sebastian.reichel@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.