Re: [PATCH 1/3] genclk: add generic framework for managing clocks.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Dmitry Baryshkov <dbaryshkov@...>
Cc: <linux-kernel@...>, Haavard Skinnemoen <haavard.skinnemoen@...>, Russell King <rmk+lkml@...>, Paul Mundt <lethal@...>, pHilipp Zabel <philipp.zabel@...>, Pavel Machek <pavel@...>, <tony@...>, <paul@...>, David Brownell <david-b@...>, Mark Brown <broonie@...>, ian <spyro@...>
Date: Sunday, July 13, 2008 - 2:48 am

On Tue, 8 Jul 2008 17:43:36 +0400 Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:


So I'll merge this into -mm and, unless there be suitably-serious
objections, into 2.6.27.

The other two patches got rejects all over the place - so many that I
didn't even attempt to fix them.  Perhaps you were developing againt
Linus's tree, which really is not a successful strategy late in the
-rc's.


hm, what's this unusual-but-uncommented code doing in here?  Please
always comment unusual code.

There is already a zero-byte version of `struct lock_class_key' in
include/linux/lockdep.h, dependent upon CONFIG_LOCKDEP.

Methinks some explanation and fixing is needed here.


whoa.  We have a kernel-wide symbol called "locks"?

afaict that won't cause any linkage errors, but those compilation units
which already have static variables called "clocks" will explode if
they deliberately or accidentally include your header file.

I suggest that this be renamed to something more subsystem-specific. 
genclk_clocks?

Or, better, refactor the code a bit and make it static.  Do other
compilation units _really_ need to go poking into genclk's internals? 
Would it be better to always access this data structure via API calls?


genclk_clocks_lock.


This export is in the wrong place.


checkpatch.pl, please.


As this is a new kernel-wide utility library, it is appropriate that
all of its public interfaces (at least) be documented.  An appropriate
way of doing that is via kerneldoc annotation.  Please don't forget to
document return values and call environment prerequisites (eg: requires
foo_lock, may be called from interrupt context, etc, etc).


Something's wrong here, I suspect.


can't call debugfs_remove() under spinlock.


Might not be able to call kref_put(), either.


Please always test code with all kernel debug options enabled.  See
Documentation/SubmitChecklist.


Missed a check for debugfs_create_dir() failure.


Could do

	if (!WARN_ON(IS_ERR(dir)))
		clk->dir = dir;

Or not.  What you have there is clearer.

Quite a bit of rework is needed here and it needs to be fully retested. 
I won't apply it after all.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/3] Clocklib: refactor SA-1100 to use clocklib, Dmitry Baryshkov, (Tue Jul 8, 9:44 am)
[PATCH 2/3] Refactor arm/pxa to use generic clocks support, Dmitry Baryshkov, (Tue Jul 8, 9:43 am)
Re: [PATCH 1/3] genclk: add generic framework for managing c..., Andrew Morton, (Sun Jul 13, 2:48 am)