[folded-merged] gpio-pca953x-convert-to-use-bitmap-api-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: gpio: pca953x: reduce stack usage in couple of functions
has been removed from the -mm tree.  Its filename was
     gpio-pca953x-convert-to-use-bitmap-api-fix.patch

This patch was dropped because it was folded into gpio-pca953x-convert-to-use-bitmap-api.patch

------------------------------------------------------
From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Subject: gpio: pca953x: reduce stack usage in couple of functions

Simple bitmap operations are safe against in-place modifications.
Due to above we may get rid of temporary variables in some cases.

Link: http://lkml.kernel.org/r/20191023153056.64262-1-andriy.shevchenko@xxxxxxxxxxxxxxx
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Cc: William Breathitt Gray <vilhelm.gray@xxxxxxxxx>
Cc: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxx>
Cc: Marek Vasut <marek.vasut+renesas@xxxxxxxxx>
Cc: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
Cc: Yury Norov <yury.norov@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/gpio/gpio-pca953x.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

--- a/drivers/gpio/gpio-pca953x.c~gpio-pca953x-convert-to-use-bitmap-api-fix
+++ a/drivers/gpio/gpio-pca953x.c
@@ -469,7 +469,6 @@ static void pca953x_gpio_set_multiple(st
 {
 	struct pca953x_chip *chip = gpiochip_get_data(gc);
 	DECLARE_BITMAP(reg_val, MAX_LINE);
-	DECLARE_BITMAP(new_val, MAX_LINE);
 	int ret;
 
 	mutex_lock(&chip->i2c_lock);
@@ -477,9 +476,9 @@ static void pca953x_gpio_set_multiple(st
 	if (ret)
 		goto exit;
 
-	bitmap_replace(new_val, reg_val, bits, mask, gc->ngpio);
+	bitmap_replace(reg_val, reg_val, bits, mask, gc->ngpio);
 
-	pca953x_write_regs(chip, chip->regs->output, new_val);
+	pca953x_write_regs(chip, chip->regs->output, reg_val);
 exit:
 	mutex_unlock(&chip->i2c_lock);
 }
@@ -606,7 +605,6 @@ static void pca953x_irq_bus_sync_unlock(
 	struct pca953x_chip *chip = gpiochip_get_data(gc);
 	DECLARE_BITMAP(irq_mask, MAX_LINE);
 	DECLARE_BITMAP(reg_direction, MAX_LINE);
-	DECLARE_BITMAP(new_irqs, MAX_LINE);
 	int level;
 
 	pca953x_read_regs(chip, chip->regs->direction, reg_direction);
@@ -621,8 +619,8 @@ static void pca953x_irq_bus_sync_unlock(
 		pca953x_write_regs(chip, PCAL953X_INT_MASK, irq_mask);
 	}
 
-	bitmap_or(new_irqs, chip->irq_trig_fall, chip->irq_trig_raise, gc->ngpio);
-	bitmap_and(irq_mask, new_irqs, reg_direction, gc->ngpio);
+	bitmap_or(irq_mask, chip->irq_trig_fall, chip->irq_trig_raise, gc->ngpio);
+	bitmap_and(irq_mask, irq_mask, reg_direction, gc->ngpio);
 
 	/* Look for any newly setup interrupt */
 	for_each_set_bit(level, irq_mask, gc->ngpio)
_

Patches currently in -mm which might be from andriy.shevchenko@xxxxxxxxxxxxxxx are

kernelh-update-comment-about-simple_strtofoo-functions.patch
auxdisplay-charlcd-deduplicate-simple_strtoul.patch
lib-test_bitmap-force-argument-of-bitmap_parselist_user-to-proper-address-space.patch
lib-test_bitmap-undefine-macros-after-use.patch
lib-test_bitmap-name-exp_bytes-properly.patch
lib-test_bitmap-rename-exp-to-exp1-to-avoid-ambiguous-name.patch
lib-test_bitmap-move-exp1-and-exp2-upper-for-others-to-use.patch
lib-test_bitmap-fix-comment-about-this-file.patch
bitmap-introduce-bitmap_replace-helper.patch
gpio-pca953x-remove-redundant-variable-and-check-in-irq-handler.patch
gpio-pca953x-use-input-from-regs-structure-in-pca953x_irq_pending.patch
gpio-pca953x-convert-to-use-bitmap-api.patch
gpio-pca953x-tight-up-indentation.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux