All of lore.kernel.org
 help / color / mirror / Atom feed
From: Syed Nayyar Waris <syednwaris@gmail.com>
To: akpm@linux-foundation.org
Cc: andriy.shevchenko@linux.intel.com, vilhelm.gray@gmail.com,
	bgolaszewski@baylibre.com, michal.simek@xilinx.com,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] gpio: xilinx: Modify bitmap_set_value() calls
Date: Fri, 20 Nov 2020 23:16:46 +0530	[thread overview]
Message-ID: <c509c26eb9903414bd730bdd344b7864aedaa6f1.1605893642.git.syednwaris@gmail.com> (raw)
In-Reply-To: <cover.1605893641.git.syednwaris@gmail.com>

Modify the bitmap_set_value() calls. bitmap_set_value()
now takes an extra bitmap width as second argument and the width of
value is now present as the fourth argument.

Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
---
 drivers/gpio/gpio-xilinx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index ad4ee4145db4..05dae086c4d0 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -151,16 +151,16 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
 	spin_lock_irqsave(&chip->gpio_lock[0], flags);
 	spin_lock(&chip->gpio_lock[1]);
 
-	bitmap_set_value(old, state[0], 0, width[0]);
-	bitmap_set_value(old, state[1], width[0], width[1]);
+	bitmap_set_value(old, 64, state[0], width[0], 0);
+	bitmap_set_value(old, 64, state[1], width[1], width[0]);
 	bitmap_replace(new, old, bits, mask, gc->ngpio);
 
-	bitmap_set_value(old, state[0], 0, 32);
-	bitmap_set_value(old, state[1], 32, 32);
+	bitmap_set_value(old, 64, state[0], 32, 0);
+	bitmap_set_value(old, 64, state[1], 32, 32);
 	state[0] = bitmap_get_value(new, 0, width[0]);
 	state[1] = bitmap_get_value(new, width[0], width[1]);
-	bitmap_set_value(new, state[0], 0, 32);
-	bitmap_set_value(new, state[1], 32, 32);
+	bitmap_set_value(new, 64, state[0], 32, 0);
+	bitmap_set_value(new, 64, state[1], 32, 32);
 	bitmap_xor(changed, old, new, 64);
 
 	if (((u32 *)changed)[0])
-- 
2.29.0


WARNING: multiple messages have this Message-ID (diff)
From: Syed Nayyar Waris <syednwaris@gmail.com>
To: akpm@linux-foundation.org
Cc: andriy.shevchenko@linux.intel.com, vilhelm.gray@gmail.com,
	michal.simek@xilinx.com, arnd@arndb.de, rrichter@marvell.com,
	linus.walleij@linaro.org, bgolaszewski@baylibre.com,
	yamada.masahiro@socionext.com, rui.zhang@intel.com,
	daniel.lezcano@linaro.org, amit.kucheria@verdurent.com,
	linux-arch@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org
Subject: [RESEND PATCH 3/4] gpio: xilinx: Modify bitmap_set_value() calls
Date: Sat, 21 Nov 2020 00:15:41 +0530	[thread overview]
Message-ID: <c509c26eb9903414bd730bdd344b7864aedaa6f1.1605893642.git.syednwaris@gmail.com> (raw)
Message-ID: <20201120184541.9VWSxoMPn7s1fROI34rtjvi8OimFHQi1T7qB08uWLVU@z> (raw)
In-Reply-To: <cover.1605893641.git.syednwaris@gmail.com>

Modify the bitmap_set_value() calls. bitmap_set_value()
now takes an extra bitmap width as second argument and the width of
value is now present as the fourth argument.

Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
---
 drivers/gpio/gpio-xilinx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index ad4ee4145db4..05dae086c4d0 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -151,16 +151,16 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
 	spin_lock_irqsave(&chip->gpio_lock[0], flags);
 	spin_lock(&chip->gpio_lock[1]);
 
-	bitmap_set_value(old, state[0], 0, width[0]);
-	bitmap_set_value(old, state[1], width[0], width[1]);
+	bitmap_set_value(old, 64, state[0], width[0], 0);
+	bitmap_set_value(old, 64, state[1], width[1], width[0]);
 	bitmap_replace(new, old, bits, mask, gc->ngpio);
 
