All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alex Elder <elder@riscstar.com>,
	bhelgaas@google.com, robh@kernel.org, saravanak@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, herve.codina@bootlin.com,
	daniel@riscstar.com, mohd.anwar@oss.qualcomm.com,
	lorenzo.bianconi@oss.qualcomm.com, linux-pci@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 4/4] PCI: of: introduce of_pci_verify_node()
Date: Tue, 8 Sep 2026 16:15:04 +0200	[thread overview]
Message-ID: <202609081616.N6meYz4f-lkp@intel.com> (raw)
In-Reply-To: <20260904134607.1856121-5-elder@riscstar.com>

Hi Alex,

kernel test robot noticed the following build errors:

[auto build test ERROR on cee9395acd8043be0644b25c34bfa86623f2b935]

url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Elder/PCI-of-avoid-allocations-in-of_pci_prop_compatible/20260904-084603
base:   cee9395acd8043be0644b25c34bfa86623f2b935
patch link:    https://lore.kernel.org/r/20260904134607.1856121-5-elder%40riscstar.com
patch subject: [PATCH v4 4/4] PCI: of: introduce of_pci_verify_node()
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20260908/202609081616.N6meYz4f-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260908/202609081616.N6meYz4f-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/202609081616.N6meYz4f-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/pci/of_property.c:335:7: error: incompatible pointer to integer conversion initializing 'char' with an expression of type 'char[48]' [-Wint-conversion]
     335 |         char bufp = buf;
         |              ^      ~~~
>> drivers/pci/of_property.c:338:17: error: incompatible integer to pointer conversion passing 'char' to parameter of type 'char *'; take the address with & [-Wint-conversion]
     338 |         ret = snprintf(bufp, PROP_SIZE, "pci%x,%x", pdev->vendor, pdev->device);
         |                        ^~~~
         |                        &
   include/linux/sprintf.h:13:35: note: passing argument to parameter 'buf' here
      13 | __printf(3, 4) int snprintf(char *buf, size_t size, const char *fmt, ...);
         |                                   ^
>> drivers/pci/of_property.c:341:41: error: incompatible integer to pointer conversion assigning to 'const char *' from 'char'; take the address with & [-Wint-conversion]
     341 |         compat_strs[PROP_COMPAT_PCI_VVVV_DDDD] = bufp;
         |                                                ^ ~~~~
         |                                                  &
   drivers/pci/of_property.c:344:17: error: incompatible integer to pointer conversion passing 'char' to parameter of type 'char *'; take the address with & [-Wint-conversion]
     344 |         ret = snprintf(bufp, PROP_SIZE, "pciclass,%06x", pdev->class);
         |                        ^~~~
         |                        &
   include/linux/sprintf.h:13:35: note: passing argument to parameter 'buf' here
      13 | __printf(3, 4) int snprintf(char *buf, size_t size, const char *fmt, ...);
         |                                   ^
   drivers/pci/of_property.c:347:43: error: incompatible integer to pointer conversion assigning to 'const char *' from 'char'; take the address with & [-Wint-conversion]
     347 |         compat_strs[PROP_COMPAT_PCICLASS_CCSSPP] = bufp;
         |                                                  ^ ~~~~
         |                                                    &
   drivers/pci/of_property.c:350:17: error: incompatible integer to pointer conversion passing 'char' to parameter of type 'char *'; take the address with & [-Wint-conversion]
     350 |         ret = snprintf(bufp, PROP_SIZE, "pciclass,%04x", pdev->class >> 8);
         |                        ^~~~
         |                        &
   include/linux/sprintf.h:13:35: note: passing argument to parameter 'buf' here
      13 | __printf(3, 4) int snprintf(char *buf, size_t size, const char *fmt, ...);
         |                                   ^
   drivers/pci/of_property.c:351:41: error: incompatible integer to pointer conversion assigning to 'const char *' from 'char'; take the address with & [-Wint-conversion]
     351 |         compat_strs[PROP_COMPAT_PCICLASS_CCSS] = bufp;
         |                                                ^ ~~~~
         |                                                  &
   drivers/pci/of_property.c:336:6: warning: unused variable 'i' [-Wunused-variable]
     336 |         int i, ret;
         |             ^
   1 warning and 7 errors generated.


vim +335 drivers/pci/of_property.c

   326	
   327	/* The three compatible property strings have max sizes 12+1, 15+1, and 13+1 */
   328	#define PROP_SIZE	16	/* Max size of each compatible string */
   329	static int of_pci_prop_compatible(struct pci_dev *pdev,
   330					  struct of_changeset *ocs,
   331					  struct device_node *np)
   332	{
   333		const char *compat_strs[PROP_COMPAT_NUM] = { 0 };
   334		char buf[PROP_COMPAT_NUM * PROP_SIZE] = { };
 > 335		char bufp = buf;
   336		int i, ret;
   337	
 > 338		ret = snprintf(bufp, PROP_SIZE, "pci%x,%x", pdev->vendor, pdev->device);
   339		if (ret >= PROP_SIZE)
   340			return -EINVAL;
 > 341		compat_strs[PROP_COMPAT_PCI_VVVV_DDDD] = bufp;
   342		bufp += ret + 1;
   343	
   344		ret = snprintf(bufp, PROP_SIZE, "pciclass,%06x", pdev->class);
   345		if (ret >= PROP_SIZE)
   346			return -EINVAL;
   347		compat_strs[PROP_COMPAT_PCICLASS_CCSSPP] = bufp;
   348		bufp += ret + 1;
   349	
   350		ret = snprintf(bufp, PROP_SIZE, "pciclass,%04x", pdev->class >> 8);
   351		compat_strs[PROP_COMPAT_PCICLASS_CCSS] = bufp;
   352	
   353		return of_changeset_add_prop_string_array(ocs, np, "compatible",
   354							  compat_strs, PROP_COMPAT_NUM);
   355	}
   356	#undef PROP_SIZE
   357	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2026-09-08 14:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 13:46 [PATCH v4 0/4] PCI: of: warn on bogus device_type property Alex Elder
2026-09-04 13:46 ` [PATCH v4 1/4] PCI: of: avoid allocations in of_pci_prop_compatible() Alex Elder
2026-09-04 13:59   ` sashiko-bot
2026-09-04 14:04     ` Alex Elder
2026-09-04 13:46 ` [PATCH v4 2/4] PCI: of: drop the reg_num argument to of_pci_set_address() Alex Elder
2026-09-04 14:03   ` sashiko-bot
2026-09-04 13:46 ` [PATCH v4 3/4] PCI: of: don't zero flags in of_pci_get_addr_flags() Alex Elder
2026-09-04 14:06   ` sashiko-bot
2026-09-04 13:46 ` [PATCH v4 4/4] PCI: of: introduce of_pci_verify_node() Alex Elder
2026-09-04 14:09   ` sashiko-bot
2026-09-08 10:40   ` kernel test robot
2026-09-08 14:15   ` kernel test robot [this message]

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=202609081616.N6meYz4f-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bhelgaas@google.com \
    --cc=daniel@riscstar.com \
    --cc=devicetree@vger.kernel.org \
    --cc=elder@riscstar.com \
    --cc=herve.codina@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.bianconi@oss.qualcomm.com \
    --cc=mohd.anwar@oss.qualcomm.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=saravanak@kernel.org \
    /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.