From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Adaptec OEM Raid Solutions <aacraid@adaptec.com>,
kernel-janitors@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, joe@perches.com
Subject: Re: [PATCH 1/1] dpt_i2o: delete unnecessary null test on array
Date: Fri, 08 Aug 2014 17:14:05 +0000 [thread overview]
Message-ID: <1407518045.1686.0.camel@HansenPartnership.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1408081902400.2348@hadrien>
On Fri, 2014-08-08 at 19:03 +0200, Julia Lawall wrote:
> > > diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
> > > index 67283ef..62e276b 100644
> > > --- a/drivers/scsi/dpt_i2o.c
> > > +++ b/drivers/scsi/dpt_i2o.c
> > > @@ -1169,11 +1169,6 @@ static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u6
> > > if(chan < 0 || chan >= MAX_CHANNEL)
> > > return NULL;
> > >
> > > - if( pHba->channel[chan].device = NULL){
> > > - printk(KERN_DEBUG"Adaptec I2O RAID: Trying to find device before they are allocated\n");
> > > - return NULL;
> > > - }
> >
> > dpt_i2o is always weirdly fun, but I think, based on the message, this
> > check is supposed to be
> >
> > if( pHba->channel[chan].device[id] = NULL){
> >
> > Since device is an array of device pointers which are allocated by
> > parsing data.
>
> That seems to be already checked immediately below:
>
> d = pHba->channel[chan].device[id];
> if(!d || d->tid = 0) {
> return NULL;
Yes, I know, but no message is emitted. The message seems to be for a
violation of the state machine which device[id] = NULL implies.
James
WARNING: multiple messages have this Message-ID (diff)
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Adaptec OEM Raid Solutions <aacraid@adaptec.com>,
kernel-janitors@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, joe@perches.com
Subject: Re: [PATCH 1/1] dpt_i2o: delete unnecessary null test on array
Date: Fri, 08 Aug 2014 10:14:05 -0700 [thread overview]
Message-ID: <1407518045.1686.0.camel@HansenPartnership.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1408081902400.2348@hadrien>
On Fri, 2014-08-08 at 19:03 +0200, Julia Lawall wrote:
> > > diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
> > > index 67283ef..62e276b 100644
> > > --- a/drivers/scsi/dpt_i2o.c
> > > +++ b/drivers/scsi/dpt_i2o.c
> > > @@ -1169,11 +1169,6 @@ static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u6
> > > if(chan < 0 || chan >= MAX_CHANNEL)
> > > return NULL;
> > >
> > > - if( pHba->channel[chan].device == NULL){
> > > - printk(KERN_DEBUG"Adaptec I2O RAID: Trying to find device before they are allocated\n");
> > > - return NULL;
> > > - }
> >
> > dpt_i2o is always weirdly fun, but I think, based on the message, this
> > check is supposed to be
> >
> > if( pHba->channel[chan].device[id] == NULL){
> >
> > Since device is an array of device pointers which are allocated by
> > parsing data.
>
> That seems to be already checked immediately below:
>
> d = pHba->channel[chan].device[id];
> if(!d || d->tid == 0) {
> return NULL;
Yes, I know, but no message is emitted. The message seems to be for a
violation of the state machine which device[id] = NULL implies.
James
next prev parent reply other threads:[~2014-08-08 17:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 10:39 [PATCH 0/1] delete unnecessary null test on array Julia Lawall
2014-08-06 10:39 ` Julia Lawall
2014-08-06 10:39 ` [PATCH 1/1] dpt_i2o: " Julia Lawall
2014-08-06 10:39 ` Julia Lawall
2014-08-08 14:38 ` walter harms
2014-08-08 14:38 ` walter harms
2014-08-08 16:59 ` James Bottomley
2014-08-08 16:59 ` James Bottomley
2014-08-08 17:03 ` Julia Lawall
2014-08-08 17:03 ` Julia Lawall
2014-08-08 17:14 ` James Bottomley [this message]
2014-08-08 17:14 ` James Bottomley
2014-08-08 17:16 ` Julia Lawall
2014-08-08 17:16 ` Julia Lawall
2014-08-09 6:26 ` Julia Lawall
2014-08-09 6:26 ` Julia Lawall
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=1407518045.1686.0.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=aacraid@adaptec.com \
--cc=joe@perches.com \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.