target: Fix double test of inquiry_prod
Subsystems (2)
PATCH 1/1 target: Fix double test of inquiry_prod
From: Roland Dreier <[email protected]>
The code really intends to make sure that neither inquiry_prod nor inquiry_rev is NULL.
--- drivers/target/target_core_transport.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/target/target_core_transport.c +1 -1
@@ -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;
Quoted 20 lines · Roland Dreier
From: Roland Dreier <[email protected]>
The code really intends to make sure that neither
inquiry_prodnorinquiry_revis NULL.Signed-off-by Roland Dreier <[email protected]>---
drivers/target/target_core_transport.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)drivers/target/target_core_transport.c +1
-1@@ -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) {
Quoted 4 lines
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 11 lines · Roland Dreier
Quoted 10 lines · Roland Dreier
From: Roland Dreier <[email protected]>
The code really intends to make sure that neither
inquiry_prodnorinquiry_revis NULL.Signed-off-by Roland Dreier <[email protected]>--- drivers/target/target_core_transport.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 16 lines
Quoted 6 lines
drivers/target/target_core_transport.c +0
-0drivers/target/target_core_transport.c struct se_device *transport_add_device_to_core_hba( · line 1731
Quoted 8 lines
drivers/target/target_core_transport.c +1
-1@@ -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