All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Missmatch between source and Kconfig for ACPI && !PM
@ 2010-04-26 14:12 Christoph Egger
  0 siblings, 0 replies; only message in thread
From: Christoph Egger @ 2010-04-26 14:12 UTC (permalink / raw)
  To: Alessandro Zummo, Paul Gortmaker, Andrew Morton, maltesch,
	Ralf Baechle, Herton Ronaldo Krzesinski, rtc-linux, linux-kernel
  Cc: vamos

Hi all!

	As part of the VAMOS[0] research project at the University of
Erlangen we are looking at multiple integrity errors in linux'
configuration system.

	There's a check for CONFIG_PM inside a block that is only
compiled if CONFIG_ACPI is set. As CONFIG_ACPI depends on CONFIG_PM
the check is currently redundant, the Code always active and it's else
branch always dead.

	The attached patch takes the naive solution and only makes it
clearer how this source is handled currently. However if the
combination ACPI && !PM is usefull the depends in Kconfig might need
to be lowered.

	Please keep me informed of this patch getting confirmed /
merged so we can keep track of it.

Regards

	Christoph Egger

[0] http://vamos1.informatik.uni-erlangen.de/

----
>From f122e465fc239e4dd8f4d27c72e1066f0a59c6c7 Mon Sep 17 00:00:00 2001
From: Christoph Egger <siccegge@cs.fau.de>
Date: Mon, 26 Apr 2010 16:02:37 +0200
Subject: [PATCH] Remove check for CONFIG_PM which is always present when CONFIG_ACPI

As the config option for ACPI directly depends on PM in Kconfig there
is currently no way to have ACPI enabled but no PM. Nontheless there's
some code handling exactly this case.

menuconfig ACPI
[...]
		   depends on PM
[...]

Signed-off-by: Christoph Egger <siccegge@cs.fau.de>
---
 drivers/rtc/rtc-cmos.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index e9aa814..0b2ae16 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -970,7 +970,6 @@ static inline int cmos_poweroff(struct device *dev)
 
 #include <linux/acpi.h>
 
-#ifdef	CONFIG_PM
 static u32 rtc_handler(void *context)
 {
 	acpi_clear_event(ACPI_EVENT_RTC);
@@ -999,11 +998,6 @@ static void rtc_wake_off(struct device *dev)
 {
 	acpi_disable_event(ACPI_EVENT_RTC, 0);
 }
-#else
-#define rtc_wake_setup()	do{}while(0)
-#define rtc_wake_on		NULL
-#define rtc_wake_off		NULL
-#endif
 
 /* Every ACPI platform has a mc146818 compatible "cmos rtc".  Here we find
  * its device node and pass extra config data.  This helps its driver use
-- 
1.6.3.3










^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-26 14:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-26 14:12 [PATCH] Missmatch between source and Kconfig for ACPI && !PM Christoph Egger

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.