All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend] ACPI / PNP: constify device IDs
@ 2016-01-02 10:30 Mathias Krause
  2016-01-05 12:58 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Mathias Krause @ 2016-01-02 10:30 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Len Brown, linux-acpi

Instead of re-creating the array on the stack each time
is_cmos_rtc_device() gets called, make the array 'static const'.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
This is a resend of patch 4/12 of [1], in case it got forgotten
in the meantime.

[1] http://thread.gmane.org/gmane.linux.acpi.devel/76528

 drivers/acpi/acpi_pnp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c
index ff6d8adc9cda..9d20ba66d33b 100644
--- a/drivers/acpi/acpi_pnp.c
+++ b/drivers/acpi/acpi_pnp.c
@@ -368,7 +368,7 @@ static struct acpi_scan_handler acpi_pnp_handler = {
  */
 static int is_cmos_rtc_device(struct acpi_device *adev)
 {
-	struct acpi_device_id ids[] = {
+	static const struct acpi_device_id ids[] = {
 		{ "PNP0B00" },
 		{ "PNP0B01" },
 		{ "PNP0B02" },
-- 
1.7.10.4


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

* Re: [PATCH resend] ACPI / PNP: constify device IDs
  2016-01-02 10:30 [PATCH resend] ACPI / PNP: constify device IDs Mathias Krause
@ 2016-01-05 12:58 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-01-05 12:58 UTC (permalink / raw)
  To: Mathias Krause; +Cc: Len Brown, linux-acpi

On Saturday, January 02, 2016 11:30:09 AM Mathias Krause wrote:
> Instead of re-creating the array on the stack each time
> is_cmos_rtc_device() gets called, make the array 'static const'.
> 
> Signed-off-by: Mathias Krause <minipli@googlemail.com>

Applied, thanks!

Rafael


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

end of thread, other threads:[~2016-01-05 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-02 10:30 [PATCH resend] ACPI / PNP: constify device IDs Mathias Krause
2016-01-05 12:58 ` Rafael J. Wysocki

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.