stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/6] ARM: davinci: add missing sentinels to GPIO lookup tables
       [not found] <20190329093334.3885-1-brgl@bgdev.pl>
@ 2019-03-29  9:33 ` Bartosz Golaszewski
       [not found]   ` <20190330134525.0C68A218AC@mail.kernel.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2019-03-29  9:33 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Alan Stern, Greg Kroah-Hartman
  Cc: linux-arm-kernel, linux-kernel, linux-usb, Bartosz Golaszewski,
	stable

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Some GPIO lookup tables defined in davinci board files are missing
array sentinels. If an entry for given device cannot be found, this
will cause a kernel panic.

Cc: stable@vger.kernel.org
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/board-da830-evm.c     | 2 ++
 arch/arm/mach-davinci/board-da850-evm.c     | 1 +
 arch/arm/mach-davinci/board-dm355-evm.c     | 1 +
 arch/arm/mach-davinci/board-dm644x-evm.c    | 1 +
 arch/arm/mach-davinci/board-omapl138-hawk.c | 1 +
 5 files changed, 6 insertions(+)

diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index ff097ecfa451..e3d74e43c47d 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -58,6 +58,7 @@ static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = {
 	.table = {
 		GPIO_LOOKUP("davinci_gpio", ON_BD_USB_DRV, "vbus", 0),
 		GPIO_LOOKUP("davinci_gpio", ON_BD_USB_OVC, "oc", 0),
+		{ }
 	},
 };
 
@@ -156,6 +157,7 @@ static struct gpiod_lookup_table mmc_gpios_table = {
 			    GPIO_ACTIVE_LOW),
 		GPIO_LOOKUP("davinci_gpio", DA830_MMCSD_WP_PIN, "wp",
 			    GPIO_ACTIVE_LOW),
+		{ }
 	},
 };
 
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 1fdc9283a8c5..4ee65a8a3b80 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -784,6 +784,7 @@ static struct gpiod_lookup_table mmc_gpios_table = {
 			    GPIO_ACTIVE_LOW),
 		GPIO_LOOKUP("davinci_gpio", DA850_MMCSD_WP_PIN, "wp",
 			    GPIO_ACTIVE_HIGH),
+		{ }
 	},
 };
 
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 64d81fc86f14..5113273fda69 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -121,6 +121,7 @@ static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
 			    GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
 		GPIO_LOOKUP("davinci_gpio", DM355_I2C_SCL_PIN, "scl",
 			    GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+		{ }
 	},
 };
 
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index de15f782816e..9d87d4e440ea 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -663,6 +663,7 @@ static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
 			    GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
 		GPIO_LOOKUP("davinci_gpio", DM644X_I2C_SCL_PIN, "scl",
 			    GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+		{ }
 	},
 };
 
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index 0896af2bed24..e244c8648594 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -303,6 +303,7 @@ static struct gpiod_lookup_table hawk_usb_gpio_lookup = {
 	.table = {
 		GPIO_LOOKUP("davinci_gpio", DA850_USB1_VBUS_PIN, "vbus", 0),
 		GPIO_LOOKUP("davinci_gpio", DA850_USB1_OC_PIN, "oc", 0),
+		{ }
 	},
 };
 
-- 
2.21.0


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

* Re: [PATCH v2 1/6] ARM: davinci: add missing sentinels to GPIO lookup tables
       [not found]   ` <20190330134525.0C68A218AC@mail.kernel.org>
@ 2019-03-30 17:08     ` Bartosz Golaszewski
  0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2019-03-30 17:08 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Linux ARM,
	Linux Kernel Mailing List, stable

