From: Dan Carpenter <error27@gmail.com>
To: Christine Caulfield <ccaulfie@redhat.com>
Cc: David Teigland <teigland@redhat.com>,
Steven Whitehouse <swhiteho@redhat.com>,
cluster-devel@redhat.com, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] dlm: cleanup remove unused code
Date: Mon, 22 Mar 2010 15:03:54 +0300 [thread overview]
Message-ID: <20100322120354.GB21571@bicker> (raw)
Smatch complains because "lkb" is never NULL. Looking at it, the original
code actually adds the new element to the end of the list fine, so we can
just get rid of the if condition. This code is four years old and no one
has complained so it must work.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index 46ffd3e..f162de5 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -732,10 +732,7 @@ static void lkb_add_ordered(struct list_head *new, struct list_head *head,
if (lkb->lkb_rqmode < mode)
break;
- if (!lkb)
- list_add_tail(new, head);
- else
- __list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
+ __list_add(new, lkb->lkb_statequeue.prev, &lkb->lkb_statequeue);
}
/* add/remove lkb to rsb's grant/convert/wait queue */
next reply other threads:[~2010-03-22 12:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 12:03 Dan Carpenter [this message]
2010-03-22 13:50 ` [patch] dlm: cleanup remove unused code David Teigland
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=20100322120354.GB21571@bicker \
--to=error27@gmail.com \
--cc=ccaulfie@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swhiteho@redhat.com \
--cc=teigland@redhat.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