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 5/5] gpio: xilinx: Add extra check if sum of widths exceed 64
Date: Sat, 26 Dec 2020 16:31:20 +0800	[thread overview]
Message-ID: <202012261616.yIHktxsX-lkp@intel.com> (raw)
In-Reply-To: <fd642c0843d59a0091931fcf9baa19a9dbb6e2e7.1608963095.git.syednwaris@gmail.com>

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

Hi Syed,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bbe2ba04c5a92a49db8a42c850a5a2f6481e47eb]

url:    https://github.com/0day-ci/linux/commits/Syed-Nayyar-Waris/Introduce-the-for_each_set_clump-macro/20201226-144926
base:    bbe2ba04c5a92a49db8a42c850a5a2f6481e47eb
config: i386-randconfig-m021-20201226 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

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

smatch warnings:
drivers/gpio/gpio-xilinx.c:325 xgpio_probe() warn: inconsistent indenting

vim +325 drivers/gpio/gpio-xilinx.c

   259	
   260	/**
   261	 * xgpio_of_probe - Probe method for the GPIO device.
   262	 * @pdev: pointer to the platform device
   263	 *
   264	 * Return:
   265	 * It returns 0, if the driver is bound to the GPIO device, or
   266	 * a negative value if there is an error.
   267	 */
   268	static int xgpio_probe(struct platform_device *pdev)
   269	{
   270		struct xgpio_instance *chip;
   271		int status = 0;
   272		struct device_node *np = pdev->dev.of_node;
   273		u32 is_dual;
   274	
   275		chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
   276		if (!chip)
   277			return -ENOMEM;
   278	
   279		platform_set_drvdata(pdev, chip);
   280	
   281		/* Update GPIO state shadow register with default value */
   282		of_property_read_u32(np, "xlnx,dout-default", &chip->gpio_state[0]);
   283	
   284		/* Update GPIO direction shadow register with default value */
   285		if (of_property_read_u32(np, "xlnx,tri-default", &chip->gpio_dir[0]))
   286			chip->gpio_dir[0] = 0xFFFFFFFF;
   287	
   288		/*
   289		 * Check device node and parent device node for device width
   290		 * and assume default width of 32
   291		 */
   292		if (of_property_read_u32(np, "xlnx,gpio-width", &chip->gpio_width[0]))
   293			chip->gpio_width[0] = 32;
   294	
   295		spin_lock_init(&chip->gpio_lock[0]);
   296		spin_lock_init(&chip->gpio_lock[1]);
   297	
   298		if (of_property_read_u32(np, "xlnx,is-dual", &is_dual))
   299			is_dual = 0;
   300	
   301		if (is_dual) {
   302			/* Update GPIO state shadow register with default value */
   303			of_property_read_u32(np, "xlnx,dout-default-2",
   304					     &chip->gpio_state[1]);
   305	
   306			/* Update GPIO direction shadow register with default value */
   307			if (of_property_read_u32(np, "xlnx,tri-default-2",
   308						 &chip->gpio_dir[1]))
   309				chip->gpio_dir[1] = 0xFFFFFFFF;
   310	
   311			/*
   312			 * Check device node and parent device node for device width
   313			 * and assume default width of 32
   314			 */
   315			if (of_property_read_u32(np, "xlnx,gpio2-width",
   316						 &chip->gpio_width[1]))
   317				chip->gpio_width[1] = 32;
   318		}
   319	
   320		chip->gc.base = -1;
   321		chip->gc.ngpio = chip->gpio_width[0] + chip->gpio_width[1];
   322	
   323		if (chip->gc.ngpio > 64) {
   324			dev_err(&pdev->dev, "invalid configuration: number of GPIO is greater than 64");
 > 325				return -EINVAL;
   326		}
   327	
   328		chip->gc.parent = &pdev->dev;
   329		chip->gc.direction_input = xgpio_dir_in;
   330		chip->gc.direction_output = xgpio_dir_out;
   331		chip->gc.get = xgpio_get;
   332		chip->gc.set = xgpio_set;
   333		chip->gc.set_multiple = xgpio_set_multiple;
   334	
   335		chip->gc.label = dev_name(&pdev->dev);
   336	
   337		chip->regs = devm_platform_ioremap_resource(pdev, 0);
   338		if (IS_ERR(chip->regs)) {
   339			dev_err(&pdev->dev, "failed to ioremap memory resource\n");
   340			return PTR_ERR(chip->regs);
   341		}
   342	
   343		xgpio_save_regs(chip);
   344	
   345		status = devm_gpiochip_add_data(&pdev->dev, &chip->gc, chip);
   346		if (status) {
   347			dev_err(&pdev->dev, "failed to add GPIO chip\n");
   348			return status;
   349		}
   350	
   351		return 0;
   352	}
   353	

