All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Eeda <srinivas.eeda@oracle.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
	ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org
Subject: [Ocfs2-devel] [PATCH] fs: ocfs2: dir.c: Cleaning up uninitialized variables
Date: Mon, 02 Jun 2014 11:44:45 -0700	[thread overview]
Message-ID: <538CC61D.2020001@oracle.com> (raw)
In-Reply-To: <1401630784-20493-1-git-send-email-rickard_strandqvist@spectrumdigital.se>

Acked-by: Srinivas Eeda <srinivas.eeda@oracle.com>

On 06/01/2014 06:53 AM, Rickard Strandqvist wrote:
> There is a risk that the variable will be used without being initialized.
>
> This was largely found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>   fs/ocfs2/dir.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index 0717662..27aa4a1 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -3738,7 +3738,7 @@ static int ocfs2_dx_dir_rebalance(struct ocfs2_super *osb, struct inode *dir,
>   	int credits, ret, i, num_used, did_quota = 0;
>   	u32 cpos, split_hash, insert_hash = hinfo->major_hash;
>   	u64 orig_leaves_start;
> -	int num_dx_leaves;
> +	int num_dx_leaves = 0;
>   	struct buffer_head **orig_dx_leaves = NULL;
>   	struct buffer_head **new_dx_leaves = NULL;
>   	struct ocfs2_alloc_context *data_ac = NULL, *meta_ac = NULL;

WARNING: multiple messages have this Message-ID (diff)
From: Srinivas Eeda <srinivas.eeda@oracle.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
	ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org
Subject: Re: [PATCH] fs: ocfs2: dir.c:  Cleaning up uninitialized variables
Date: Mon, 02 Jun 2014 11:44:45 -0700	[thread overview]
Message-ID: <538CC61D.2020001@oracle.com> (raw)
In-Reply-To: <1401630784-20493-1-git-send-email-rickard_strandqvist@spectrumdigital.se>

Acked-by: Srinivas Eeda <srinivas.eeda@oracle.com>

On 06/01/2014 06:53 AM, Rickard Strandqvist wrote:
> There is a risk that the variable will be used without being initialized.
>
> This was largely found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>   fs/ocfs2/dir.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
> index 0717662..27aa4a1 100644
> --- a/fs/ocfs2/dir.c
> +++ b/fs/ocfs2/dir.c
> @@ -3738,7 +3738,7 @@ static int ocfs2_dx_dir_rebalance(struct ocfs2_super *osb, struct inode *dir,
>   	int credits, ret, i, num_used, did_quota = 0;
>   	u32 cpos, split_hash, insert_hash = hinfo->major_hash;
>   	u64 orig_leaves_start;
> -	int num_dx_leaves;
> +	int num_dx_leaves = 0;
>   	struct buffer_head **orig_dx_leaves = NULL;
>   	struct buffer_head **new_dx_leaves = NULL;
>   	struct ocfs2_alloc_context *data_ac = NULL, *meta_ac = NULL;


  reply	other threads:[~2014-06-02 18:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01 13:53 [PATCH] fs: ocfs2: dir.c: Cleaning up uninitialized variables Rickard Strandqvist
2014-06-02 18:44 ` Srinivas Eeda [this message]
2014-06-02 18:44   ` Srinivas Eeda
2014-06-02 20:22 ` [Ocfs2-devel] " Andrew Morton
2014-06-02 20:22   ` Andrew Morton
2014-06-02 22:03   ` Rickard Strandqvist

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=538CC61D.2020001@oracle.com \
    --to=srinivas.eeda@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=rickard_strandqvist@spectrumdigital.se \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.