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 v4 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value
Date: Fri, 02 Apr 2021 20:43:52 +0800	[thread overview]
Message-ID: <202104022020.ffuWRhVl-lkp@intel.com> (raw)
In-Reply-To: <00d085d4068be651c58a61564926d4f3d495ab80.1617357235.git.syednwaris@gmail.com>

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

Hi Syed,

I love your patch! Perhaps something to improve:

[auto build test WARNING on e1b7033ecdac56c1cc4dff72d67cac25d449efc6]

url:    https://github.com/0day-ci/linux/commits/Syed-Nayyar-Waris/Introduce-the-for_each_set_nbits-macro/20210402-181418
base:   e1b7033ecdac56c1cc4dff72d67cac25d449efc6
config: i386-randconfig-m021-20210401 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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:166 xgpio_set_multiple() warn: inconsistent indenting

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

   150	
   151	/**
   152	 * xgpio_set_multiple - Write the specified signals of the GPIO device.
   153	 * @gc:     Pointer to gpio_chip device structure.
   154	 * @mask:   Mask of the GPIOS to modify.
   155	 * @bits:   Value to be wrote on each GPIO
   156	 *
   157	 * This function writes the specified values into the specified signals of the
   158	 * GPIO devices.
   159	 */
   160	static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
   161				       unsigned long *bits)
   162	{
   163		unsigned long flags;
   164		struct xgpio_instance *chip = gpiochip_get_data(gc);
   165	
 > 166	    u32 *state = chip->gpio_state;
   167	    unsigned int *width = chip->gpio_width;
   168	    DECLARE_BITMAP(old, 64);
   169	    DECLARE_BITMAP(new, 64);
   170	    DECLARE_BITMAP(changed, 64);
   171	
   172	    spin_lock_irqsave(&chip->gpio_lock, flags);
   173	
   174	    /* Copy initial value of state bits into 'old' bit-wise */
   175	    bitmap_set_value(old, 64, state[0], width[0], 0);
   176	    bitmap_set_value(old, 64, state[1], width[1], width[0]);
   177	    /* Copy value from 'old' into 'new' with mask applied */
   178	    bitmap_replace(new, old, bits, mask, gc->ngpio);
   179	
   180	    bitmap_from_arr32(old, state, 64);
   181	    /* Update 'state' */
   182	    state[0] = bitmap_get_value(new, 0, width[0]);
   183	    state[1] = bitmap_get_value(new, width[0], width[1]);
   184	    bitmap_from_arr32(new, state, 64);
   185	    /* XOR operation sets only changed bits */
   186	    bitmap_xor(changed, old, new, 64);
   187	
   188	    if (((u32 *)changed)[0])
   189	        xgpio_writereg(chip->regs + XGPIO_DATA_OFFSET, state[0]);
   190	    if (((u32 *)changed)[1])
   191	        xgpio_writereg(chip->regs + XGPIO_DATA_OFFSET +
   192	                XGPIO_CHANNEL_OFFSET, state[1]);
   193	
   194	    spin_unlock_irqrestore(&chip->gpio_lock, flags);
   195	}
   196	

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

  reply	other threads:[~2021-04-02 12:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 10:10 [PATCH v4 0/3] Introduce the for_each_set_nbits macro Syed Nayyar Waris
2021-04-02 10:10 ` Syed Nayyar Waris
2021-04-02 10:11 ` [PATCH v4 1/3] gpiolib: " Syed Nayyar Waris
2021-04-02 10:11   ` Syed Nayyar Waris
2021-04-02 10:12 ` [PATCH v4 2/3] gpio: thunderx: Utilize " Syed Nayyar Waris
2021-04-02 10:12   ` Syed Nayyar Waris
2021-04-02 10:12 ` [PATCH v4 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value Syed Nayyar Waris
2021-04-02 10:12   ` Syed Nayyar Waris
2021-04-02 12:43   ` kernel test robot [this message]
2021-04-02 16:34   ` Syed Nayyar Waris
2021-04-02 16:34     ` Syed Nayyar Waris

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=202104022020.ffuWRhVl-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.