public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: "Pali Rohár" <[email protected]>
Cc: [email protected], Ammar Faizi <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>,
	[email protected],
	Michael Ellerman <[email protected]>
Subject: [ammarfaizi2-block:powerpc/linux/next-test 154/166] arch/powerpc/kernel/pci-common.c:78:13: error: unused variable 'prop_32'
Date: Thu, 28 Jul 2022 02:19:46 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block powerpc/linux/next-test
head:   50be92bd65cb6a6a017f71c49bb2d5a05196c063
commit: 8ae2f1055cccee6fa4c646e2b0feb97e74a93cf8 [154/166] powerpc/pci: Prefer PCI domain assignment via DT 'linux,pci-domain' and alias
config: powerpc-randconfig-r035-20220727 (https://download.01.org/0day-ci/archive/20220728/[email protected]/config)
compiler: powerpc-linux-gcc (GCC) 12.1.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://github.com/ammarfaizi2/linux-block/commit/8ae2f1055cccee6fa4c646e2b0feb97e74a93cf8
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block powerpc/linux/next-test
        git checkout 8ae2f1055cccee6fa4c646e2b0feb97e74a93cf8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

   arch/powerpc/kernel/pci-common.c: In function 'get_phb_number':
>> arch/powerpc/kernel/pci-common.c:78:13: error: unused variable 'prop_32' [-Werror=unused-variable]
      78 |         u32 prop_32;
         |             ^~~~~~~
   cc1: all warnings being treated as errors


vim +/prop_32 +78 arch/powerpc/kernel/pci-common.c

4fc665b88a79a45 Becky Bruce          2008-09-12   70  
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   71  /*
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   72   * This function should run under locking protection, specifically
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   73   * hose_spinlock.
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   74   */
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   75  static int get_phb_number(struct device_node *dn)
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   76  {
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   77  	int ret, phb_id = -1;
61e8a0d5a0270b9 Michael Ellerman     2016-08-05  @78  	u32 prop_32;
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   79  	u64 prop;
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   80  
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   81  	/*
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   82  	 * Try fixed PHB numbering first, by checking archs and reading
8ae2f1055cccee6 Pali Rohár           2022-07-06   83  	 * the respective device-tree properties. Firstly, try reading
8ae2f1055cccee6 Pali Rohár           2022-07-06   84  	 * standard "linux,pci-domain", then try reading "ibm,opal-phbid"
8ae2f1055cccee6 Pali Rohár           2022-07-06   85  	 * (only present in powernv OPAL environment), then try device-tree
8ae2f1055cccee6 Pali Rohár           2022-07-06   86  	 * alias and as the last try to use lower bits of "reg" property.
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   87  	 */
8ae2f1055cccee6 Pali Rohár           2022-07-06   88  	ret = of_get_pci_domain_nr(dn);
8ae2f1055cccee6 Pali Rohár           2022-07-06   89  	if (ret >= 0) {
8ae2f1055cccee6 Pali Rohár           2022-07-06   90  		prop = ret;
8ae2f1055cccee6 Pali Rohár           2022-07-06   91  		ret = 0;
8ae2f1055cccee6 Pali Rohár           2022-07-06   92  	}
8ae2f1055cccee6 Pali Rohár           2022-07-06   93  	if (ret)
63a72284b159c56 Guilherme G. Piccoli 2016-06-29   94  		ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop);
8ae2f1055cccee6 Pali Rohár           2022-07-06   95  	if (ret)
8ae2f1055cccee6 Pali Rohár           2022-07-06   96  		ret = of_alias_get_id(dn, "pci");
8ae2f1055cccee6 Pali Rohár           2022-07-06   97  	if (ret >= 0) {
8ae2f1055cccee6 Pali Rohár           2022-07-06   98  		prop = ret;
8ae2f1055cccee6 Pali Rohár           2022-07-06   99  		ret = 0;
8ae2f1055cccee6 Pali Rohár           2022-07-06  100  	}
61e8a0d5a0270b9 Michael Ellerman     2016-08-05  101  	if (ret) {
8ae2f1055cccee6 Pali Rohár           2022-07-06  102  		u32 prop_32;
61e8a0d5a0270b9 Michael Ellerman     2016-08-05  103  		ret = of_property_read_u32_index(dn, "reg", 1, &prop_32);
61e8a0d5a0270b9 Michael Ellerman     2016-08-05  104  		prop = prop_32;
61e8a0d5a0270b9 Michael Ellerman     2016-08-05  105  	}
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  106  
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  107  	if (!ret)
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  108  		phb_id = (int)(prop & (MAX_PHBS - 1));
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  109  
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  110  	/* We need to be sure to not use the same PHB number twice. */
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  111  	if ((phb_id >= 0) && !test_and_set_bit(phb_id, phb_bitmap))
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  112  		return phb_id;
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  113  
8ae2f1055cccee6 Pali Rohár           2022-07-06  114  	/* If everything fails then fallback to dynamic PHB numbering. */
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  115  	phb_id = find_first_zero_bit(phb_bitmap, MAX_PHBS);
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  116  	BUG_ON(phb_id >= MAX_PHBS);
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  117  	set_bit(phb_id, phb_bitmap);
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  118  
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  119  	return phb_id;
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  120  }
63a72284b159c56 Guilherme G. Piccoli 2016-06-29  121  

:::::: The code at line 78 was first introduced by commit
:::::: 61e8a0d5a0270b91581f6c715036844b2ea98da1 powerpc/pci: Fix endian bug in fixed PHB numbering

:::::: TO: Michael Ellerman <[email protected]>
:::::: CC: Michael Ellerman <[email protected]>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-07-27 18:19 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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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