Re: [PATCH v2] i2c: i2c-qcom-geni: Serve transfer during early resume stage
From: kernel test robot
Date: Sun Oct 13 2024 - 10:24:06 EST
Hi Mukesh,
kernel test robot noticed the following build errors:
[auto build test ERROR on v6.12-rc2]
[also build test ERROR on linus/master]
[cannot apply to andi-shyti/i2c/i2c-host next-20241011]
[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/Mukesh-Kumar-Savaliya/i2c-i2c-qcom-geni-Serve-transfer-during-early-resume-stage/20241011-202013
base: v6.12-rc2
patch link: https://lore.kernel.org/r/20241011121757.2267336-1-quic_msavaliy%40quicinc.com
patch subject: [PATCH v2] i2c: i2c-qcom-geni: Serve transfer during early resume stage
config: arc-randconfig-001-20241013 (https://download.01.org/0day-ci/archive/20241013/202410132233.P25W2vKq-lkp@xxxxxxxxx/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241013/202410132233.P25W2vKq-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410132233.P25W2vKq-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/acpi.h:14,
from drivers/i2c/busses/i2c-qcom-geni.c:4:
drivers/i2c/busses/i2c-qcom-geni.c: In function 'geni_i2c_xfer':
>> drivers/i2c/busses/i2c-qcom-geni.c:711:48: error: 'struct dev_pm_info' has no member named 'usage_count'
711 | atomic_read(&dev->power.usage_count));
| ^
include/linux/dev_printk.h:129:48: note: in definition of macro 'dev_printk'
129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/i2c/busses/i2c-qcom-geni.c:710:17: note: in expansion of macro 'dev_dbg'
710 | dev_dbg(dev, "Runtime PM is disabled hence force resume, pm_usage_count: %d\n",
| ^~~~~~~
vim +711 drivers/i2c/busses/i2c-qcom-geni.c
696
697 static int geni_i2c_xfer(struct i2c_adapter *adap,
698 struct i2c_msg msgs[],
699 int num)
700 {
701 struct geni_i2c_dev *gi2c = i2c_get_adapdata(adap);
702 struct device *dev = gi2c->se.dev;
703 int ret;
704
705 gi2c->err = 0;
706 reinit_completion(&gi2c->done);
707
708 /* Serve I2C transfer by forced resume whether Runtime PM is enbled or not */
709 if (!pm_runtime_enabled(dev) && gi2c->suspended) {
710 dev_dbg(dev, "Runtime PM is disabled hence force resume, pm_usage_count: %d\n",
> 711 atomic_read(&dev->power.usage_count));
712 ret = geni_i2c_force_resume(gi2c);
713 if (ret)
714 return ret;
715 } else {
716 ret = pm_runtime_get_sync(dev);
717 if (ret == -EACCES && gi2c->suspended) {
718 dev_dbg(dev, "pm_runtime_get_sync() failed-%d, force resume\n", ret);
719 ret = geni_i2c_force_resume(gi2c);
720 if (ret)
721 return ret;
722 }
723 }
724
725 qcom_geni_i2c_conf(gi2c);
726
727 if (gi2c->gpi_mode)
728 ret = geni_i2c_gpi_xfer(gi2c, msgs, num);
729 else
730 ret = geni_i2c_fifo_xfer(gi2c, msgs, num);
731
732 /* Does Opposite to Forced Resume when runtime PM was not enabled and served
733 * Transfer via forced resume.
734 */
735 if (!pm_runtime_enabled(dev) && !gi2c->suspended) {
736 pm_runtime_put_noidle(dev);
737 pm_runtime_set_suspended(dev);
738 /* Reset flag same as runtime suspend, next xfer PM can be enabled */
739 gi2c->suspended = 0;
740 } else {
741 pm_runtime_mark_last_busy(gi2c->se.dev);
742 pm_runtime_put_autosuspend(gi2c->se.dev);
743 }
744
745 gi2c->cur = NULL;
746 gi2c->err = 0;
747 return ret;
748 }
749
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki