From: kernel test robot <lkp@intel.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: drivers/isdn/hardware/mISDN/avmfritz.c:494:30: sparse: sparse: incorrect type in argument 1 (different base types)
Date: Tue, 26 Sep 2023 07:15:18 +0800 [thread overview]
Message-ID: <202309260705.tXRNV0dr-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6465e260f48790807eef06b583b38ca9789b6072
commit: 15104de122a4f0258981b06ed94cf616a6eb03ef x86: Adjust types used in port I/O helpers
date: 1 year, 6 months ago
config: x86_64-randconfig-122-20230926 (https://download.01.org/0day-ci/archive/20230926/202309260705.tXRNV0dr-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230926/202309260705.tXRNV0dr-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/202309260705.tXRNV0dr-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/isdn/hardware/mISDN/avmfritz.c:421:23: sparse: sparse: cast to restricted __le32
>> drivers/isdn/hardware/mISDN/avmfritz.c:494:30: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
drivers/isdn/hardware/mISDN/avmfritz.c:494:30: sparse: expected unsigned int [usertype] value
drivers/isdn/hardware/mISDN/avmfritz.c:494:30: sparse: got restricted __le32 [usertype]
vim +494 drivers/isdn/hardware/mISDN/avmfritz.c
6115d2f3fcaebe Karsten Keil 2009-07-22 434
6115d2f3fcaebe Karsten Keil 2009-07-22 435 static void
6115d2f3fcaebe Karsten Keil 2009-07-22 436 hdlc_fill_fifo(struct bchannel *bch)
6115d2f3fcaebe Karsten Keil 2009-07-22 437 {
6115d2f3fcaebe Karsten Keil 2009-07-22 438 struct fritzcard *fc = bch->hw;
6115d2f3fcaebe Karsten Keil 2009-07-22 439 struct hdlc_hw *hdlc;
b41a9a66f67817 Karsten Keil 2012-07-29 440 int count, fs, cnt = 0, idx;
b41a9a66f67817 Karsten Keil 2012-07-29 441 bool fillempty = false;
6115d2f3fcaebe Karsten Keil 2009-07-22 442 u8 *p;
6115d2f3fcaebe Karsten Keil 2009-07-22 443 u32 *ptr, val, addr;
6115d2f3fcaebe Karsten Keil 2009-07-22 444
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 445 idx = (bch->nr - 1) & 1;
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 446 hdlc = &fc->hdlc[idx];
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 447 fs = (fc->type == AVM_FRITZ_PCIV2) ?
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 448 HDLC_FIFO_SIZE_V2 : HDLC_FIFO_SIZE_V1;
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 449 if (!bch->tx_skb) {
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 450 if (!test_bit(FLG_TX_EMPTY, &bch->Flags))
6115d2f3fcaebe Karsten Keil 2009-07-22 451 return;
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 452 count = fs;
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 453 p = bch->fill;
b41a9a66f67817 Karsten Keil 2012-07-29 454 fillempty = true;
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 455 } else {
6115d2f3fcaebe Karsten Keil 2009-07-22 456 count = bch->tx_skb->len - bch->tx_idx;
6115d2f3fcaebe Karsten Keil 2009-07-22 457 if (count <= 0)
6115d2f3fcaebe Karsten Keil 2009-07-22 458 return;
6115d2f3fcaebe Karsten Keil 2009-07-22 459 p = bch->tx_skb->data + bch->tx_idx;
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 460 }
6115d2f3fcaebe Karsten Keil 2009-07-22 461 hdlc->ctrl.sr.cmd &= ~HDLC_CMD_XME;
09e79a777a0c9c Karsten Keil 2012-05-15 462 if (count > fs) {
09e79a777a0c9c Karsten Keil 2012-05-15 463 count = fs;
6115d2f3fcaebe Karsten Keil 2009-07-22 464 } else {
6115d2f3fcaebe Karsten Keil 2009-07-22 465 if (test_bit(FLG_HDLC, &bch->Flags))
6115d2f3fcaebe Karsten Keil 2009-07-22 466 hdlc->ctrl.sr.cmd |= HDLC_CMD_XME;
6115d2f3fcaebe Karsten Keil 2009-07-22 467 }
6115d2f3fcaebe Karsten Keil 2009-07-22 468 ptr = (u32 *)p;
b41a9a66f67817 Karsten Keil 2012-07-29 469 if (!fillempty) {
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 470 pr_debug("%s.B%d: %d/%d/%d", fc->name, bch->nr, count,
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 471 bch->tx_idx, bch->tx_skb->len);
6115d2f3fcaebe Karsten Keil 2009-07-22 472 bch->tx_idx += count;
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 473 } else {
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 474 pr_debug("%s.B%d: fillempty %d\n", fc->name, bch->nr, count);
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 475 }
09e79a777a0c9c Karsten Keil 2012-05-15 476 hdlc->ctrl.sr.xml = ((count == fs) ? 0 : count);
09e79a777a0c9c Karsten Keil 2012-05-15 477 if (fc->type == AVM_FRITZ_PCIV2) {
6115d2f3fcaebe Karsten Keil 2009-07-22 478 __write_ctrl_pciv2(fc, hdlc, bch->nr);
6115d2f3fcaebe Karsten Keil 2009-07-22 479 addr = fc->addr + (bch->nr == 2 ?
6115d2f3fcaebe Karsten Keil 2009-07-22 480 AVM_HDLC_FIFO_2 : AVM_HDLC_FIFO_1);
6115d2f3fcaebe Karsten Keil 2009-07-22 481 } else {
6115d2f3fcaebe Karsten Keil 2009-07-22 482 __write_ctrl_pci(fc, hdlc, bch->nr);
6115d2f3fcaebe Karsten Keil 2009-07-22 483 addr = fc->addr + CHIP_WINDOW;
6115d2f3fcaebe Karsten Keil 2009-07-22 484 }
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 485 if (fillempty) {
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 486 while (cnt < count) {
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 487 /* all bytes the same - no worry about endian */
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 488 outl(*ptr, addr);
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 489 cnt += 4;
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 490 }
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 491 } else {
6115d2f3fcaebe Karsten Keil 2009-07-22 492 while (cnt < count) {
6115d2f3fcaebe Karsten Keil 2009-07-22 493 val = get_unaligned(ptr);
6115d2f3fcaebe Karsten Keil 2009-07-22 @494 outl(cpu_to_le32(val), addr);
6115d2f3fcaebe Karsten Keil 2009-07-22 495 ptr++;
6115d2f3fcaebe Karsten Keil 2009-07-22 496 cnt += 4;
6115d2f3fcaebe Karsten Keil 2009-07-22 497 }
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 498 }
6d1ee48fd0d8d2 Karsten Keil 2012-05-15 499 if ((debug & DEBUG_HW_BFIFO) && !fillempty) {
6115d2f3fcaebe Karsten Keil 2009-07-22 500 snprintf(fc->log, LOG_SIZE, "B%1d-send %s %d ",
6115d2f3fcaebe Karsten Keil 2009-07-22 501 bch->nr, fc->name, count);
6115d2f3fcaebe Karsten Keil 2009-07-22 502 print_hex_dump_bytes(fc->log, DUMP_PREFIX_OFFSET, p, count);
6115d2f3fcaebe Karsten Keil 2009-07-22 503 }
6115d2f3fcaebe Karsten Keil 2009-07-22 504 }
6115d2f3fcaebe Karsten Keil 2009-07-22 505
:::::: The code at line 494 was first introduced by commit
:::::: 6115d2f3fcaebed5b88fa9cefd178bb5b07461ff mISDN: Driver for AVM Fritz!CARD PCI
:::::: TO: Karsten Keil <keil@b1-systems.de>
:::::: CC: Karsten Keil <keil@b1-systems.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-09-25 23:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 23:15 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-19 13:29 drivers/isdn/hardware/mISDN/avmfritz.c:494:30: sparse: sparse: incorrect type in argument 1 (different base types) kernel test robot
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=202309260705.tXRNV0dr-lkp@intel.com \
--to=lkp@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tglx@linutronix.de \
/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.