From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763258AbdDSMtT (ORCPT ); Wed, 19 Apr 2017 08:49:19 -0400 Received: from mail.kernel.org ([198.145.29.136]:60302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763229AbdDSMtQ (ORCPT ); Wed, 19 Apr 2017 08:49:16 -0400 Date: Wed, 19 Apr 2017 08:49:11 -0400 From: Steven Rostedt To: Thomas Gleixner Cc: Peter Zijlstra , 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: <20170419084911.61e0e965@gandalf.local.home> In-Reply-To: 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> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Apr 2017 11:08:35 +0200 (CEST) Thomas Gleixner wrote: > > In the grand scheme of things, true. But there are more people running > > with lockdep enabled than there are people writing code, of which there > > are more than people reading relevant comments while writing code. > > Therefore having the lockdep annotation is two orders better than a > > comment ;-) > > > > Also, I would argue that an "assert" at the start of a function is a > > fairly readable 'comment' all by itself. > > > > In any case, I don't care too much. But I typically remove such comments > > when I stick a lockdep_assert_held() in. > > I think that's wrong. We are striving for better documentation and the > kernel-doc comments above a function are part of that. Calling conventions > are definitely something which belongs there. 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. If there's a kerneldoc to a function, than that header should contain all the info that a developer needs to use that function. -- Steve