From: Roel Kluin <roel.kluin@gmail.com>
To: abjoglek@cisco.com
Cc: linux-scsi@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] remove redundant BUG_ON
Date: Mon, 22 Jun 2009 19:43:51 +0200 [thread overview]
Message-ID: <4A3FC2D7.60400@gmail.com> (raw)
sg_count is unsigned so if negative a wrap occurs and the second BUG_ON
catches it.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index eabf365..c57cff4 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -260,7 +260,6 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic,
char msg[2];
if (sg_count) {
- BUG_ON(sg_count < 0);
BUG_ON(sg_count > FNIC_MAX_SG_DESC_CNT);
/* For each SGE, create a device desc entry */
next reply other threads:[~2009-06-22 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 17:43 Roel Kluin [this message]
2009-06-22 16:02 ` [PATCH] remove redundant BUG_ON Mike Christie
-- strict thread matches above, loose matches on Subject: below --
2009-06-22 17:54 Roel Kluin
2009-06-22 18:15 ` Abhijeet Joglekar (abjoglek)
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=4A3FC2D7.60400@gmail.com \
--to=roel.kluin@gmail.com \
--cc=abjoglek@cisco.com \
--cc=akpm@linux-foundation.org \
--cc=linux-scsi@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).