[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170419140804.xsv4zsj5cm7ghrtc@hirez.programming.kicks-ass.net>
Date: Wed, 19 Apr 2017 16:08:04 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, jbaron@...mai.com,
mingo@...nel.org, bigeasy@...utronix.de,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] jump_label: Provide static_key_slow_inc_nohp()
On Wed, Apr 19, 2017 at 08:49:11AM -0400, Steven Rostedt wrote:
> I agree with Thomas. Removing the comment because a
> "lockdep_assert_held()" exists at the top of the code, assumes someone
> that is about to use that function did more that read the kerneldoc and
> actually looked at the code.
No, it doesn't assume anything. You can use the function without reading
_any_ comments. It will explode at runtime (preferably on the machine of
the guy who wrote it -- who _SHOULD_ have lockdep enabled, but certainly
on other developer's machines and test-bots, who will then loudly yell
at said developer for not doing his job properly).
> If there's a kerneldoc to a function, than that header should contain
> all the info that a developer needs to use that function.
Yeah, rainbows and unicorns are shiny. Also, I put kerneldoc (if I put
it at all) at the definition site, not the declaration. So headers are
useless.
In any case, I don't mind the extra line of comment. Don't really see
the point of it either. What I am convinced of is that
lockdep_assert_held() lines are far more useful than such comment lines.
Powered by blists - more mailing lists