From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755542AbaHUV6q (ORCPT ); Thu, 21 Aug 2014 17:58:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54836 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754975AbaHUV6p (ORCPT ); Thu, 21 Aug 2014 17:58:45 -0400 Date: Thu, 21 Aug 2014 14:58:44 -0700 From: Andrew Morton To: Himangi Saraogi Cc: Mark Fasheh , Joel Becker , ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: delete double assignment Message-Id: <20140821145844.a661662c0823ec930ae39a6f@linux-foundation.org> In-Reply-To: <20140728152632.GA2926@himangi-Dell> References: <20140728152632.GA2926@himangi-Dell> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Jul 2014 20:56:32 +0530 Himangi Saraogi 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: > > // > @@ > expression i; > @@ > > *i = ...; > i = ...; > // > > Signed-off-by: Himangi Saraogi > --- > Should the fist assignment be initializing the pv_minor field? I'd say so, yes. From: Andrew Morton Subject: fs/ocfs2/stack_user.c: fix typo in ocfs2_control_release() It is supposed to zero pv_minor. Reported-by: Himangi Saraogi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton --- 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: _