From: Andrew Morton <akpm@linux-foundation.org>
To: Himangi Saraogi <himangi774@gmail.com>
Cc: Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>,
ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org,
julia.lawall@lip6.fr
Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: delete double assignment
Date: Thu, 21 Aug 2014 14:58:44 -0700 [thread overview]
Message-ID: <20140821145844.a661662c0823ec930ae39a6f@linux-foundation.org> (raw)
In-Reply-To: <20140728152632.GA2926@himangi-Dell>
On Mon, 28 Jul 2014 20:56:32 +0530 Himangi Saraogi <himangi774@gmail.com> wrote:
> Delete successive assignments to the same location. The two assignments are
> simply identical.
>
> A simplified version of Coccinelle semantic match that finds this problem is as
> follows:
>
> // <smpl>
> @@
> expression i;
> @@
>
> *i = ...;
> i = ...;
> // </smpl>
>
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
> ---
> Should the fist assignment be initializing the pv_minor field?
I'd say so, yes.
From: Andrew Morton <akpm@linux-foundation.org>
Subject: fs/ocfs2/stack_user.c: fix typo in ocfs2_control_release()
It is supposed to zero pv_minor.
Reported-by: Himangi Saraogi <himangi774@gmail.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/ocfs2/stack_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN fs/ocfs2/stack_user.c~fs-ocfs2-stack_userc-fix-typo-in-ocfs2_control_release fs/ocfs2/stack_user.c
--- a/fs/ocfs2/stack_user.c~fs-ocfs2-stack_userc-fix-typo-in-ocfs2_control_release
+++ a/fs/ocfs2/stack_user.c
@@ -591,7 +591,7 @@ static int ocfs2_control_release(struct
*/
ocfs2_control_this_node = -1;
running_proto.pv_major = 0;
- running_proto.pv_major = 0;
+ running_proto.pv_minor = 0;
}
out:
_
prev parent reply other threads:[~2014-08-21 21:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 15:26 Himangi Saraogi
2014-08-21 21:58 ` Andrew Morton [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=20140821145844.a661662c0823ec930ae39a6f@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=himangi774@gmail.com \
--cc=jlbec@evilplan.org \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=mfasheh@suse.com \
--cc=ocfs2-devel@oss.oracle.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
all inboxes | Powered by JetHome®