-	bitmap_set_value(old, state[0], 0, 32);
-	bitmap_set_value(old, state[1], 32, 32);
+	bitmap_set_value(old, 64, state[0], 32, 0);
+	bitmap_set_value(old, 64, state[1], 32, 32);
 	state[0] = bitmap_get_value(new, 0, width[0]);
 	state[1] = bitmap_get_value(new, width[0], width[1]);
-	bitmap_set_value(new, state[0], 0, 32);
-	bitmap_set_value(new, state[1], 32, 32);
+	bitmap_set_value(new, 64, state[0], 32, 0);
+	bitmap_set_value(new, 64, state[1], 32, 32);
 	bitmap_xor(changed, old, new, 64);
 
 	if (((u32 *)changed)[0])
-- 
2.29.0


WARNING: multiple messages have this Message-ID (diff)
From: Syed Nayyar Waris <syednwaris@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	vilhelm.gray@gmail.com, michal.simek@xilinx.com,
	bgolaszewski@baylibre.com, andriy.shevchenko@linux.intel.com,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] gpio: xilinx: Modify bitmap_set_value() calls
Date: Fri, 20 Nov 2020 23:16:46 +0530	[thread overview]
Message-ID: <c509c26eb9903414bd730bdd344b7864aedaa6f1.1605893642.git.syednwaris@gmail.com> (raw)
In-Reply-To: <cover.1605893641.git.syednwaris@gmail.com>

Modify the bitmap_set_value() calls. bitmap_set_value()
now takes an extra bitmap width as second argument and the width of
value is now present as the fourth argument.

Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
---
 drivers/gpio/gpio-xilinx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index ad4ee4145db4..05dae086c4d0 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -151,16 +151,16 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
 	spin_lock_irqsave(&chip->gpio_lock[0], flags);
 	spin_lock(&chip->gpio_lock[1]);
 
-	bitmap_set_value(old, state[0], 0, width[0]);
-	bitmap_set_value(old, state[1], width[0], width[1]);
+	bitmap_set_value(old, 64, state[0], width[0], 0);
+	bitmap_set_value(old, 64, state[1], width[1], width[0]);
 	bitmap_replace(new, old, bits, mask, gc->ngpio);
 
-	bitmap_set_value(old, state[0], 0, 32);
-	bitmap_set_value(old, state[1], 32, 32);
+	bitmap_set_value(old, 64, state[0], 32, 0);
+	bitmap_set_value(old, 64, state[1], 32, 32);
 	state[0] = bitmap_get_value(new, 0, width[0]);
 	state[1] = bitmap_get_value(new, width[0], width[1]);
-	bitmap_set_value(new, state[0], 0, 32);
-	bitmap_set_value(new, state[1], 32, 32);
+	bitmap_set_value(new, 64, state[0], 32, 0);
+	bitmap_set_value(new, 64, state[1], 32, 32);
 	bitmap_xor(changed, old, new, 64);
 
 	if (((u32 *)changed)[0])
-- 
2.29.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Syed Nayyar Waris <syednwaris@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-arch@vger.kernel.org, amit.kucheria@verdurent.com,
	arnd@arndb.de, yamada.masahiro@socionext.com,
	linux-kernel@vger.kernel.org, linus.walleij@linaro.org,
	daniel.lezcano@linaro.org, vilhelm.gray@gmail.com,
	michal.simek@xilinx.com, bgolaszewski@baylibre.com,
	rrichter@marvell.com, linux-gpio@vger.kernel.org,
	linux-pm@vger.kernel.org, rui.zhang@intel.com,
	andriy.shevchenko@linux.intel.com,
	linux-arm-kernel@lists.infradead.org
Subject: [RESEND PATCH 3/4] gpio: xilinx: Modify bitmap_set_value() calls
Date: Sat, 21 Nov 2020 00:15:41 +0530	[thread overview]
Message-ID: <c509c26eb9903414bd730bdd344b7864aedaa6f1.1605893642.git.syednwaris@gmail.com> (raw)
Message-ID: <20201120184541.HTWE8R64VPSI-4OFwZRse1B5BskZlzQWK0jyHZe2shA@z> (raw)
In-Reply-To: <cover.1605893641.git.syednwaris@gmail.com>

