linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [helgaas-pci:pci/driver 17/24] drivers/misc/cxl/pci.c:1816:29: error: assignment discards 'const' qualifier from pointer target type
@ 2021-11-12  1:33 kernel test robot
  2021-11-12  1:42 ` Krzysztof Wilczyński
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-11-12  1:33 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: kbuild-all, linux-pci

[-- Attachment #1: Type: text/plain, Size: 3903 bytes --]

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-allnoconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # 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 ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/misc/cxl/pci.c: In function 'cxl_vphb_error_detected':
>> drivers/misc/cxl/pci.c:1816:29: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
    1816 |                 err_handler = afu_drv->err_handler;
         |                             ^
   drivers/misc/cxl/pci.c: In function 'cxl_pci_slot_reset':
   drivers/misc/cxl/pci.c:2041:37: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
    2041 |                         err_handler = afu_drv->err_handler;
         |                                     ^
   drivers/misc/cxl/pci.c: In function 'cxl_pci_resume':
   drivers/misc/cxl/pci.c:2090:37: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
    2090 |                         err_handler = afu_drv->err_handler;
         |                                     ^
   cc1: all warnings being treated as errors
--
   drivers/misc/cxl/guest.c: In function 'pci_error_handlers':
>> drivers/misc/cxl/guest.c:34:29: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
      34 |                 err_handler = afu_drv->err_handler;
         |                             ^
   cc1: all warnings being treated as errors


vim +/const +1816 drivers/misc/cxl/pci.c

  1793	
  1794	static pci_ers_result_t cxl_vphb_error_detected(struct cxl_afu *afu,
  1795							pci_channel_state_t state)
  1796	{
  1797		struct pci_dev *afu_dev;
  1798		struct pci_driver *afu_drv;
  1799		struct pci_error_handlers *err_handler;
  1800		pci_ers_result_t result = PCI_ERS_RESULT_NEED_RESET;
  1801		pci_ers_result_t afu_result = PCI_ERS_RESULT_NEED_RESET;
  1802	
  1803		/* There should only be one entry, but go through the list
  1804		 * anyway
  1805		 */
  1806		if (afu == NULL || afu->phb == NULL)
  1807			return result;
  1808	
  1809		list_for_each_entry(afu_dev, &afu->phb->bus->devices, bus_list) {
  1810			afu_drv = afu_dev->driver;
  1811			if (!afu_drv)
  1812				continue;
  1813	
  1814			afu_dev->error_state = state;
  1815	
> 1816			err_handler = afu_drv->err_handler;
  1817			if (err_handler)
  1818				afu_result = err_handler->error_detected(afu_dev,
  1819									 state);
  1820			/* Disconnect trumps all, NONE trumps NEED_RESET */
  1821			if (afu_result == PCI_ERS_RESULT_DISCONNECT)
  1822				result = PCI_ERS_RESULT_DISCONNECT;
  1823			else if ((afu_result == PCI_ERS_RESULT_NONE) &&
  1824				 (result == PCI_ERS_RESULT_NEED_RESET))
  1825				result = PCI_ERS_RESULT_NONE;
  1826		}
  1827		return result;
  1828	}
  1829	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 9083 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [helgaas-pci:pci/driver 17/24] drivers/misc/cxl/pci.c:1816:29: error: assignment discards 'const' qualifier from pointer target type
  2021-11-12  1:33 [helgaas-pci:pci/driver 17/24] drivers/misc/cxl/pci.c:1816:29: error: assignment discards 'const' qualifier from pointer target type kernel test robot
@ 2021-11-12  1:42 ` Krzysztof Wilczyński
  2021-11-18  1:33   ` Andrew Donnellan
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Wilczyński @ 2021-11-12  1:42 UTC (permalink / raw)
  To: kernel test robot
  Cc: Bjorn Helgaas, kbuild-all, linux-pci, Jonathan Cameron,
	Dan Williams, Frederic Barrat, Andrew Donnellan

[+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-allnoconfig (attached as .config)
> compiler: powerpc64-linux-gcc (GCC) 11.2.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # 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 ARCH=powerpc 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/misc/cxl/pci.c: In function 'cxl_vphb_error_detected':
> >> drivers/misc/cxl/pci.c:1816:29: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>     1816 |                 err_handler = afu_drv->err_handler;
>          |                             ^
>    drivers/misc/cxl/pci.c: In function 'cxl_pci_slot_reset':
>    drivers/misc/cxl/pci.c:2041:37: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>     2041 |                         err_handler = afu_drv->err_handler;
>          |                                     ^
>    drivers/misc/cxl/pci.c: In function 'cxl_pci_resume':
>    drivers/misc/cxl/pci.c:2090:37: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>     2090 |                         err_handler = afu_drv->err_handler;
>          |                                     ^
>    cc1: all warnings being treated as errors
> --
>    drivers/misc/cxl/guest.c: In function 'pci_error_handlers':
> >> drivers/misc/cxl/guest.c:34:29: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>       34 |                 err_handler = afu_drv->err_handler;
>          |                             ^
>    cc1: all warnings being treated as errors
> 
> 
> vim +/const +1816 drivers/misc/cxl/pci.c
> 
>   1793	
>   1794	static pci_ers_result_t cxl_vphb_error_detected(struct cxl_afu *afu,
>   1795							pci_channel_state_t state)
>   1796	{
>   1797		struct pci_dev *afu_dev;
>   1798		struct pci_driver *afu_drv;
>   1799		struct pci_error_handlers *err_handler;
>   1800		pci_ers_result_t result = PCI_ERS_RESULT_NEED_RESET;
>   1801		pci_ers_result_t afu_result = PCI_ERS_RESULT_NEED_RESET;
>   1802	
>   1803		/* There should only be one entry, but go through the list
>   1804		 * anyway
>   1805		 */
>   1806		if (afu == NULL || afu->phb == NULL)
>   1807			return result;
>   1808	
>   1809		list_for_each_entry(afu_dev, &afu->phb->bus->devices, bus_list) {
>   1810			afu_drv = afu_dev->driver;
>   1811			if (!afu_drv)
>   1812				continue;
>   1813	
>   1814			afu_dev->error_state = state;
>   1815	
> > 1816			err_handler = afu_drv->err_handler;
>   1817			if (err_handler)
>   1818				afu_result = err_handler->error_detected(afu_dev,
>   1819									 state);
>   1820			/* Disconnect trumps all, NONE trumps NEED_RESET */
>   1821			if (afu_result == PCI_ERS_RESULT_DISCONNECT)
>   1822				result = PCI_ERS_RESULT_DISCONNECT;
>   1823			else if ((afu_result == PCI_ERS_RESULT_NONE) &&
>   1824				 (result == PCI_ERS_RESULT_NEED_RESET))
>   1825				result = PCI_ERS_RESULT_NONE;
>   1826		}
>   1827		return result;
>   1828	}
>   1829	

	Krzysztof

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [helgaas-pci:pci/driver 17/24] drivers/misc/cxl/pci.c:1816:29: error: assignment discards 'const' qualifier from pointer target type
  2021-11-12  1:42 ` Krzysztof Wilczyński
@ 2021-11-18  1:33   ` Andrew Donnellan
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Donnellan @ 2021-11-18  1:33 UTC (permalink / raw)
  To: Krzysztof Wilczyński, kernel test robot
  Cc: Bjorn Helgaas, kbuild-all, linux-pci, Jonathan Cameron,
	Dan Williams, Frederic Barrat

On 12/11/21 12:42 pm, Krzysztof Wilczyński wrote:
> [+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-allnoconfig (attached as .config)

I think this issue has already been fixed, but I'm curious how 
CONFIG_CXL ended up being y in a supposed allnoconfig...


Andrew


-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd@linux.ibm.com             IBM Australia Limited

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-18  1:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12  1:33 [helgaas-pci:pci/driver 17/24] drivers/misc/cxl/pci.c:1816:29: error: assignment discards 'const' qualifier from pointer target type kernel test robot
2021-11-12  1:42 ` Krzysztof Wilczyński
2021-11-18  1:33   ` Andrew Donnellan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).