From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Syed Nayyar Waris <syednwaris@gmail.com>
Cc: akpm@linux-foundation.org, vilhelm.gray@gmail.com,
linus.walleij@linaro.org, bgolaszewski@baylibre.com,
michal.simek@xilinx.com, linux-gpio@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/4] gpio: xilinx: Utilize for_each_set_clump macro
Date: Wed, 29 Apr 2020 13:21:14 +0300 [thread overview]
Message-ID: <20200429102114.GF185537@smile.fi.intel.com> (raw)
In-Reply-To: <80745504d15c87aa1da0d4be3c16d1279f48615b.1588112716.git.syednwaris@gmail.com>
On Wed, Apr 29, 2020 at 04:39:47AM +0530, Syed Nayyar Waris wrote:
> This patch reimplements the xgpio_set_multiple function in
> drivers/gpio/gpio-xilinx.c to use the new for_each_set_clump macro.
> Instead of looping for each bit in xgpio_set_multiple
> function, now we can check each channel at a time and save cycles.
> + const unsigned long state_size = BITS_PER_TYPE(*state);
This '*state' is unneeded complication, use BITS_PER_U32.
> +#define TOTAL_BITS BITS_PER_TYPE(chip->gpio_state)
This macro makes code uglier, besides the fact of absence of #undef.
And also see above.
> + DECLARE_BITMAP(old, TOTAL_BITS);
> + DECLARE_BITMAP(new, TOTAL_BITS);
> + DECLARE_BITMAP(changed, TOTAL_BITS);
--
With Best Regards,
Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Syed Nayyar Waris <syednwaris@gmail.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linus.walleij@linaro.org, vilhelm.gray@gmail.com,
michal.simek@xilinx.com, bgolaszewski@baylibre.com,
akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 4/4] gpio: xilinx: Utilize for_each_set_clump macro
Date: Wed, 29 Apr 2020 13:21:14 +0300 [thread overview]
Message-ID: <20200429102114.GF185537@smile.fi.intel.com> (raw)
In-Reply-To: <80745504d15c87aa1da0d4be3c16d1279f48615b.1588112716.git.syednwaris@gmail.com>
On Wed, Apr 29, 2020 at 04:39:47AM +0530, Syed Nayyar Waris wrote:
> This patch reimplements the xgpio_set_multiple function in
> drivers/gpio/gpio-xilinx.c to use the new for_each_set_clump macro.
> Instead of looping for each bit in xgpio_set_multiple
> function, now we can check each channel at a time and save cycles.
> + const unsigned long state_size = BITS_PER_TYPE(*state);
This '*state' is unneeded complication, use BITS_PER_U32.
> +#define TOTAL_BITS BITS_PER_TYPE(chip->gpio_state)
This macro makes code uglier, besides the fact of absence of #undef.
And also see above.
> + DECLARE_BITMAP(old, TOTAL_BITS);
> + DECLARE_BITMAP(new, TOTAL_BITS);
> + DECLARE_BITMAP(changed, TOTAL_BITS);
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-29 10:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 23:03 [PATCH v3 0/4] Introduce the for_each_set_clump macro Syed Nayyar Waris
2020-04-28 23:03 ` Syed Nayyar Waris
2020-04-28 23:04 ` [PATCH v3 1/4] bitops: Introduce the " Syed Nayyar Waris
2020-04-28 23:05 ` [PATCH v3 2/4] lib/test_bitmap.c: Add for_each_set_clump test cases Syed Nayyar Waris
2020-04-29 10:16 ` Andy Shevchenko
2020-04-28 23:07 ` [PATCH v3 3/4] gpio: thunderx: Utilize for_each_set_clump macro Syed Nayyar Waris
2020-04-29 10:17 ` Andy Shevchenko
2020-04-30 16:22 ` Syed Nayyar Waris
2020-04-28 23:09 ` [PATCH v3 4/4] gpio: xilinx: " Syed Nayyar Waris
2020-04-28 23:09 ` Syed Nayyar Waris
2020-04-29 10:21 ` Andy Shevchenko [this message]
2020-04-29 10:21 ` Andy Shevchenko
2020-04-30 16:15 ` Syed Nayyar Waris
2020-04-30 16:15 ` Syed Nayyar Waris
2020-04-30 16:38 ` Andy Shevchenko
2020-04-30 16:38 ` Andy Shevchenko
2020-04-30 23:32 ` William Breathitt Gray
2020-04-30 23:32 ` William Breathitt Gray
2020-05-01 13:32 ` Andy Shevchenko
2020-05-01 13:32 ` Andy Shevchenko
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=20200429102114.GF185537@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=syednwaris@gmail.com \
--cc=vilhelm.gray@gmail.com \
/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.