From: Andrzej Hajda <a.hajda@samsung.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
Andreas Dilger <andreas.dilger@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
lustre-devel@lists.lustre.org (moderated list:STAGING - LUSTRE
PARALLEL FILESYSTEM)
Cc: Andrzej Hajda <a.hajda@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
devel@driverdev.osuosl.org (open list:STAGING SUBSYSTEM),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] staging: lustre: remove useless check
Date: Wed, 30 Dec 2015 12:18:43 +0100 [thread overview]
Message-ID: <1451474324-15481-2-git-send-email-a.hajda@samsung.com> (raw)
In-Reply-To: <1451474324-15481-1-git-send-email-a.hajda@samsung.com>
Variable reserved is unsigned so the check is always true.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
drivers/staging/lustre/lustre/llite/rw.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c
index 95cdb0c..2fd07a2 100644
--- a/drivers/staging/lustre/lustre/llite/rw.c
+++ b/drivers/staging/lustre/lustre/llite/rw.c
@@ -764,7 +764,6 @@ int ll_readahead(const struct lu_env *env, struct cl_io *io,
ret = ll_read_ahead_pages(env, io, queue,
ria, &reserved, mapping, &ra_end);
- LASSERTF(reserved >= 0, "reserved %lu\n", reserved);
if (reserved != 0)
ll_ra_count_put(ll_i2sbi(inode), reserved);
--
1.9.1
next prev parent reply other threads:[~2015-12-30 11:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-30 11:18 [PATCH] cpufreq-dt: fix handling regulator_get_voltage result Andrzej Hajda
2015-12-30 11:18 ` Andrzej Hajda [this message]
2015-12-30 11:18 ` [PATCH] scsi_transport_fc: remove useless check Andrzej Hajda
2016-01-04 5:28 ` [PATCH] cpufreq-dt: fix handling regulator_get_voltage result Viresh Kumar
2016-01-05 13:03 ` Rafael J. Wysocki
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=1451474324-15481-2-git-send-email-a.hajda@samsung.com \
--to=a.hajda@samsung.com \
--cc=andreas.dilger@intel.com \
--cc=b.zolnierkie@samsung.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=m.szyprowski@samsung.com \
--cc=oleg.drokin@intel.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