All of lore.kernel.org
 help / color / mirror / Atom feed
* [asahilinux:bits/180-sio 2/4] drivers/dma/apple-sio.c:512:5: warning: variable 'param' set but not used
@ 2024-11-17  7:12 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-17  7:12 UTC (permalink / raw)
  To: Martin =?unknown-8bit?Q?Povi=C5=A1er?=; +Cc: llvm, oe-kbuild-all, Janne Grunau

tree:   https://github.com/AsahiLinux/linux bits/180-sio
head:   bdf5443483813f581ab80ea5e4a6b675ec2c211f
commit: b84a7086d959ffdb1184c2022e5e0f0941467055 [2/4] dmaengine: apple-sio: Add Apple SIO driver
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241117/202411171547.QP5TMxtb-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411171547.QP5TMxtb-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411171547.QP5TMxtb-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/dma/apple-sio.c:12:
   In file included from include/linux/dma-mapping.h:11:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2232:
   include/linux/vmstat.h:503:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     503 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     504 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:510:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     510 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     511 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     517 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:523:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     523 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     524 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/dma/apple-sio.c:512:5: warning: variable 'param' set but not used [-Wunused-but-set-variable]
     512 |         u8 param, type, tag, sioep;
         |            ^
   5 warnings generated.


vim +/param +512 drivers/dma/apple-sio.c

   506	
   507	static void sio_recv_msg(void *cookie, u8 ep, u64 msg)
   508	{
   509		struct sio_data *sio = cookie;
   510		struct sio_tagdata *tags = &sio->tags;
   511		u32 data;
 > 512		u8 param, type, tag, sioep;
   513	
   514		if (ep != EP_SIO)
   515			goto unknown;
   516	
   517		data  = FIELD_GET(SIOMSG_DATA, msg);
   518		param = FIELD_GET(SIOMSG_PARAM, msg);
   519		type  = FIELD_GET(SIOMSG_TYPE, msg);
   520		tag   = FIELD_GET(SIOMSG_TAG, msg);
   521		sioep = FIELD_GET(SIOMSG_EP, msg);
   522	
   523		switch (type) {
   524		case MSG_STARTED:
   525			dev_info(sio->dev, "SIO protocol v%u\n", data);
   526			type = MSG_ACK; /* Pretend this is an ACK */
   527			fallthrough;
   528		case MSG_ACK:
   529		case MSG_NACK:
   530			if (WARN_ON(tag >= SIO_NTAGS))
   531				break;
   532	
   533			if (tags->atomic[tag]) {
   534				sio_ack_callback callback = tags->ack_callback[tag];
   535	
   536				if (callback && !WARN_ON(sioep >= sio->nchannels))
   537					callback(&sio->channels[sioep],
   538						 tags->cookie[tag], type == MSG_ACK);
   539				if (type == MSG_NACK)
   540					dev_err(sio->dev, "got a NACK on channel %d\n", sioep);
   541				sio_free_tag(sio, tag);
   542			} else {
   543				tags->acked[tag] = (type == MSG_ACK);
   544				complete(&tags->completions[tag]);
   545			}
   546			break;
   547	
   548		case MSG_REPORT:
   549			if (WARN_ON(sioep >= sio->nchannels))
   550				break;
   551	
   552			sio_process_report(&sio->channels[sioep]);
   553			break;
   554	
   555		default:
   556			goto unknown;
   557		}
   558		return;
   559	
   560	unknown:
   561		dev_warn(sio->dev, "received unknown message: ep %x data %016llx\n",
   562			 ep, msg);
   563	}
   564	

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

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

only message in thread, other threads:[~2024-11-17  7:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-17  7:12 [asahilinux:bits/180-sio 2/4] drivers/dma/apple-sio.c:512:5: warning: variable 'param' 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.