From: Nikolay Borisov <kernel@kyup.com>
To: Wei Tang <tangwei@cmss.chinamobile.com>,
john@johnmccutchan.com, rlove@rlove.org, eparis@parisplace.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fsnotify: do not initialise statics to false
Date: Tue, 7 Jun 2016 09:47:33 +0300 [thread overview]
Message-ID: <57566E05.2080209@kyup.com> (raw)
In-Reply-To: <1465265874-15562-1-git-send-email-tangwei@cmss.chinamobile.com>
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 <tangwei@cmss.chinamobile.com>
> ---
> 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;
>
prev parent reply other threads:[~2016-06-07 6:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 2:17 [PATCH] fsnotify: do not initialise statics to false Wei Tang
2016-06-07 6:47 ` Nikolay Borisov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57566E05.2080209@kyup.com \
--to=kernel@kyup.com \
--cc=eparis@parisplace.org \
--cc=john@johnmccutchan.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rlove@rlove.org \
--cc=tangwei@cmss.chinamobile.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox