All of lore.kernel.org
 help / color / mirror / Atom feed
* [intel-linux-intel-lts:5.4/yocto 120/1142] drivers/misc/vpusmm/vpusmm_driver.c:274 vpusmm_session_unimport_dmabuf() warn: inconsistent indenting
@ 2020-12-11  2:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-12-11  2:35 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2695 bytes --]

tree:   https://github.com/intel/linux-intel-lts.git 5.4/yocto
head:   eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 2c4a98833ded50c324a6c5e7c949f93cca137acf [120/1142] misc: vpusmm: add alloc/import DMABuf for VPU
config: i386-randconfig-m021-20201211 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

New smatch warnings:
drivers/misc/vpusmm/vpusmm_driver.c:274 vpusmm_session_unimport_dmabuf() warn: inconsistent indenting
drivers/misc/vpusmm/vpusmm_driver.c:301 vpusmm_open() warn: passing zero to 'PTR_ERR'
drivers/misc/vpusmm/vpusmm_driver.c:842 vpusmm_probe() warn: passing zero to 'PTR_ERR'
drivers/misc/vpusmm/vpusmm_driver.c:1047 vpusmm_init() warn: passing zero to 'PTR_ERR'

Old smatch warnings:
drivers/misc/vpusmm/vpusmm_driver.c:1061 vpusmm_init() warn: passing zero to 'PTR_ERR'

vim +274 drivers/misc/vpusmm/vpusmm_driver.c

   265	
   266	
   267	static void vpusmm_session_unimport_dmabuf(
   268		struct vpusmm_session *sess,
   269		struct dma_buf *dmabuf)
   270	{
   271		struct vpusmm_imported_dmabuf *item = NULL;
   272	
   273		mutex_lock(&sess->imp_rb_lock);
 > 274			item = vpusmm_session_find_imp_dmabuf(sess, dmabuf);
   275			if (item) {
   276				item->refcount--;
   277				if (item->refcount <= 0) {
   278					rb_erase(&item->node, &sess->imp_rb);
   279					dma_buf_unmap_attachment(item->attach, item->sgt, item->direction);
   280					dma_buf_detach(item->dmabuf, item->attach);
   281					dma_buf_put(item->dmabuf);
   282					kfree(item);
   283				}
   284			}
   285		mutex_unlock(&sess->imp_rb_lock);
   286	}
   287	
   288	/******************************
   289	 * driver's open/release fops *
   290	 ******************************/
   291	static int vpusmm_open(struct inode *inode, struct file *filp)
   292	{
   293		int retval = 0;
   294		struct vpusmm_session *sess;
   295		struct vpusmm_device *dev;
   296	
   297		dev = container_of(inode->i_cdev, struct vpusmm_device, cdev);
   298	
   299		sess = kzalloc(sizeof(*sess), GFP_KERNEL);
   300		if (IS_ERR_OR_NULL(sess)) {
 > 301			retval = PTR_ERR(sess);
   302			sess = NULL;
   303			goto failed;
   304		}
   305		sess->dev = dev;
   306		sess->imp_rb = RB_ROOT;
   307	
   308		mutex_init(&sess->imp_rb_lock);
   309	
   310		// create session
   311		filp->private_data = sess;
   312	
   313		return retval;
   314	failed:
   315		return retval;
   316	}
   317	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28134 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-11  2:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11  2:35 [intel-linux-intel-lts:5.4/yocto 120/1142] drivers/misc/vpusmm/vpusmm_driver.c:274 vpusmm_session_unimport_dmabuf() warn: inconsistent indenting kernel test robot

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.