From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764111AbdDSOIM (ORCPT ); Wed, 19 Apr 2017 10:08:12 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56468 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764009AbdDSOIK (ORCPT ); Wed, 19 Apr 2017 10:08:10 -0400 Date: Wed, 19 Apr 2017 16:08:04 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: Thomas Gleixner , jbaron@akamai.com, mingo@kernel.org, bigeasy@linutronix.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] jump_label: Provide static_key_slow_inc_nohp() Message-ID: <20170419140804.xsv4zsj5cm7ghrtc@hirez.programming.kicks-ass.net> References: <20170418103213.089888286@infradead.org> <20170418103422.636958338@infradead.org> <20170418130350.cwfij23vc4ybklkp@hirez.programming.kicks-ass.net> <20170418124629.13316f8d@gandalf.local.home> <20170418202708.d5xn2l5gn3mktbe5@hirez.programming.kicks-ass.net> <20170419063918.3z2ndmmtn2xwrb6r@hirez.programming.kicks-ass.net> <20170419084911.61e0e965@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170419084911.61e0e965@gandalf.local.home> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.