From: kernel test robot <lkp@intel.com>
To: Martin =?unknown-8bit?Q?Povi=C5=A1er?= <povik+lin@cutebit.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Janne Grunau <j@jannau.net>
Subject: [asahilinux:bits/180-sio 2/4] drivers/dma/apple-sio.c:512:5: warning: variable 'param' set but not used
Date: Sun, 17 Nov 2024 15:12:50 +0800 [thread overview]
Message-ID: <202411171547.QP5TMxtb-lkp@intel.com> (raw)
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
reply other threads:[~2024-11-17 7:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202411171547.QP5TMxtb-lkp@intel.com \
--to=lkp@intel.com \
--cc=j@jannau.net \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=povik+lin@cutebit.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.