BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: Linux Memory Management List TO: "Nuno Sá" CC: Jonathan Cameron CC: Andy Shevchenko tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 147307c69ba4441ee90c1f8ce8edf5df4ea60f67 commit: e6dad5edfb8c00027d3ce004e0dab76f70bb9132 [4428/8929] iio: core: introduce iio_device_{claim|release}_buffer_mode() APIs :::::: branch date: 11 hours ago :::::: commit date: 2 weeks ago config: parisc-randconfig-c004-20221118 compiler: hppa-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Julia Lawall cocci warnings: (new ones prefixed by >>) >> drivers/iio/industrialio-core.c:2102:2-8: preceding lock on line 2099 vim +2102 drivers/iio/industrialio-core.c 08a33805518e78 Alison Schofield 2016-03-09 2085 e6dad5edfb8c00 Nuno Sá 2022-10-12 2086 /** e6dad5edfb8c00 Nuno Sá 2022-10-12 2087 * iio_device_claim_buffer_mode - Keep device in buffer mode e6dad5edfb8c00 Nuno Sá 2022-10-12 2088 * @indio_dev: the iio_dev associated with the device e6dad5edfb8c00 Nuno Sá 2022-10-12 2089 * e6dad5edfb8c00 Nuno Sá 2022-10-12 2090 * If the device is in buffer mode it is guaranteed to stay e6dad5edfb8c00 Nuno Sá 2022-10-12 2091 * that way until iio_device_release_buffer_mode() is called. e6dad5edfb8c00 Nuno Sá 2022-10-12 2092 * e6dad5edfb8c00 Nuno Sá 2022-10-12 2093 * Use with iio_device_release_buffer_mode(). e6dad5edfb8c00 Nuno Sá 2022-10-12 2094 * e6dad5edfb8c00 Nuno Sá 2022-10-12 2095 * Returns: 0 on success, -EBUSY on failure. e6dad5edfb8c00 Nuno Sá 2022-10-12 2096 */ e6dad5edfb8c00 Nuno Sá 2022-10-12 2097 int iio_device_claim_buffer_mode(struct iio_dev *indio_dev) e6dad5edfb8c00 Nuno Sá 2022-10-12 2098 { e6dad5edfb8c00 Nuno Sá 2022-10-12 @2099 mutex_lock(&indio_dev->mlock); e6dad5edfb8c00 Nuno Sá 2022-10-12 2100 e6dad5edfb8c00 Nuno Sá 2022-10-12 2101 if (iio_buffer_enabled(indio_dev)) e6dad5edfb8c00 Nuno Sá 2022-10-12 @2102 return 0; e6dad5edfb8c00 Nuno Sá 2022-10-12 2103 e6dad5edfb8c00 Nuno Sá 2022-10-12 2104 mutex_unlock(&indio_dev->mlock); e6dad5edfb8c00 Nuno Sá 2022-10-12 2105 return -EBUSY; e6dad5edfb8c00 Nuno Sá 2022-10-12 2106 } e6dad5edfb8c00 Nuno Sá 2022-10-12 2107 EXPORT_SYMBOL_GPL(iio_device_claim_buffer_mode); e6dad5edfb8c00 Nuno Sá 2022-10-12 2108 -- 0-DAY CI Kernel Test Service https://01.org/lkp