Re: [PATCH 02/11] ibmvfc: implement channel queue depth and event buffer accounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tyrel,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc2 next-20230918]
[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/Tyrel-Datwyler/ibmvfc-remove-BUG_ON-in-the-case-of-an-empty-event-pool/20230914-085530
base:   linus/master
patch link:    https://lore.kernel.org/r/20230913230457.2575849-3-tyreld%40linux.ibm.com
patch subject: [PATCH 02/11] ibmvfc: implement channel queue depth and event buffer accounting
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20230919/202309191225.q759yNtz-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230919/202309191225.q759yNtz-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/202309191225.q759yNtz-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/scsi/ibmvscsi/ibmvfc.c:789: warning: Excess function parameter 'size' description in 'ibmvfc_init_event_pool'
>> drivers/scsi/ibmvscsi/ibmvfc.c:1534: warning: Function parameter or member 'reserved' not described in '__ibmvfc_get_event'
>> drivers/scsi/ibmvscsi/ibmvfc.c:1534: warning: expecting prototype for ibmvfc_get_event(). Prototype was for __ibmvfc_get_event() instead


vim +789 drivers/scsi/ibmvscsi/ibmvfc.c

072b91f9c6510d Brian King     2008-07-01  778  
225acf5f1aba3b Tyrel Datwyler 2021-01-14  779  /**
225acf5f1aba3b Tyrel Datwyler 2021-01-14  780   * ibmvfc_init_event_pool - Allocates and initializes the event pool for a host
225acf5f1aba3b Tyrel Datwyler 2021-01-14  781   * @vhost:	ibmvfc host who owns the event pool
dd9c772971485d Lee Jones      2021-03-17  782   * @queue:      ibmvfc queue struct
dd9c772971485d Lee Jones      2021-03-17  783   * @size:       pool size
225acf5f1aba3b Tyrel Datwyler 2021-01-14  784   *
225acf5f1aba3b Tyrel Datwyler 2021-01-14  785   * Returns zero on success.
225acf5f1aba3b Tyrel Datwyler 2021-01-14  786   **/
225acf5f1aba3b Tyrel Datwyler 2021-01-14  787  static int ibmvfc_init_event_pool(struct ibmvfc_host *vhost,
a7ed558d0b9030 Tyrel Datwyler 2023-09-13  788  				  struct ibmvfc_queue *queue)
225acf5f1aba3b Tyrel Datwyler 2021-01-14 @789  {
225acf5f1aba3b Tyrel Datwyler 2021-01-14  790  	int i;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  791  	struct ibmvfc_event_pool *pool = &queue->evt_pool;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  792  
225acf5f1aba3b Tyrel Datwyler 2021-01-14  793  	ENTER;
a7ed558d0b9030 Tyrel Datwyler 2023-09-13  794  	if (!queue->total_depth)
bb35ecb2a949d9 Tyrel Datwyler 2021-01-14  795  		return 0;
bb35ecb2a949d9 Tyrel Datwyler 2021-01-14  796  
a7ed558d0b9030 Tyrel Datwyler 2023-09-13  797  	pool->size = queue->total_depth;
a7ed558d0b9030 Tyrel Datwyler 2023-09-13  798  	pool->events = kcalloc(pool->size, sizeof(*pool->events), GFP_KERNEL);
225acf5f1aba3b Tyrel Datwyler 2021-01-14  799  	if (!pool->events)
225acf5f1aba3b Tyrel Datwyler 2021-01-14  800  		return -ENOMEM;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  801  
225acf5f1aba3b Tyrel Datwyler 2021-01-14  802  	pool->iu_storage = dma_alloc_coherent(vhost->dev,
a7ed558d0b9030 Tyrel Datwyler 2023-09-13  803  					      pool->size * sizeof(*pool->iu_storage),
225acf5f1aba3b Tyrel Datwyler 2021-01-14  804  					      &pool->iu_token, 0);
225acf5f1aba3b Tyrel Datwyler 2021-01-14  805  
225acf5f1aba3b Tyrel Datwyler 2021-01-14  806  	if (!pool->iu_storage) {
225acf5f1aba3b Tyrel Datwyler 2021-01-14  807  		kfree(pool->events);
225acf5f1aba3b Tyrel Datwyler 2021-01-14  808  		return -ENOMEM;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  809  	}
225acf5f1aba3b Tyrel Datwyler 2021-01-14  810  
225acf5f1aba3b Tyrel Datwyler 2021-01-14  811  	INIT_LIST_HEAD(&queue->sent);
225acf5f1aba3b Tyrel Datwyler 2021-01-14  812  	INIT_LIST_HEAD(&queue->free);
a7ed558d0b9030 Tyrel Datwyler 2023-09-13  813  	queue->evt_free = queue->evt_depth;
a7ed558d0b9030 Tyrel Datwyler 2023-09-13  814  	queue->reserved_free = queue->reserved_depth;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  815  	spin_lock_init(&queue->l_lock);
225acf5f1aba3b Tyrel Datwyler 2021-01-14  816  
a7ed558d0b9030 Tyrel Datwyler 2023-09-13  817  	for (i = 0; i < pool->size; ++i) {
225acf5f1aba3b Tyrel Datwyler 2021-01-14  818  		struct ibmvfc_event *evt = &pool->events[i];
225acf5f1aba3b Tyrel Datwyler 2021-01-14  819  
a264cf5e81c78e Tyrel Datwyler 2021-07-16  820  		/*
a264cf5e81c78e Tyrel Datwyler 2021-07-16  821  		 * evt->active states
a264cf5e81c78e Tyrel Datwyler 2021-07-16  822  		 *  1 = in flight
a264cf5e81c78e Tyrel Datwyler 2021-07-16  823  		 *  0 = being completed
a264cf5e81c78e Tyrel Datwyler 2021-07-16  824  		 * -1 = free/freed
a264cf5e81c78e Tyrel Datwyler 2021-07-16  825  		 */
a264cf5e81c78e Tyrel Datwyler 2021-07-16  826  		atomic_set(&evt->active, -1);
225acf5f1aba3b Tyrel Datwyler 2021-01-14  827  		atomic_set(&evt->free, 1);
225acf5f1aba3b Tyrel Datwyler 2021-01-14  828  		evt->crq.valid = 0x80;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  829  		evt->crq.ioba = cpu_to_be64(pool->iu_token + (sizeof(*evt->xfer_iu) * i));
225acf5f1aba3b Tyrel Datwyler 2021-01-14  830  		evt->xfer_iu = pool->iu_storage + i;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  831  		evt->vhost = vhost;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  832  		evt->queue = queue;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  833  		evt->ext_list = NULL;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  834  		list_add_tail(&evt->queue_list, &queue->free);
225acf5f1aba3b Tyrel Datwyler 2021-01-14  835  	}
225acf5f1aba3b Tyrel Datwyler 2021-01-14  836  
225acf5f1aba3b Tyrel Datwyler 2021-01-14  837  	LEAVE;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  838  	return 0;
225acf5f1aba3b Tyrel Datwyler 2021-01-14  839  }
225acf5f1aba3b Tyrel Datwyler 2021-01-14  840  

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux