linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] time: remove the unnecessary CONFIG_GENERIC_CLOCKEVENS check
  2012-01-05 13:28 ` [PATCH 2/2] time: remove the unnecessary CONFIG_GENERIC_CLOCKEVENS check Feng Tang
@ 2012-01-05 11:17   ` Paul Bolle
  2012-01-06  2:12     ` Feng Tang
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Bolle @ 2012-01-05 11:17 UTC (permalink / raw)
  To: Feng Tang; +Cc: Thomas Gleixner, John Stultz, linux-kernel

On Thu, 2012-01-05 at 21:28 +0800, Feng Tang wrote:
> In kernel/time/Kconfig:
> config GENERIC_CLOCKEVENTS_BUILD
> 	bool
> 	default y
> 	depends on GENERIC_CLOCKEVENTS
> 
> So there is no need to check CONFIG_GENERIC_CLOCKEVENTS if the
> CONFIG_GENERIC_CLOCKEVENTS_BUILD is defined already.

This is only true because nothing selects GENERIC_CLOCKEVENTS_BUILD
directly, isn't it? So if we're being strict the patch explanation
should mention that.

(Maybe it's even better to simply state
    There is no need to check CONFIG_GENERIC_CLOCKEVENTS if
    CONFIG_GENERIC_CLOCKEVENTS_BUILD is defined.

    This prepares [...]

as that would tell us just enough.)

> This prepares for the total removal of GENERIC_CLOCKEVENTS_BUILD.


Paul Bolle


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

* [PATCH 1/2] time: remove the orphan option GENERIC_CLOCKEVENTS_MIGR
@ 2012-01-05 13:28 Feng Tang
  2012-01-05 13:28 ` [PATCH 2/2] time: remove the unnecessary CONFIG_GENERIC_CLOCKEVENS check Feng Tang
  2012-01-05 22:05 ` [PATCH 1/2] time: remove the orphan option GENERIC_CLOCKEVENTS_MIGR Paul Bolle
  0 siblings, 2 replies; 5+ messages in thread
From: Feng Tang @ 2012-01-05 13:28 UTC (permalink / raw)
  To: Thomas Gleixner, John Stultz, linux-kernel; +Cc: Feng Tang

Running grep only see it exit in the kernel/time/Kconfig, so remove it.

xxx@bee:~/ws2/projects/linux-2.6$ grep GENERIC_CLOCKEVENTS_MIGR ./* -r
./kernel/time/Kconfig:  depends on GENERIC_CLOCKEVENTS || GENERIC_CLOCKEVENTS_MIGR

Signed-off-by: Feng Tang <feng.tang@intel.com>
---
 kernel/time/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
index b26c222..2cf9cc7 100644
--- a/kernel/time/Kconfig
+++ b/kernel/time/Kconfig
@@ -25,7 +25,7 @@ config HIGH_RES_TIMERS
 config GENERIC_CLOCKEVENTS_BUILD
 	bool
 	default y
-	depends on GENERIC_CLOCKEVENTS || GENERIC_CLOCKEVENTS_MIGR
+	depends on GENERIC_CLOCKEVENTS
 
 config GENERIC_CLOCKEVENTS_MIN_ADJUST
 	bool
-- 
1.7.1


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

* [PATCH 2/2] time: remove the unnecessary CONFIG_GENERIC_CLOCKEVENS check
  2012-01-05 13:28 [PATCH 1/2] time: remove the orphan option GENERIC_CLOCKEVENTS_MIGR Feng Tang
@ 2012-01-05 13:28 ` Feng Tang
  2012-01-05 11:17   ` Paul Bolle
  2012-01-05 22:05 ` [PATCH 1/2] time: remove the orphan option GENERIC_CLOCKEVENTS_MIGR Paul Bolle
  1 sibling, 1 reply; 5+ messages in thread
From: Feng Tang @ 2012-01-05 13:28 UTC (permalink / raw)
  To: Thomas Gleixner, John Stultz, linux-kernel; +Cc: Feng Tang

In kernel/time/Kconfig:
config GENERIC_CLOCKEVENTS_BUILD
	bool
	default y
	depends on GENERIC_CLOCKEVENTS

So there is no need to check CONFIG_GENERIC_CLOCKEVENTS if the
CONFIG_GENERIC_CLOCKEVENTS_BUILD is defined already.

This prepares for the total removal of GENERIC_CLOCKEVENTS_BUILD.

Signed-off-by: Feng Tang <feng.tang@intel.com>
---
 include/linux/clockchips.h |    4 ----
 kernel/time/clockevents.c  |    2 --
 2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 81e803e..ac15057 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -155,11 +155,7 @@ clockevents_calc_mult_shift(struct clock_event_device *ce, u32 freq, u32 minsec)
 				      freq, minsec);
 }
 
-#ifdef CONFIG_GENERIC_CLOCKEVENTS
 extern void clockevents_notify(unsigned long reason, void *arg);
-#else
-# define clockevents_notify(reason, arg) do { } while (0)
-#endif
 
 #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */
 
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 1ecd6ba..f91b7a8 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -399,7 +399,6 @@ void clockevents_exchange_device(struct clock_event_device *old,
 	local_irq_restore(flags);
 }
 
-#ifdef CONFIG_GENERIC_CLOCKEVENTS
 /**
  * clockevents_notify - notification about relevant events
  */
@@ -439,4 +438,3 @@ void clockevents_notify(unsigned long reason, void *arg)
 	raw_spin_unlock_irqrestore(&clockevents_lock, flags);
 }
 EXPORT_SYMBOL_GPL(clockevents_notify);
-#endif
-- 
1.7.1


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

* Re: [PATCH 1/2] time: remove the orphan option GENERIC_CLOCKEVENTS_MIGR
  2012-01-05 13:28 [PATCH 1/2] time: remove the orphan option GENERIC_CLOCKEVENTS_MIGR Feng Tang
  2012-01-05 13:28 ` [PATCH 2/2] time: remove the unnecessary CONFIG_GENERIC_CLOCKEVENS check Feng Tang
@ 2012-01-05 22:05 ` Paul Bolle
  1 sibling, 0 replies; 5+ messages in thread
From: Paul Bolle @ 2012-01-05 22:05 UTC (permalink / raw)
  To: Feng Tang; +Cc: Thomas Gleixner, John Stultz, linux-kernel, Jiri Kosina

On Thu, 2012-01-05 at 21:28 +0800, Feng Tang wrote:
> Running grep only see it exit in the kernel/time/Kconfig, so remove it.
> 
> xxx@bee:~/ws2/projects/linux-2.6$ grep GENERIC_CLOCKEVENTS_MIGR ./* -r
> ./kernel/time/Kconfig:  depends on GENERIC_CLOCKEVENTS || GENERIC_CLOCKEVENTS_MIGR
> 
> Signed-off-by: Feng Tang <feng.tang@intel.com>

An identical patch is currently included in the trivial tree. Jiri
Kosina just sent a pull request that (if honored) would include it in
the mainline tree.


Paul Bolle

> ---
>  kernel/time/Kconfig |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
> index b26c222..2cf9cc7 100644
> --- a/kernel/time/Kconfig
> +++ b/kernel/time/Kconfig
> @@ -25,7 +25,7 @@ config HIGH_RES_TIMERS
>  config GENERIC_CLOCKEVENTS_BUILD
>  	bool
>  	default y
> -	depends on GENERIC_CLOCKEVENTS || GENERIC_CLOCKEVENTS_MIGR
> +	depends on GENERIC_CLOCKEVENTS
>  
>  config GENERIC_CLOCKEVENTS_MIN_ADJUST
>  	bool


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

* Re: [PATCH 2/2] time: remove the unnecessary CONFIG_GENERIC_CLOCKEVENS check
  2012-01-05 11:17   ` Paul Bolle
@ 2012-01-06  2:12     ` Feng Tang
  0 siblings, 0 replies; 5+ messages in thread
From: Feng Tang @ 2012-01-06  2:12 UTC (permalink / raw)
  To: Paul Bolle; +Cc: Thomas Gleixner, John Stultz, linux-kernel

Hi Paul, 

On Thu, Jan 05, 2012 at 12:17:46PM +0100, Paul Bolle wrote:
> On Thu, 2012-01-05 at 21:28 +0800, Feng Tang wrote:
> > In kernel/time/Kconfig:
> > config GENERIC_CLOCKEVENTS_BUILD
> > 	bool
> > 	default y
> > 	depends on GENERIC_CLOCKEVENTS
> > 
> > So there is no need to check CONFIG_GENERIC_CLOCKEVENTS if the
> > CONFIG_GENERIC_CLOCKEVENTS_BUILD is defined already.
> 
> This is only true because nothing selects GENERIC_CLOCKEVENTS_BUILD
> directly, isn't it?

Thanks for pointing this out, your concern is valid, even though there
will be a warning message about the dependency corruption if the
GENERIC_CLOCKEVENTS_BUILD is directly selected while the 
GENERIC_CLOCKEVENTS is N.

Thanks,
Feng

> So if we're being strict the patch explanation
> should mention that.
> 
> (Maybe it's even better to simply state
>     There is no need to check CONFIG_GENERIC_CLOCKEVENTS if
>     CONFIG_GENERIC_CLOCKEVENTS_BUILD is defined.
> 
>     This prepares [...]
> 
> as that would tell us just enough.)
> 
> > This prepares for the total removal of GENERIC_CLOCKEVENTS_BUILD.
> 
> 
> Paul Bolle

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

end of thread, other threads:[~2012-01-06  2:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05 13:28 [PATCH 1/2] time: remove the orphan option GENERIC_CLOCKEVENTS_MIGR Feng Tang
2012-01-05 13:28 ` [PATCH 2/2] time: remove the unnecessary CONFIG_GENERIC_CLOCKEVENS check Feng Tang
2012-01-05 11:17   ` Paul Bolle
2012-01-06  2:12     ` Feng Tang
2012-01-05 22:05 ` [PATCH 1/2] time: remove the orphan option GENERIC_CLOCKEVENTS_MIGR Paul Bolle

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