Skip to contentSkip to conversation

scsi_sysfs: Fix typo in is_bin_visible()

PATCH Applied Hannes Reinecke 5 participants 5 messages Mar 10, 2016 – Mar 11, 2016 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi_sysfs: Fix typo in is_bin_visible()

The test for the existence vpd_pg83 is inverted.

Fixes 7e47976bcff ("scsi_sysfs: add 'is_bin_visible' callback")
---
 drivers/scsi/scsi_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_sysfs.c +1 -1
index 58ac9c1..d805d55 100644
@@ -1105,7 +1105,7 @@ static umode_t scsi_sdev_bin_attr_is_visible(struct kobject *kobj,
 	if (attr == &dev_attr_vpd_pg80 && !sdev->vpd_pg80)
 		return 0;
 
-	if (attr == &dev_attr_vpd_pg83 && sdev->vpd_pg83)
+	if (attr == &dev_attr_vpd_pg83 && !sdev->vpd_pg83)
 		return 0;
 
 	return S_IRUGO;
Signature · 1 line
1.8.5.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Hannes Reinecke

The test for the existence vpd_pg83 is inverted.

Fixes 7e47976bcff ("scsi_sysfs: add 'is_bin_visible' callback")
Signature · 10 lines
Johannes Thumshirn                                          Storage
[email protected]                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
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
Reviewed-by on v1 1/1
#2 lore raw
In reply to Hannes Reinecke
Quoted 13 lines · Hannes Reinecke

The test for the existence vpd_pg83 is inverted.

Fixes 7e47976bcff ("scsi_sysfs: add 'is_bin_visible' callback")
---
 drivers/scsi/scsi_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_sysfs.c +0 -0
index 58ac9c1..d805d55 100644

drivers/scsi/scsi_sysfs.c static umode_t scsi_sdev_bin_attr_is_visible(struct kobject *kobj, · line 1111

Quoted 8 lines
drivers/scsi/scsi_sysfs.c +1 -1
@@ -1105,7 +1105,7 @@ static umode_t scsi_sdev_bin_attr_is_visible(struct kobject *kobj,
 	if (attr == &dev_attr_vpd_pg80 && !sdev->vpd_pg80)
 		return 0;
 
-	if (attr == &dev_attr_vpd_pg83 && sdev->vpd_pg83)
+	if (attr == &dev_attr_vpd_pg83 && !sdev->vpd_pg83)
 		return 0;
 
 	return S_IRUGO;
Reviewed-by Reviewed-by Ewan D. Milne
#3 lore raw

Laurence Oberman
Principal Software Maintenance Engineer
Red Hat Global Support Services

----- Original Message -----
From: "Ewan Milne" <[email protected]>
To: "Hannes Reinecke" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>, "Christoph Hellwig" <[email protected]>, "Johannes Thumshirn" <[email protected]>, "James Bottomley" <[email protected]>, [email protected], "Hannes Reinecke" <[email protected]>
Sent: Thursday, March 10, 2016 10:25:08 AM
Subject: Re: [PATCH] scsi_sysfs: Fix typo in is_bin_visible()

Quoted 13 lines · Hannes Reinecke

The test for the existence vpd_pg83 is inverted.

Fixes 7e47976bcff ("scsi_sysfs: add 'is_bin_visible' callback")
---
 drivers/scsi/scsi_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_sysfs.c +0 -0
index 58ac9c1..d805d55 100644

drivers/scsi/scsi_sysfs.c static umode_t scsi_sdev_bin_attr_is_visible(struct kobject *kobj, · line 1111

Quoted 8 lines
drivers/scsi/scsi_sysfs.c +1 -1
@@ -1105,7 +1105,7 @@ static umode_t scsi_sdev_bin_attr_is_visible(struct kobject *kobj,
 	if (attr == &dev_attr_vpd_pg80 && !sdev->vpd_pg80)
 		return 0;
 
-	if (attr == &dev_attr_vpd_pg83 && sdev->vpd_pg83)
+	if (attr == &dev_attr_vpd_pg83 && !sdev->vpd_pg83)
 		return 0;
 
 	return S_IRUGO;

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