All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/2] pinctrl: pinctrl-single: remove unused parameter
Date: Tue, 16 Mar 2021 04:39:09 +0800	[thread overview]
Message-ID: <202103160456.LIWE37b6-lkp@intel.com> (raw)
In-Reply-To: <20210315145944.20412-2-hhhawa@amazon.com>

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

Hi Hanna,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pinctrl/devel]
[also build test WARNING on v5.12-rc3 next-20210315]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Hanna-Hawa/Fix-pinctrl-single-pcs_pin_dbg_show/20210315-230418
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: ia64-randconfig-r011-20210315 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/518757b3bf7378b1c46be74640d0754e47e83624
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Hanna-Hawa/Fix-pinctrl-single-pcs_pin_dbg_show/20210315-230418
        git checkout 518757b3bf7378b1c46be74640d0754e47e83624
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

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

All warnings (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/pgtable.h:154,
                    from include/linux/pgtable.h:6,
                    from arch/ia64/include/asm/uaccess.h:40,
                    from include/linux/uaccess.h:11,
                    from arch/ia64/include/asm/sections.h:11,
                    from include/linux/interrupt.h:20,
                    from drivers/pinctrl/pinctrl-single.c:18:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |  unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                         ^~~~~~~
   drivers/pinctrl/pinctrl-single.c: In function 'pcs_allocate_pin_table':
>> drivers/pinctrl/pinctrl-single.c:704:6: warning: variable 'num_pins_in_register' set but not used [-Wunused-but-set-variable]
     704 |  int num_pins_in_register = 0;
         |      ^~~~~~~~~~~~~~~~~~~~


vim +/num_pins_in_register +704 drivers/pinctrl/pinctrl-single.c

8b8b091bf07fa7 Tony Lindgren          2012-07-10  691  
8b8b091bf07fa7 Tony Lindgren          2012-07-10  692  /**
8b8b091bf07fa7 Tony Lindgren          2012-07-10  693   * pcs_allocate_pin_table() - adds all the pins for the pinctrl driver
8b8b091bf07fa7 Tony Lindgren          2012-07-10  694   * @pcs: pcs driver instance
8b8b091bf07fa7 Tony Lindgren          2012-07-10  695   *
8b8b091bf07fa7 Tony Lindgren          2012-07-10  696   * In case of errors, resources are freed in pcs_free_resources.
8b8b091bf07fa7 Tony Lindgren          2012-07-10  697   *
8b8b091bf07fa7 Tony Lindgren          2012-07-10  698   * If your hardware needs holes in the address space, then just set
8b8b091bf07fa7 Tony Lindgren          2012-07-10  699   * up multiple driver instances.
8b8b091bf07fa7 Tony Lindgren          2012-07-10  700   */
150632b09aadf1 Greg Kroah-Hartman     2012-12-21  701  static int pcs_allocate_pin_table(struct pcs_device *pcs)
8b8b091bf07fa7 Tony Lindgren          2012-07-10  702  {
8b8b091bf07fa7 Tony Lindgren          2012-07-10  703  	int mux_bytes, nr_pins, i;
6f924b0b7cbe2a Manjunathappa, Prakash 2013-05-21 @704  	int num_pins_in_register = 0;
8b8b091bf07fa7 Tony Lindgren          2012-07-10  705  
8b8b091bf07fa7 Tony Lindgren          2012-07-10  706  	mux_bytes = pcs->width / BITS_PER_BYTE;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  707  
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  708  	if (pcs->bits_per_mux) {
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  709  		pcs->bits_per_pin = fls(pcs->fmask);
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  710  		nr_pins = (pcs->size * BITS_PER_BYTE) / pcs->bits_per_pin;
6f924b0b7cbe2a Manjunathappa, Prakash 2013-05-21  711  		num_pins_in_register = pcs->width / pcs->bits_per_pin;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  712  	} else {
8b8b091bf07fa7 Tony Lindgren          2012-07-10  713  		nr_pins = pcs->size / mux_bytes;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  714  	}
8b8b091bf07fa7 Tony Lindgren          2012-07-10  715  
8b8b091bf07fa7 Tony Lindgren          2012-07-10  716  	dev_dbg(pcs->dev, "allocating %i pins\n", nr_pins);
a86854d0c599b3 Kees Cook              2018-06-12  717  	pcs->pins.pa = devm_kcalloc(pcs->dev,
a86854d0c599b3 Kees Cook              2018-06-12  718  				nr_pins, sizeof(*pcs->pins.pa),
8b8b091bf07fa7 Tony Lindgren          2012-07-10  719  				GFP_KERNEL);
8b8b091bf07fa7 Tony Lindgren          2012-07-10  720  	if (!pcs->pins.pa)
8b8b091bf07fa7 Tony Lindgren          2012-07-10  721  		return -ENOMEM;
8b8b091bf07fa7 Tony Lindgren          2012-07-10  722  
8b8b091bf07fa7 Tony Lindgren          2012-07-10  723  	pcs->desc.pins = pcs->pins.pa;
8b8b091bf07fa7 Tony Lindgren          2012-07-10  724  	pcs->desc.npins = nr_pins;
8b8b091bf07fa7 Tony Lindgren          2012-07-10  725  
8b8b091bf07fa7 Tony Lindgren          2012-07-10  726  	for (i = 0; i < pcs->desc.npins; i++) {
8b8b091bf07fa7 Tony Lindgren          2012-07-10  727  		unsigned offset;
8b8b091bf07fa7 Tony Lindgren          2012-07-10  728  		int res;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  729  		int byte_num;
8b8b091bf07fa7 Tony Lindgren          2012-07-10  730  
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  731  		if (pcs->bits_per_mux) {
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  732  			byte_num = (pcs->bits_per_pin * i) / BITS_PER_BYTE;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  733  			offset = (byte_num / mux_bytes) * mux_bytes;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  734  		} else {
8b8b091bf07fa7 Tony Lindgren          2012-07-10  735  			offset = i * mux_bytes;
4e7e8017a80e18 Manjunathappa, Prakash 2013-05-21  736  		}
518757b3bf7378 Hanna Hawa             2021-03-15  737  		res = pcs_add_pin(pcs, offset);
8b8b091bf07fa7 Tony Lindgren          2012-07-10  738  		if (res < 0) {
8b8b091bf07fa7 Tony Lindgren          2012-07-10  739  			dev_err(pcs->dev, "error adding pins: %i\n", res);
8b8b091bf07fa7 Tony Lindgren          2012-07-10  740  			return res;
8b8b091bf07fa7 Tony Lindgren          2012-07-10  741  		}
8b8b091bf07fa7 Tony Lindgren          2012-07-10  742  	}
8b8b091bf07fa7 Tony Lindgren          2012-07-10  743  
8b8b091bf07fa7 Tony Lindgren          2012-07-10  744  	return 0;
8b8b091bf07fa7 Tony Lindgren          2012-07-10  745  }
8b8b091bf07fa7 Tony Lindgren          2012-07-10  746  

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

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

  reply	other threads:[~2021-03-15 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 14:59 [PATCH 0/2] Fix pinctrl-single pcs_pin_dbg_show() Hanna Hawa
2021-03-15 14:59 ` Hanna Hawa
2021-03-15 14:59 ` [PATCH 1/2] pinctrl: pinctrl-single: remove unused parameter Hanna Hawa
2021-03-15 14:59   ` Hanna Hawa
2021-03-15 20:39   ` kernel test robot [this message]
2021-03-15 14:59 ` [PATCH 2/2] pinctrl: pinctrl-single: fix pcs_pin_dbg_show() when bits_per_mux != 0 Hanna Hawa
2021-03-15 14:59   ` Hanna Hawa

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=202103160456.LIWE37b6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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.