Hi Douglas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on hid/for-next]
[also build test WARNING on next-20201211]
[cannot apply to jikos-trivial/for-next v5.10-rc7]
[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]
url:
https://github.com/0day-ci/linux/commits/Douglas-Anderson/HID-i2c-hid-Reo...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/5a371169c8cc2abb463e32db3a3fe60ea...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Douglas-Anderson/HID-i2c-hid-Reorganize-to-allow-supporting-goodix-gt7375p/20201212-014239
git checkout 5a371169c8cc2abb463e32db3a3fe60ea34efc87
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> drivers/hid/i2c-hid/i2c-hid-core.c:1050:5: warning: no previous
prototype for 'i2c_hid_core_suspend' [-Wmissing-prototypes]
1050 | int
i2c_hid_core_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
> drivers/hid/i2c-hid/i2c-hid-core.c:1084:5: warning: no previous
prototype for 'i2c_hid_core_resume' [-Wmissing-prototypes]
1084 | int
i2c_hid_core_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~
vim +/i2c_hid_core_suspend +1050 drivers/hid/i2c-hid/i2c-hid-core.c
1048
1049 #ifdef CONFIG_PM_SLEEP
1050 int i2c_hid_core_suspend(struct device *dev)
1051 {
1052 struct i2c_client *client = to_i2c_client(dev);
1053 struct i2c_hid *ihid = i2c_get_clientdata(client);
1054 struct hid_device *hid = ihid->hid;
1055 int ret;
1056 int wake_status;
1057
1058 if (hid->driver && hid->driver->suspend) {
1059 ret = hid->driver->suspend(hid, PMSG_SUSPEND);
1060 if (ret < 0)
1061 return ret;
1062 }
1063
1064 /* Save some power */
1065 i2c_hid_set_power(client, I2C_HID_PWR_SLEEP);
1066
1067 disable_irq(client->irq);
1068
1069 if (device_may_wakeup(&client->dev)) {
1070 wake_status = enable_irq_wake(client->irq);
1071 if (!wake_status)
1072 ihid->irq_wake_enabled = true;
1073 else
1074 hid_warn(hid, "Failed to enable irq wake: %d\n",
1075 wake_status);
1076 } else {
1077 i2c_hid_core_power_down(ihid);
1078 }
1079
1080 return 0;
1081 }
1082 EXPORT_SYMBOL_GPL(i2c_hid_core_suspend);
1083
1084 int i2c_hid_core_resume(struct device *dev)
1085 {
1086 int ret;
1087 struct i2c_client *client = to_i2c_client(dev);
1088 struct i2c_hid *ihid = i2c_get_clientdata(client);
1089 struct hid_device *hid = ihid->hid;
1090 int wake_status;
1091
1092 if (!device_may_wakeup(&client->dev)) {
1093 i2c_hid_core_power_up(ihid);
1094 } else if (ihid->irq_wake_enabled) {
1095 wake_status = disable_irq_wake(client->irq);
1096 if (!wake_status)
1097 ihid->irq_wake_enabled = false;
1098 else
1099 hid_warn(hid, "Failed to disable irq wake: %d\n",
1100 wake_status);
1101 }
1102
1103 enable_irq(client->irq);
1104
1105 /* Instead of resetting device, simply powers the device on. This
1106 * solves "incomplete reports" on Raydium devices 2386:3118 and
1107 * 2386:4B33 and fixes various SIS touchscreens no longer sending
1108 * data after a suspend/resume.
1109 *
1110 * However some ALPS touchpads generate IRQ storm without reset, so
1111 * let's still reset them here.
1112 */
1113 if (ihid->quirks & I2C_HID_QUIRK_RESET_ON_RESUME)
1114 ret = i2c_hid_hwreset(client);
1115 else
1116 ret = i2c_hid_set_power(client, I2C_HID_PWR_ON);
1117
1118 if (ret)
1119 return ret;
1120
1121 if (hid->driver && hid->driver->reset_resume) {
1122 ret = hid->driver->reset_resume(hid);
1123 return ret;
1124 }
1125
1126 return 0;
1127 }
1128 EXPORT_SYMBOL_GPL(i2c_hid_core_resume);
1129 #endif
1130
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org