All of lore.kernel.org
 help / color / mirror / Atom feed
* [ogabbay:habanalabs-next 19/62] drivers/misc/habanalabs/gaudi/gaudi.c:1032:36: warning: variable 'prop' set but not used
@ 2020-11-19  7:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-19  7:11 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head:   f3fad4c1da9034b716430407921cbd316d8c76dd
commit: 926c1bd50451e2c0e0dbec4b88a7f7ac93cbee9e [19/62] habanalabs: sync stream collective support
config: s390-allyesconfig (attached as .config)
compiler: s390-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://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=926c1bd50451e2c0e0dbec4b88a7f7ac93cbee9e
        git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
        git fetch --no-tags ogabbay habanalabs-next
        git checkout 926c1bd50451e2c0e0dbec4b88a7f7ac93cbee9e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 

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

All warnings (new ones prefixed by >>):

   drivers/misc/habanalabs/gaudi/gaudi.c: In function 'gaudi_collective_wait_init_cs':
>> drivers/misc/habanalabs/gaudi/gaudi.c:1032:36: warning: variable 'prop' set but not used [-Wunused-but-set-variable]
    1032 |  struct hl_sync_stream_properties *prop;
         |                                    ^~~~
   drivers/misc/habanalabs/gaudi/gaudi.c: At top level:
   drivers/misc/habanalabs/gaudi/gaudi.c:3012:6: warning: no previous prototype for 'gaudi_init_nic_qmans' [-Wmissing-prototypes]
    3012 | void gaudi_init_nic_qmans(struct hl_device *hdev)
         |      ^~~~~~~~~~~~~~~~~~~~
>> drivers/misc/habanalabs/gaudi/gaudi.c:7688:6: warning: no previous prototype for 'gaudi_ctx_fini' [-Wmissing-prototypes]
    7688 | void gaudi_ctx_fini(struct hl_ctx *ctx)
         |      ^~~~~~~~~~~~~~

vim +/prop +1032 drivers/misc/habanalabs/gaudi/gaudi.c

  1023	
  1024	static void gaudi_collective_wait_init_cs(struct hl_cs *cs)
  1025	{
  1026		struct hl_cs_compl *signal_cs_cmpl =
  1027			container_of(cs->signal_fence, struct hl_cs_compl, base_fence);
  1028		struct hl_cs_compl *cs_cmpl =
  1029			container_of(cs->fence, struct hl_cs_compl, base_fence);
  1030		struct gaudi_collective_properties *cprop;
  1031		u32 stream, queue_id, sob_group_offset;
> 1032		struct hl_sync_stream_properties *prop;
  1033		struct gaudi_device *gaudi;
  1034		struct hl_device *hdev;
  1035		struct hl_cs_job *job;
  1036		struct hl_ctx *ctx;
  1037	
  1038		ctx = cs->ctx;
  1039		hdev = ctx->hdev;
  1040		gaudi = hdev->asic_specific;
  1041		cprop = &gaudi->collective_props;
  1042	
  1043		/* copy the SOB id and value of the signal CS */
  1044		cs_cmpl->hw_sob = signal_cs_cmpl->hw_sob;
  1045		cs_cmpl->sob_val = signal_cs_cmpl->sob_val;
  1046	
  1047		/* Calculate the stream from collective master queue (1st job) */
  1048		job = list_first_entry(&cs->job_list, struct hl_cs_job, cs_node);
  1049		stream = job->hw_queue_id % 4;
  1050		sob_group_offset =
  1051			stream * HL_RSVD_SOBS + cprop->curr_sob_group_idx[stream];
  1052	
  1053		list_for_each_entry(job, &cs->job_list, cs_node) {
  1054			queue_id = job->hw_queue_id;
  1055			prop = &hdev->kernel_queues[queue_id].sync_stream_prop;
  1056	
  1057			if (hdev->kernel_queues[queue_id].collective_mode ==
  1058					HL_COLLECTIVE_MASTER) {
  1059				gaudi_collective_master_init_job(hdev, job, stream,
  1060							sob_group_offset);
  1061			} else {
  1062				gaudi_collective_slave_init_job(hdev, job, cs_cmpl);
  1063			}
  1064		}
  1065	
  1066		cs_cmpl->sob_group = sob_group_offset;
  1067	
  1068		/* Handle sob group kref and wraparound */
  1069		kref_get(&cprop->hw_sob_group[sob_group_offset].kref);
  1070		cprop->next_sob_group_val[stream]++;
  1071	
  1072		if (cprop->next_sob_group_val[stream] == HL_MAX_SOB_VAL) {
  1073			/*
  1074			 * Decrement as we reached the max value.
  1075			 * The release function won't be called here as we've
  1076			 * just incremented the refcount.
  1077			 */
  1078			kref_put(&cprop->hw_sob_group[sob_group_offset].kref,
  1079					gaudi_sob_group_reset_error);
  1080			cprop->next_sob_group_val[stream] = 1;
  1081			/* only two SOBs are currently in use */
  1082			cprop->curr_sob_group_idx[stream] =
  1083				(cprop->curr_sob_group_idx[stream] + 1) &
  1084								(HL_RSVD_SOBS - 1);
  1085	
  1086			gaudi_collective_map_sobs(hdev, stream);
  1087	
  1088			dev_dbg(hdev->dev, "switched to SOB group %d, stream: %d\n",
  1089					cprop->curr_sob_group_idx[stream], stream);
  1090		}
  1091	
  1092		/* Increment kref since all slave queues are now waiting on it */
  1093		kref_get(&cs_cmpl->hw_sob->kref);
  1094		/*
  1095		 * Must put the signal fence after the SOB refcnt increment so
  1096		 * the SOB refcnt won't turn 0 and reset the SOB before the
  1097		 * wait CS was submitted.
  1098		 */
  1099		mb();
  1100		hl_fence_put(cs->signal_fence);
  1101		cs->signal_fence = NULL;
  1102	}
  1103	

---
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: 64369 bytes --]

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

only message in thread, other threads:[~2020-11-19  7:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19  7:11 [ogabbay:habanalabs-next 19/62] drivers/misc/habanalabs/gaudi/gaudi.c:1032:36: warning: variable 'prop' set but not used 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.