---
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: 37394 bytes --]

  reply	other threads:[~2020-12-26  8:31 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26  6:41 [PATCH 0/5] Introduce the for_each_set_clump macro Syed Nayyar Waris
2020-12-26  6:41 ` Syed Nayyar Waris
2020-12-26  6:42 ` [PATCH 1/5] clump_bits: " Syed Nayyar Waris
2020-12-26  6:42   ` Syed Nayyar Waris
2020-12-27 22:03   ` Arnd Bergmann
2020-12-27 22:03     ` Arnd Bergmann
2020-12-28 12:10     ` William Breathitt Gray
2020-12-28 12:10       ` William Breathitt Gray
2020-12-26  6:43 ` [PATCH 2/5] lib/test_bitmap.c: Add for_each_set_clump test cases Syed Nayyar Waris
2020-12-26  6:43   ` Syed Nayyar Waris
2020-12-26 14:43   ` kernel test robot
2020-12-26 14:48   ` kernel test robot
2020-12-26 15:03   ` kernel test robot
     [not found]   ` <CAHp75VcSsfDKY3w4ufZktXzRB=GiObAV6voPfmeAHcbdwX0uqg@mail.gmail.com>
2021-02-04  8:55     ` Syed Nayyar Waris
2021-02-04  8:55       ` Syed Nayyar Waris
2021-02-07  4:18       ` Syed Nayyar Waris
2021-02-07  4:18         ` Syed Nayyar Waris
2020-12-26  6:43 ` [PATCH 3/5] gpio: thunderx: Utilize for_each_set_clump macro Syed Nayyar Waris
2020-12-26  6:43   ` Syed Nayyar Waris
2020-12-26 16:26   ` kernel test robot
2020-12-26 20:18   ` kernel test robot
2020-12-26  6:44 ` [PATCH 4/5] gpio: xilinx: Utilize generic bitmap_get_value and _set_value Syed Nayyar Waris
2020-12-26  6:44   ` Syed Nayyar Waris
2020-12-27 21:29   ` Linus Walleij
2020-12-27 21:29     ` Linus Walleij
2021-01-05 11:04     ` Michal Simek
2021-01-05 11:04       ` Michal Simek
2020-12-29  0:50   ` kernel test robot
2020-12-29  0:50   ` kernel test robot
2020-12-26  6:45 ` [PATCH 5/5] gpio: xilinx: Add extra check if sum of widths exceed 64 Syed Nayyar Waris
2020-12-26  6:45   ` Syed Nayyar Waris
2020-12-26  8:31   ` kernel test robot [this message]
2020-12-28 11:58   ` William Breathitt Gray
2020-12-28 11:58     ` William Breathitt Gray
2021-01-05 11:01   ` Michal Simek
2021-01-05 11:01     ` Michal Simek
2020-12-27 21:26 ` [PATCH 0/5] Introduce the for_each_set_clump macro Linus Walleij
2020-12-27 21:26   ` Linus Walleij
2021-01-05 14:19   ` Bartosz Golaszewski
2021-01-05 14:19     ` Bartosz Golaszewski
2021-01-05 14:39     ` Andy Shevchenko
2021-01-05 14:39       ` Andy Shevchenko
2021-01-06  7:27       ` Bartosz Golaszewski
2021-01-06  7:27         ` Bartosz Golaszewski
2021-01-06  8:19         ` William Breathitt Gray
2021-01-06  8:19           ` William Breathitt Gray
2021-01-05 11:09 ` Michal Simek
2021-01-05 11:09   ` Michal Simek

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=202012261616.yIHktxsX-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.