diff mbox series

[RESEND,3/4] gpio: xilinx: Modify bitmap_set_value() calls

Message ID c509c26eb9903414bd730bdd344b7864aedaa6f1.1605893642.git.syednwaris@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show
Series Modify bitmap_set_value() to suppress compiler warning | expand

Commit Message

Syed Nayyar Waris Nov. 20, 2020, 6:45 p.m. UTC
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(-)

Comments

Bartosz Golaszewski Dec. 1, 2020, 3:33 p.m. UTC | #1
On Fri, Nov 20, 2020 at 7:46 PM Syed Nayyar Waris <syednwaris@gmail.com> wrote:
>
> 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
>

This series is not bisectable because you modify the interface -
breaking existing users - and you only fix them later. Please squash
those changes into a single commit.

Bartosz
Syed Nayyar Waris Dec. 12, 2020, 9:39 a.m. UTC | #2
On Tue, Dec 1, 2020 at 9:03 PM Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:
>
> On Fri, Nov 20, 2020 at 7:46 PM Syed Nayyar Waris <syednwaris@gmail.com> wrote:
> >
> > 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
> >
>
> This series is not bisectable because you modify the interface -
> breaking existing users - and you only fix them later. Please squash
> those changes into a single commit.
>
> Bartosz

Hi Bartosz,

I have squashed the changes and have sent a new patchset v2.

Regards
Syed Nayyar Waris
diff mbox series

Patch

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])