linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][SCSI] target: Fix double test of inquiry_prod
@ 2011-04-27 16:07 Roland Dreier
  2011-05-23 17:20 ` Roland Dreier
  0 siblings, 1 reply; 3+ messages in thread
From: Roland Dreier @ 2011-04-27 16:07 UTC (permalink / raw)
  To: Nicholas A. Bellinger, linux-scsi

From: Roland Dreier <roland@purestorage.com>

The code really intends to make sure that neither inquiry_prod nor
inquiry_rev is NULL.

Signed-off-by: Roland Dreier <roland@purestorage.com>
---
 drivers/target/target_core_transport.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 9583b23..4a03098 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1725,7 +1725,7 @@ struct se_device *transport_add_device_to_core_hba(
 	 * setup.
 	 */
 	if (TRANSPORT(dev)->transport_type != TRANSPORT_PLUGIN_PHBA_PDEV) {
-		if (!(inquiry_prod) || !(inquiry_prod)) {
+		if (!inquiry_prod || !inquiry_rev) {
 			printk(KERN_ERR "All non TCM/pSCSI plugins require"
 				" INQUIRY consts\n");
 			goto out;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][SCSI] target: Fix double test of inquiry_prod
  2011-04-27 16:07 [PATCH][SCSI] target: Fix double test of inquiry_prod Roland Dreier
@ 2011-05-23 17:20 ` Roland Dreier
  2011-05-23 19:21   ` Nicholas A. Bellinger
  0 siblings, 1 reply; 3+ messages in thread
From: Roland Dreier @ 2011-05-23 17:20 UTC (permalink / raw)
  To: Nicholas A. Bellinger, linux-scsi

On Wed, Apr 27, 2011 at 9:07 AM, Roland Dreier <roland@kernel.org> wrote:
> From: Roland Dreier <roland@purestorage.com>
>
> The code really intends to make sure that neither inquiry_prod nor
> inquiry_rev is NULL.
>
> Signed-off-by: Roland Dreier <roland@purestorage.com>
> ---
>  drivers/target/target_core_transport.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
> index 9583b23..4a03098 100644
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@ -1725,7 +1725,7 @@ struct se_device *transport_add_device_to_core_hba(
>         * setup.
>         */
>        if (TRANSPORT(dev)->transport_type != TRANSPORT_PLUGIN_PHBA_PDEV) {
> -               if (!(inquiry_prod) || !(inquiry_prod)) {
> +               if (!inquiry_prod || !inquiry_rev) {
>                        printk(KERN_ERR "All non TCM/pSCSI plugins require"
>                                " INQUIRY consts\n");
>                        goto out;
>

Hi Nick, did you ever get a chance to look at this?  Seems pretty obvious to me.
--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][SCSI] target: Fix double test of inquiry_prod
  2011-05-23 17:20 ` Roland Dreier
@ 2011-05-23 19:21   ` Nicholas A. Bellinger
  0 siblings, 0 replies; 3+ messages in thread
From: Nicholas A. Bellinger @ 2011-05-23 19:21 UTC (permalink / raw)
  To: Roland Dreier; +Cc: linux-scsi, James Bottomley, Andy Grover

On Mon, 2011-05-23 at 10:20 -0700, Roland Dreier wrote:
> On Wed, Apr 27, 2011 at 9:07 AM, Roland Dreier <roland@kernel.org> wrote:
> > From: Roland Dreier <roland@purestorage.com>
> >
> > The code really intends to make sure that neither inquiry_prod nor
> > inquiry_rev is NULL.
> >
> > Signed-off-by: Roland Dreier <roland@purestorage.com>
> > ---
> >  drivers/target/target_core_transport.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
> > index 9583b23..4a03098 100644
> > --- a/drivers/target/target_core_transport.c
> > +++ b/drivers/target/target_core_transport.c
> > @@ -1725,7 +1725,7 @@ struct se_device *transport_add_device_to_core_hba(
> >         * setup.
> >         */
> >        if (TRANSPORT(dev)->transport_type != TRANSPORT_PLUGIN_PHBA_PDEV) {
> > -               if (!(inquiry_prod) || !(inquiry_prod)) {
> > +               if (!inquiry_prod || !inquiry_rev) {
> >                        printk(KERN_ERR "All non TCM/pSCSI plugins require"
> >                                " INQUIRY consts\n");
> >                        goto out;
> >
> 
> Hi Nick, did you ever get a chance to look at this?  Seems pretty obvious to me.

Hey Roland,

This has been included in upstream LIO v4.1, and I have been intending
to include in a non-critical for-40 series (post for-40 round 1 +
iscsi-target merge) later this week along with some of Andy's other
target core cleanups and improvements that have been merged into LIO
upstream.

James, would you mind including Roland's patch directly in scsi-misc
with my signoff after you merge the outstanding target for-40 series
items..?

Thanks,

--nab


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-23 19:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 16:07 [PATCH][SCSI] target: Fix double test of inquiry_prod Roland Dreier
2011-05-23 17:20 ` Roland Dreier
2011-05-23 19:21   ` Nicholas A. Bellinger

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