LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] mptsas: remove pointless null check
Date: Mon, 13 Oct 2008 10:22:58 -0400	[thread overview]
Message-ID: <1223907778.5566.3.camel@localhost.localdomain> (raw)
In-Reply-To: <20081013150529.75f22702@lxorguk.ukuu.org.uk>

On Mon, 2008-10-13 at 15:05 +0100, Alan Cox wrote:
> mptsas: remove unneeded check
> 
> From: Alan Cox <alan@redhat.com>
> 
> >From coverity checker. Closes #9675
> 
> Signed-off-by: Alan Cox <alan@redhat.com>
> ---
> 
>  drivers/message/fusion/mptsas.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)

-EWRONGLIST

This is a SCSI patch (although I admit with fusion sitting in
drivers/message it's hard to tell without looking in the MAINTAINERS
file).

> 
> diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
> index 12b7325..a9019f0 100644
> --- a/drivers/message/fusion/mptsas.c
> +++ b/drivers/message/fusion/mptsas.c
> @@ -2279,9 +2279,8 @@ mptsas_delete_expander_phys(MPT_ADAPTER *ioc)
>  	mutex_lock(&ioc->sas_topology_mutex);
>  	list_for_each_entry_safe(port_info, n, &ioc->sas_topology, list) {
>  
> -		if (port_info->phy_info &&

If I remember rightly this check is necessary because phy_info can be
NULL in certain situations.  Your patch will trip this to oops.  What
your description needs to say is that we no longer need to check this
pointer for NULL because it was checked somewhere else in the stack ...
but I can't see where that is, where is it?

> -		    (!(port_info->phy_info[0].identify.device_info &
> -		    MPI_SAS_DEVICE_INFO_SMP_TARGET)))
> +		if (!(port_info->phy_info[0].identify.device_info &
> +		    MPI_SAS_DEVICE_INFO_SMP_TARGET))
>  			continue;
>  
>  		if (mptsas_sas_expander_pg0(ioc, &buffer,

James



  reply	other threads:[~2008-10-13 14:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-06 17:26 [PATCH] pata_of_platform: fix no irq handling Anton Vorontsov
2008-10-06 20:41 ` Matt Sealey
2008-10-06 21:32   ` Anton Vorontsov
2008-10-07  1:30     ` Tejun Heo
2008-10-07  9:18       ` Wang Jian
2008-10-07  9:26       ` Anton Vorontsov
2008-10-07 10:04         ` Benjamin Herrenschmidt
2008-10-07  9:37       ` Alan Cox
2008-10-08  8:40         ` David Woodhouse
2008-10-08  9:00           ` Alan Cox
2008-10-08  9:59             ` Geert Uytterhoeven
2008-10-08 10:27               ` Alan Cox
2008-10-10 17:55               ` Paul Mundt
2008-10-13  6:56 ` Tejun Heo
2008-10-13 13:27   ` Jeff Garzik
2008-10-13 13:53     ` Tejun Heo
2008-10-13 14:02     ` I have returned! Alan Cox
2008-10-16  9:40       ` Jeff Garzik
2008-10-13 14:04     ` [PATCH] fusion: remove dead mpt lan code Alan Cox
2008-10-13 14:05     ` [PATCH] mptsas: remove pointless null check Alan Cox
2008-10-13 14:22       ` James Bottomley [this message]
2008-10-13 14:37         ` Alan Cox
2008-10-13 23:27   ` [PATCH] pata_of_platform: fix no irq handling Benjamin Herrenschmidt

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=1223907778.5566.3.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --subject='Re: [PATCH] mptsas: remove pointless null check' \
    /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

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).