linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomas Henzl <thenzl@redhat.com>
To: Joel Stanley <joel@jms.id.au>, Johannes Thumshirn <jthumshirn@suse.de>
Cc: jayamohan.kallickal@avagotech.com, minh.tran@avagotech.com,
	sony.john-n@avagotech.com, JBottomley@odin.com,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] be2iscsi: Fix bad WARN_ON
Date: Fri, 2 Oct 2015 14:22:40 +0200	[thread overview]
Message-ID: <560E7710.8080703@redhat.com> (raw)
In-Reply-To: <CACPK8XfROyJM_nuZdLEY49HZH+arQjqCmqiKNo+821gMPvCxMQ@mail.gmail.com>

On 2.10.2015 02:52, Joel Stanley wrote:
> On Thu, Oct 1, 2015 at 6:01 PM, Johannes Thumshirn <jthumshirn@suse.de> wrote:
>>> diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
>>> index 7a6dbfb..0b87abb 100644
>>> --- a/drivers/scsi/be2iscsi/be_main.c
>>> +++ b/drivers/scsi/be2iscsi/be_main.c
>>> @@ -3184,7 +3184,7 @@ be_sgl_create_contiguous(void *virtual_address,
>>>  {
>>>       WARN_ON(!virtual_address);
>>>       WARN_ON(!physical_address);
>>> -     WARN_ON(!length > 0);
>>> +     WARN_ON(!(length > 0));
>> Why aren't you doing WARN_ON(length <= 0); it's much nicer to read IMHO
> Sure, I'll resend.

length is unsigned, so maybe just (!length) ?

> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


      reply	other threads:[~2015-10-02 12:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01  8:02 [PATCH] be2iscsi: Fix bad WARN_ON Joel Stanley
2015-10-01  8:31 ` Johannes Thumshirn
2015-10-02  0:52   ` Joel Stanley
2015-10-02 12:22     ` Tomas Henzl [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=560E7710.8080703@redhat.com \
    --to=thenzl@redhat.com \
    --cc=JBottomley@odin.com \
    --cc=jayamohan.kallickal@avagotech.com \
    --cc=joel@jms.id.au \
    --cc=jthumshirn@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=minh.tran@avagotech.com \
    --cc=sony.john-n@avagotech.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;
as well as URLs for NNTP newsgroup(s).