From: "Krzysztof Wilczyński" <kw@linux.com>
To: kernel test robot <lkp@intel.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
kbuild-all@lists.01.org, linux-pci@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Dan Williams <dan.j.williams@intel.com>,
Frederic Barrat <fbarrat@linux.ibm.com>,
Andrew Donnellan <ajd@linux.ibm.com>
Subject: Re: [helgaas-pci:pci/driver 17/24] drivers/misc/cxl/guest.c:34:29: sparse: sparse: incorrect type in assignment (different modifiers)
Date: Fri, 12 Nov 2021 14:44:51 +0100 [thread overview]
Message-ID: <YY5v0wzW192k1fG+@rocinante> (raw)
In-Reply-To: <202111121836.Oiqcphv0-lkp@intel.com>
[+CC Adding Jonathan, Dan, Frederic and Andrew for visibility]
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/driver
> head: 0508b6f72f055b88df518db4f3811bda9bb35da4
> commit: 115c9d41e58388415f4956d0a988c90fb48663b9 [17/24] cxl: Factor out common dev->driver expressions
> config: powerpc64-randconfig-s032-20211025 (attached as .config)
> compiler: powerpc64-linux-gcc (GCC) 11.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # apt-get install sparse
> # sparse version: v0.6.4-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?id=115c9d41e58388415f4956d0a988c90fb48663b9
> git remote add helgaas-pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
> git fetch --no-tags helgaas-pci pci/driver
> git checkout 115c9d41e58388415f4956d0a988c90fb48663b9
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> sparse warnings: (new ones prefixed by >>)
> >> drivers/misc/cxl/guest.c:34:29: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct pci_error_handlers *err_handler @@ got struct pci_error_handlers const *err_handler @@
> drivers/misc/cxl/guest.c:34:29: sparse: expected struct pci_error_handlers *err_handler
> drivers/misc/cxl/guest.c:34:29: sparse: got struct pci_error_handlers const *err_handler
> drivers/misc/cxl/guest.c:108:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] phys_addr @@ got restricted __be64 [usertype] @@
> drivers/misc/cxl/guest.c:108:33: sparse: expected unsigned long long [usertype] phys_addr
> drivers/misc/cxl/guest.c:108:33: sparse: got restricted __be64 [usertype]
> drivers/misc/cxl/guest.c:109:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] len @@ got restricted __be64 [usertype] @@
> drivers/misc/cxl/guest.c:109:27: sparse: expected unsigned long long [usertype] len
> drivers/misc/cxl/guest.c:109:27: sparse: got restricted __be64 [usertype]
> drivers/misc/cxl/guest.c:111:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] len @@ got restricted __be64 [usertype] @@
> drivers/misc/cxl/guest.c:111:35: sparse: expected unsigned long long [usertype] len
> drivers/misc/cxl/guest.c:111:35: sparse: got restricted __be64 [usertype]
> drivers/misc/cxl/guest.c:443:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned short const volatile [noderef] [usertype] __iomem *addr @@ got unsigned short [usertype] * @@
> drivers/misc/cxl/guest.c:443:33: sparse: expected unsigned short const volatile [noderef] [usertype] __iomem *addr
> drivers/misc/cxl/guest.c:443:33: sparse: got unsigned short [usertype] *
> drivers/misc/cxl/guest.c:446:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned int const volatile [noderef] [usertype] __iomem *addr @@ got unsigned int * @@
> drivers/misc/cxl/guest.c:446:33: sparse: expected unsigned int const volatile [noderef] [usertype] __iomem *addr
> drivers/misc/cxl/guest.c:446:33: sparse: got unsigned int *
> drivers/misc/cxl/guest.c:449:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long const volatile [noderef] [usertype] __iomem *addr @@ got unsigned long long [usertype] * @@
> drivers/misc/cxl/guest.c:449:33: sparse: expected unsigned long long const volatile [noderef] [usertype] __iomem *addr
> drivers/misc/cxl/guest.c:449:33: sparse: got unsigned long long [usertype] *
> drivers/misc/cxl/guest.c:537:23: sparse: sparse: invalid assignment: |=
> drivers/misc/cxl/guest.c:537:23: sparse: left side has type restricted __be64
> drivers/misc/cxl/guest.c:537:23: sparse: right side has type unsigned long long
> drivers/misc/cxl/guest.c:538:23: sparse: sparse: invalid assignment: |=
> drivers/misc/cxl/guest.c:538:23: sparse: left side has type restricted __be64
> drivers/misc/cxl/guest.c:538:23: sparse: right side has type unsigned long long
> drivers/misc/cxl/guest.c:540:31: sparse: sparse: invalid assignment: |=
> drivers/misc/cxl/guest.c:540:31: sparse: left side has type restricted __be64
> drivers/misc/cxl/guest.c:540:31: sparse: right side has type unsigned long long
> drivers/misc/cxl/guest.c:543:23: sparse: sparse: invalid assignment: |=
> drivers/misc/cxl/guest.c:543:23: sparse: left side has type restricted __be64
> drivers/misc/cxl/guest.c:543:23: sparse: right side has type unsigned long long
> drivers/misc/cxl/guest.c:544:23: sparse: sparse: invalid assignment: |=
> drivers/misc/cxl/guest.c:544:23: sparse: left side has type restricted __be64
> drivers/misc/cxl/guest.c:544:23: sparse: right side has type unsigned long long
> drivers/misc/cxl/guest.c:546:31: sparse: sparse: invalid assignment: |=
> drivers/misc/cxl/guest.c:546:31: sparse: left side has type restricted __be64
> drivers/misc/cxl/guest.c:546:31: sparse: right side has type unsigned long long
> drivers/misc/cxl/guest.c:549:31: sparse: sparse: invalid assignment: |=
> drivers/misc/cxl/guest.c:549:31: sparse: left side has type restricted __be64
> drivers/misc/cxl/guest.c:549:31: sparse: right side has type unsigned long long
> drivers/misc/cxl/guest.c:552:31: sparse: sparse: cast from restricted __be64
> --
> >> drivers/misc/cxl/pci.c:1816:29: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct pci_error_handlers *err_handler @@ got struct pci_error_handlers const *err_handler @@
> drivers/misc/cxl/pci.c:1816:29: sparse: expected struct pci_error_handlers *err_handler
> drivers/misc/cxl/pci.c:1816:29: sparse: got struct pci_error_handlers const *err_handler
> drivers/misc/cxl/pci.c:2041:37: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct pci_error_handlers *err_handler @@ got struct pci_error_handlers const *err_handler @@
> drivers/misc/cxl/pci.c:2041:37: sparse: expected struct pci_error_handlers *err_handler
> drivers/misc/cxl/pci.c:2041:37: sparse: got struct pci_error_handlers const *err_handler
> drivers/misc/cxl/pci.c:2090:37: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct pci_error_handlers *err_handler @@ got struct pci_error_handlers const *err_handler @@
> drivers/misc/cxl/pci.c:2090:37: sparse: expected struct pci_error_handlers *err_handler
> drivers/misc/cxl/pci.c:2090:37: sparse: got struct pci_error_handlers const *err_handler
>
> vim +34 drivers/misc/cxl/guest.c
>
> 17
> 18 static void pci_error_handlers(struct cxl_afu *afu,
> 19 int bus_error_event,
> 20 pci_channel_state_t state)
> 21 {
> 22 struct pci_dev *afu_dev;
> 23 struct pci_driver *afu_drv;
> 24 struct pci_error_handlers *err_handler;
> 25
> 26 if (afu->phb == NULL)
> 27 return;
> 28
> 29 list_for_each_entry(afu_dev, &afu->phb->bus->devices, bus_list) {
> 30 afu_drv = afu_dev->driver;
> 31 if (!afu_drv)
> 32 continue;
> 33
> > 34 err_handler = afu_drv->err_handler;
> 35 switch (bus_error_event) {
> 36 case CXL_ERROR_DETECTED_EVENT:
> 37 afu_dev->error_state = state;
> 38
> 39 if (err_handler &&
> 40 err_handler->error_detected)
> 41 err_handler->error_detected(afu_dev, state);
> 42 break;
> 43 case CXL_SLOT_RESET_EVENT:
> 44 afu_dev->error_state = state;
> 45
> 46 if (err_handler &&
> 47 err_handler->slot_reset)
> 48 err_handler->slot_reset(afu_dev);
> 49 break;
> 50 case CXL_RESUME_EVENT:
> 51 if (err_handler &&
> 52 err_handler->resume)
> 53 err_handler->resume(afu_dev);
> 54 break;
> 55 }
> 56 }
> 57 }
> 58
Krzysztof
next prev parent reply other threads:[~2021-11-12 13:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 10:43 [helgaas-pci:pci/driver 17/24] drivers/misc/cxl/guest.c:34:29: sparse: sparse: incorrect type in assignment (different modifiers) kernel test robot
2021-11-12 13:44 ` Krzysztof Wilczyński [this message]
2021-11-12 15:50 ` Dan Williams
2021-11-12 18:29 ` Krzysztof Wilczyński
2021-11-17 7:29 ` Frederic Barrat
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=YY5v0wzW192k1fG+@rocinante \
--to=kw@linux.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=ajd@linux.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=fbarrat@linux.ibm.com \
--cc=helgaas@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-pci@vger.kernel.org \
--cc=lkp@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox