From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753698AbcFGGri (ORCPT ); Tue, 7 Jun 2016 02:47:38 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36394 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753480AbcFGGrg (ORCPT ); Tue, 7 Jun 2016 02:47:36 -0400 Subject: Re: [PATCH] fsnotify: do not initialise statics to false To: Wei Tang , john@johnmccutchan.com, rlove@rlove.org, eparis@parisplace.org References: <1465265874-15562-1-git-send-email-tangwei@cmss.chinamobile.com> Cc: linux-kernel@vger.kernel.org From: Nikolay Borisov Message-ID: <57566E05.2080209@kyup.com> Date: Tue, 7 Jun 2016 09:47:33 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1465265874-15562-1-git-send-email-tangwei@cmss.chinamobile.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/07/2016 05:17 AM, Wei Tang wrote: > This patch fixes the checkpatch.pl error to inotify_fsnotify.c: > > ERROR: do not initialise statics to false So if a variable is declared as static this means it's going to live in the BSS which is zeroed out on load. So implicitly it is going to be 0, however I think this is a subtle detail. I personally rather have the false there and live with the warning. Not everything that checkpatch reports must be fixed. > > Signed-off-by: Wei Tang > --- > fs/notify/inotify/inotify_fsnotify.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c > index 2cd900c..09c5393 100644 > --- a/fs/notify/inotify/inotify_fsnotify.c > +++ b/fs/notify/inotify/inotify_fsnotify.c > @@ -136,7 +136,7 @@ static int idr_callback(int id, void *p, void *data) > { > struct fsnotify_mark *fsn_mark; > struct inotify_inode_mark *i_mark; > - static bool warned = false; > + static bool warned; > > if (warned) > return 0; >