Modify the bitmap_set_value() calls. bitmap_set_value()
now takes an extra bitmap width as second argument and the width of
value is now present as the fourth argument.

Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Syed Nayyar Waris <syednwaris@gmail.com>
---
 drivers/gpio/gpio-xilinx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index ad4ee4145db4..05dae086c4d0 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -151,16 +151,16 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
 	spin_lock_irqsave(&chip->gpio_lock[0], flags);
 	spin_lock(&chip->gpio_lock[1]);
 
-	bitmap_set_value(old, state[0], 0, width[0]);
-	bitmap_set_value(old, state[1], width[0], width[1]);
+	bitmap_set_value(old, 64, state[0], width[0], 0);
+	bitmap_set_value(old, 64, state[1], width[1], width[0]);
 	bitmap_replace(new, old, bits, mask, gc->ngpio);
 
-	bitmap_set_value(old, state[0], 0, 32);
-	bitmap_set_value(old, state[1], 32, 32);
+	bitmap_set_value(old, 64, state[0], 32, 0);
+	bitmap_set_value(old, 64, state[1], 32, 32);
 	state[0] = bitmap_get_value(new, 0, width[0]);
 	state[1] = bitmap_get_value(new, width[0], width[1]);
-	bitmap_set_value(new, state[0], 0, 32);
-	bitmap_set_value(new, state[1], 32, 32);
+	bitmap_set_value(new, 64, state[0], 32, 0);
+	bitmap_set_value(new, 64, state[1], 32, 32);
 	bitmap_xor(changed, old, new, 64);
 
 	if (((u32 *)changed)[0])
-- 
2.29.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-11-20 17:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20 17:42 [PATCH 0/4] Modify bitmap_set_value() to suppress compiler warning Syed Nayyar Waris
2020-11-20 17:42 ` Syed Nayyar Waris
2020-11-20 17:44 ` [PATCH 1/4] bitmap: Modify bitmap_set_value() to check bitmap length Syed Nayyar Waris
2020-11-20 18:43   ` [RESEND PATCH " Syed Nayyar Waris
2020-11-20 18:43   ` Syed Nayyar Waris
2020-11-20 17:59   ` [PATCH " William Breathitt Gray
2020-11-20 18:02     ` Syed Nayyar Waris
2020-11-20 17:45 ` [PATCH 2/4] lib/test_bitmap.c: Modify for_each_set_clump test Syed Nayyar Waris
2020-11-20 18:44   ` [RESEND PATCH " Syed Nayyar Waris
2020-11-20 18:44   ` Syed Nayyar Waris
2020-11-20 17:46 ` Syed Nayyar Waris [this message]
2020-11-20 18:45   ` [RESEND PATCH 3/4] gpio: xilinx: Modify bitmap_set_value() calls Syed Nayyar Waris
2020-11-20 18:45   ` Syed Nayyar Waris
2020-11-20 17:46   ` [PATCH " Syed Nayyar Waris
2020-12-01 15:33   ` [RESEND PATCH " Bartosz Golaszewski
2020-12-01 15:33     ` Bartosz Golaszewski
2020-12-12  9:39     ` Syed Nayyar Waris
2020-12-12  9:39       ` Syed Nayyar Waris
2020-11-20 17:48 ` [PATCH 4/4] gpio: xilinx: Add extra check to see if sum of widths exceed 64 Syed Nayyar Waris
2020-11-20 18:46   ` [RESEND PATCH 4/4] gpio: xilinx: Add extra check " Syed Nayyar Waris
2020-11-20 18:46   ` Syed Nayyar Waris
2020-11-20 17:48   ` [PATCH 4/4] gpio: xilinx: Add extra check to see " 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=c509c26eb9903414bd730bdd344b7864aedaa6f1.1605893642.git.syednwaris@gmail.com \
    --to=syednwaris@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bgolaszewski@baylibre.com \
    --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=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.