linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/10] exynos4-is: Replace "hweight32(mask) == 1" with "is_power_of_2(mask)"
@ 2015-12-06 10:44 Zhaoxiu Zeng
  2016-03-11 16:28 ` Sylwester Nawrocki
  0 siblings, 1 reply; 2+ messages in thread
From: Zhaoxiu Zeng @ 2015-12-06 10:44 UTC (permalink / raw)
  To: kyungmin.park, s.nawrocki, mchehab, kgene, k.kozlowski,
	linux-media, linux-arm-kernel, linux-samsung-soc
  Cc: linux-kernel, Zeng Zhaoxiu

From: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>

Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
---
 drivers/media/platform/exynos4-is/fimc-is-regs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/exynos4-is/fimc-is-regs.c b/drivers/media/platform/exynos4-is/fimc-is-regs.c
index cfe4406..ec75a24 100644
--- a/drivers/media/platform/exynos4-is/fimc-is-regs.c
+++ b/drivers/media/platform/exynos4-is/fimc-is-regs.c
@@ -11,6 +11,7 @@
  * published by the Free Software Foundation.
  */
 #include <linux/delay.h>
+#include <linux/log2.h>
 
 #include "fimc-is.h"
 #include "fimc-is-command.h"
@@ -107,7 +108,7 @@ int fimc_is_hw_get_params(struct fimc_is *is, unsigned int num_args)
 
 void fimc_is_hw_set_isp_buf_mask(struct fimc_is *is, unsigned int mask)
 {
-	if (hweight32(mask) == 1) {
+	if (is_power_of_2(mask)) {
 		dev_err(&is->pdev->dev, "%s(): not enough buffers (mask %#x)\n",
 							__func__, mask);
 		return;
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 05/10] exynos4-is: Replace "hweight32(mask) == 1" with "is_power_of_2(mask)"
  2015-12-06 10:44 [PATCH 05/10] exynos4-is: Replace "hweight32(mask) == 1" with "is_power_of_2(mask)" Zhaoxiu Zeng
@ 2016-03-11 16:28 ` Sylwester Nawrocki
  0 siblings, 0 replies; 2+ messages in thread
From: Sylwester Nawrocki @ 2016-03-11 16:28 UTC (permalink / raw)
  To: Zhaoxiu Zeng
  Cc: kyungmin.park, mchehab, kgene, k.kozlowski, linux-media,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

On 12/06/2015 11:44 AM, Zhaoxiu Zeng wrote:
> From: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>

The patch looks OK, but could you also provide a proper commit
message?

> Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
> ---
>  drivers/media/platform/exynos4-is/fimc-is-regs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/exynos4-is/fimc-is-regs.c b/drivers/media/platform/exynos4-is/fimc-is-regs.c
> index cfe4406..ec75a24 100644
> --- a/drivers/media/platform/exynos4-is/fimc-is-regs.c
> +++ b/drivers/media/platform/exynos4-is/fimc-is-regs.c
> @@ -11,6 +11,7 @@
>   * published by the Free Software Foundation.
>   */
>  #include <linux/delay.h>
> +#include <linux/log2.h>
>  
>  #include "fimc-is.h"
>  #include "fimc-is-command.h"
> @@ -107,7 +108,7 @@ int fimc_is_hw_get_params(struct fimc_is *is, unsigned int num_args)
>  
>  void fimc_is_hw_set_isp_buf_mask(struct fimc_is *is, unsigned int mask)
>  {
> -	if (hweight32(mask) == 1) {
> +	if (is_power_of_2(mask)) {
>  		dev_err(&is->pdev->dev, "%s(): not enough buffers (mask %#x)\n",
>  							__func__, mask);
>  		return;

-- 
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-11 16:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-06 10:44 [PATCH 05/10] exynos4-is: Replace "hweight32(mask) == 1" with "is_power_of_2(mask)" Zhaoxiu Zeng
2016-03-11 16:28 ` Sylwester Nawrocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).