linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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/pci.c:1816:29: error: assignment discards 'const' qualifier from pointer target type
Date: Fri, 12 Nov 2021 02:42:06 +0100	[thread overview]
Message-ID: <YY3GbjLsnkUc/zhG@rocinante> (raw)
In-Reply-To: <202111120955.M4Pkd0T4-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-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

  reply	other threads:[~2021-11-12  1:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-11-18  1:33   ` Andrew Donnellan

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=YY3GbjLsnkUc/zhG@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;
as well as URLs for NNTP newsgroup(s).