From: kernel test robot <lkp@intel.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Niklas Cassel <cassel@kernel.org>
Subject: drivers/ata/pata_ep93xx.c:494:33: sparse: sparse: incorrect type in assignment (different base types)
Date: Thu, 23 Jul 2026 15:15:40 +0800 [thread overview]
Message-ID: <202607231521.gvhnJpOG-lkp@intel.com> (raw)
Hi Rosen,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4539944e515183668109bdf4d0c3d7d228383d88
commit: 590da526959499e58671f65655825d8a1973ff27 ata: pata_ep93xx: add COMPILE_TEST support
date: 7 weeks ago
config: microblaze-randconfig-r121-20260723 (https://download.01.org/0day-ci/archive/20260723/202607231521.gvhnJpOG-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 16.1.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260723/202607231521.gvhnJpOG-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
| Fixes: 590da5269594 ("ata: pata_ep93xx: add COMPILE_TEST support")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607231521.gvhnJpOG-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/ata/pata_ep93xx.c:494:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __le16 [usertype] @@
drivers/ata/pata_ep93xx.c:494:33: sparse: expected unsigned short [usertype]
drivers/ata/pata_ep93xx.c:494:33: sparse: got restricted __le16 [usertype]
>> drivers/ata/pata_ep93xx.c:498:58: sparse: sparse: cast to restricted __le16
>> drivers/ata/pata_ep93xx.c:508:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned char @@ got restricted __le16 [usertype] @@
drivers/ata/pata_ep93xx.c:508:30: sparse: expected unsigned char
drivers/ata/pata_ep93xx.c:508:30: sparse: got restricted __le16 [usertype]
drivers/ata/pata_ep93xx.c:514:58: sparse: sparse: cast to restricted __le16
vim +494 drivers/ata/pata_ep93xx.c
2fff27512600f9 Rafal Prylowski 2012-04-12 480
2fff27512600f9 Rafal Prylowski 2012-04-12 481 /* Note: original code is ata_sff_data_xfer */
989e0aac1a801e Bartlomiej Zolnierkiewicz 2016-12-30 482 static unsigned int ep93xx_pata_data_xfer(struct ata_queued_cmd *qc,
2fff27512600f9 Rafal Prylowski 2012-04-12 483 unsigned char *buf,
2fff27512600f9 Rafal Prylowski 2012-04-12 484 unsigned int buflen, int rw)
2fff27512600f9 Rafal Prylowski 2012-04-12 485 {
989e0aac1a801e Bartlomiej Zolnierkiewicz 2016-12-30 486 struct ata_port *ap = qc->dev->link->ap;
2fff27512600f9 Rafal Prylowski 2012-04-12 487 struct ep93xx_pata_data *drv_data = ap->host->private_data;
2fff27512600f9 Rafal Prylowski 2012-04-12 488 u16 *data = (u16 *)buf;
2fff27512600f9 Rafal Prylowski 2012-04-12 489 unsigned int words = buflen >> 1;
2fff27512600f9 Rafal Prylowski 2012-04-12 490
2fff27512600f9 Rafal Prylowski 2012-04-12 491 /* Transfer multiple of 2 bytes */
2fff27512600f9 Rafal Prylowski 2012-04-12 492 while (words--)
2fff27512600f9 Rafal Prylowski 2012-04-12 493 if (rw == READ)
2fff27512600f9 Rafal Prylowski 2012-04-12 @494 *data++ = cpu_to_le16(
2fff27512600f9 Rafal Prylowski 2012-04-12 495 ep93xx_pata_read_data(
2fff27512600f9 Rafal Prylowski 2012-04-12 496 drv_data, IDECTRL_ADDR_DATA));
2fff27512600f9 Rafal Prylowski 2012-04-12 497 else
2fff27512600f9 Rafal Prylowski 2012-04-12 @498 ep93xx_pata_write_data(drv_data, le16_to_cpu(*data++),
2fff27512600f9 Rafal Prylowski 2012-04-12 499 IDECTRL_ADDR_DATA);
2fff27512600f9 Rafal Prylowski 2012-04-12 500
2fff27512600f9 Rafal Prylowski 2012-04-12 501 /* Transfer trailing 1 byte, if any. */
2fff27512600f9 Rafal Prylowski 2012-04-12 502 if (unlikely(buflen & 0x01)) {
2fff27512600f9 Rafal Prylowski 2012-04-12 503 unsigned char pad[2] = { };
2fff27512600f9 Rafal Prylowski 2012-04-12 504
2fff27512600f9 Rafal Prylowski 2012-04-12 505 buf += buflen - 1;
2fff27512600f9 Rafal Prylowski 2012-04-12 506
2fff27512600f9 Rafal Prylowski 2012-04-12 507 if (rw == READ) {
2fff27512600f9 Rafal Prylowski 2012-04-12 @508 *pad = cpu_to_le16(
2fff27512600f9 Rafal Prylowski 2012-04-12 509 ep93xx_pata_read_data(
2fff27512600f9 Rafal Prylowski 2012-04-12 510 drv_data, IDECTRL_ADDR_DATA));
2fff27512600f9 Rafal Prylowski 2012-04-12 511 *buf = pad[0];
2fff27512600f9 Rafal Prylowski 2012-04-12 512 } else {
2fff27512600f9 Rafal Prylowski 2012-04-12 513 pad[0] = *buf;
2fff27512600f9 Rafal Prylowski 2012-04-12 514 ep93xx_pata_write_data(drv_data, le16_to_cpu(*pad),
2fff27512600f9 Rafal Prylowski 2012-04-12 515 IDECTRL_ADDR_DATA);
2fff27512600f9 Rafal Prylowski 2012-04-12 516 }
2fff27512600f9 Rafal Prylowski 2012-04-12 517 words++;
2fff27512600f9 Rafal Prylowski 2012-04-12 518 }
2fff27512600f9 Rafal Prylowski 2012-04-12 519
2fff27512600f9 Rafal Prylowski 2012-04-12 520 return words << 1;
2fff27512600f9 Rafal Prylowski 2012-04-12 521 }
2fff27512600f9 Rafal Prylowski 2012-04-12 522
:::::: The code at line 494 was first introduced by commit
:::::: 2fff27512600f9ad91335577e485a8552edb0abf PATA host controller driver for ep93xx
:::::: TO: Rafal Prylowski <prylowski@metasoft.pl>
:::::: CC: Jeff Garzik <jgarzik@redhat.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-07-23 7:18 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=202607231521.gvhnJpOG-lkp@intel.com \
--to=lkp@intel.com \
--cc=cassel@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rosenp@gmail.com \
/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.