Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942441AbcJ0S0P (ORCPT ); Thu, 27 Oct 2016 14:26:15 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:32998 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935747AbcJ0S0O (ORCPT ); Thu, 27 Oct 2016 14:26:14 -0400 Subject: Re: [RFC PATCH 06/13] of: Remove prefix "__of_" and prefix "__" from local function names To: Rob Herring References: <1477429146-27039-1-git-send-email-frowand.list@gmail.com> <1477429146-27039-7-git-send-email-frowand.list@gmail.com> <58122CC0.3090700@gmail.com> Cc: Pantelis Antoniou , Pantelis Antoniou , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Frank Rowand Message-ID: <5812469C.3010403@gmail.com> Date: Thu, 27 Oct 2016 11:25:32 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1565 Lines: 41 On 10/27/16 09:58, Rob Herring wrote: > On Thu, Oct 27, 2016 at 11:35 AM, Frank Rowand wrote: >> On 10/27/16 05:47, Rob Herring wrote: >>> On Tue, Oct 25, 2016 at 3:58 PM, wrote: >>>> From: Frank Rowand >>> >>> I prefer to leave the prefixes and this is getting into pointless churn. >>> >>>> >>>> Signed-off-by: Frank Rowand >>>> --- >>>> drivers/of/resolver.c | 10 +++++----- >>>> 1 file changed, 5 insertions(+), 5 deletions(-) >>> >> >> If I was just submitting this as a single patch, I would agree. >> >> But since I am making so many other changes, I think it makes >> sense to do this as part of this series. It is broken apart >> as a separate patch to be easy to review and not pollute any >> of the other patches in the series. >> >> The prefixes add no value for a local function, but they do >> add noise when reading code. > > The value is when reading the calling function, you know the function > is a DT related function. You don't know it's a static function It is more than that. A common convention in drivers/of/ is that function blah() acquires a lock, calls function __blah(), and releases the lock. Any function other than blah() that wants to call __blah() must also hold the proper lock. The functions whose name this patch changes do not fit this pattern. > without looking up the function name. That said, I wouldn't object to > code originally written either way, I just don't see the value in > changing it. > > Rob >