sob., 30 mar 2019 o 14:45 Sasha Levin <sashal@kernel.org> napisał(a):
>
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: all
>
> The bot has tested the following trees: v5.0.5, v4.19.32, v4.14.109, v4.9.166, v4.4.177, v3.18.137.
>
> v5.0.5: Failed to apply! Possible dependencies:
>     1703cf5d4fc0 ("ARM: davinci: da830-evm: use gpio lookup entries for usb gpios")
>     c08df69149db ("ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios")
>
> v4.19.32: Failed to apply! Possible dependencies:
>     1703cf5d4fc0 ("ARM: davinci: da830-evm: use gpio lookup entries for usb gpios")
>     c08df69149db ("ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios")
>
> v4.14.109: Failed to apply! Possible dependencies:
>     1703cf5d4fc0 ("ARM: davinci: da830-evm: use gpio lookup entries for usb gpios")
>     c08df69149db ("ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios")
>     cd2428c368a6 ("i2c: davinci: switch to using gpiod for bus recovery gpios")
>     e53537653791 ("i2c/ARM: davinci: Deep refactoring of I2C recovery")
>
> v4.9.166: Failed to apply! Possible dependencies:
>     1703cf5d4fc0 ("ARM: davinci: da830-evm: use gpio lookup entries for usb gpios")
>     1b6fe9798af8 ("ARM: davinci: board-da850-evm: fix WP pin polarity for MMC/SD")
>     51e9f1216322 ("ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD")
>     67c6b6ff221f ("ARM: davinci: board-da850-evm: fix GPIO lookup for MMC/SD")
>     b5e1438cf98a ("ARM: davinci: da830-evm: use gpio descriptor for mmc pins")
>     bdf0e8364fd3 ("ARM: davinci: da850-evm: use gpio descriptor for mmc pins")
>     c08df69149db ("ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios")
>     cd2428c368a6 ("i2c: davinci: switch to using gpiod for bus recovery gpios")
>     e53537653791 ("i2c/ARM: davinci: Deep refactoring of I2C recovery")
>
> v4.4.177: Failed to apply! Possible dependencies:
>     1703cf5d4fc0 ("ARM: davinci: da830-evm: use gpio lookup entries for usb gpios")
>     1b6fe9798af8 ("ARM: davinci: board-da850-evm: fix WP pin polarity for MMC/SD")
>     51e9f1216322 ("ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD")
>     67c6b6ff221f ("ARM: davinci: board-da850-evm: fix GPIO lookup for MMC/SD")
>     b5e1438cf98a ("ARM: davinci: da830-evm: use gpio descriptor for mmc pins")
>     bdf0e8364fd3 ("ARM: davinci: da850-evm: use gpio descriptor for mmc pins")
>     c08df69149db ("ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios")
>     cd2428c368a6 ("i2c: davinci: switch to using gpiod for bus recovery gpios")
>     e53537653791 ("i2c/ARM: davinci: Deep refactoring of I2C recovery")
>
> v3.18.137: Failed to apply! Possible dependencies:
>     1703cf5d4fc0 ("ARM: davinci: da830-evm: use gpio lookup entries for usb gpios")
>     1b6fe9798af8 ("ARM: davinci: board-da850-evm: fix WP pin polarity for MMC/SD")
>     2c6ef04ffaf7 ("i2c: davinci: switch to use platform_get_irq")
>     2e65676f710e ("i2c: davinci: use bus recovery infrastructure")
>     51e9f1216322 ("ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD")
>     67c6b6ff221f ("ARM: davinci: board-da850-evm: fix GPIO lookup for MMC/SD")
>     7ef97e9a312c ("i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery")
>     a7ca2bcf2d2e ("ARM: davinci: Use standard logging styles")
>     b5e1438cf98a ("ARM: davinci: da830-evm: use gpio descriptor for mmc pins")
>     bdf0e8364fd3 ("ARM: davinci: da850-evm: use gpio descriptor for mmc pins")
>     c08df69149db ("ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios")
>     cd2428c368a6 ("i2c: davinci: switch to using gpiod for bus recovery gpios")
>     e53537653791 ("i2c/ARM: davinci: Deep refactoring of I2C recovery")
>
>
> How should we proceed with this patch?
>
> --
> Thanks,
> Sasha

Different GPIO lookup tables were added at different points and
backporting this patch will be a mess. I guess - since nobody
complained so far about any breakage - we can simply drop the stable
tag and treat it as an improvement of existing code.

Bart

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

end of thread, other threads:[~2019-03-30 17:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190329093334.3885-1-brgl@bgdev.pl>
2019-03-29  9:33 ` [PATCH v2 1/6] ARM: davinci: add missing sentinels to GPIO lookup tables Bartosz Golaszewski
     [not found]   ` <20190330134525.0C68A218AC@mail.kernel.org>
2019-03-30 17:08     ` Bartosz Golaszewski

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