public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi_sysfs: Fix typo in is_bin_visible()
@ 2016-03-10 10:25 Hannes Reinecke
  2016-03-10 10:40 ` Johannes Thumshirn
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Hannes Reinecke @ 2016-03-10 10:25 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, Johannes Thumshirn, James Bottomley,
	linux-scsi, Hannes Reinecke, Hannes Reinecke

The test for the existence vpd_pg83 is inverted.

Fixes: 7e47976bcff ("scsi_sysfs: add 'is_bin_visible' callback")
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/scsi_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 58ac9c1..d805d55 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -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;
-- 
1.8.5.6


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

* Re: [PATCH] scsi_sysfs: Fix typo in is_bin_visible()
  2016-03-10 10:25 [PATCH] scsi_sysfs: Fix typo in is_bin_visible() Hannes Reinecke
@ 2016-03-10 10:40 ` Johannes Thumshirn
  2016-03-10 15:25 ` Ewan Milne
  2016-03-11  1:30 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2016-03-10 10:40 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Martin K. Petersen, Christoph Hellwig, James Bottomley,
	linux-scsi, Hannes Reinecke

On Thu, Mar 10, 2016 at 11:25:26AM +0100, Hannes Reinecke wrote:
> The test for the existence vpd_pg83 is inverted.
> 
> Fixes: 7e47976bcff ("scsi_sysfs: add 'is_bin_visible' callback")
> Signed-off-by: Hannes Reinecke <hare@suse.com>

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] scsi_sysfs: Fix typo in is_bin_visible()
  2016-03-10 10:25 [PATCH] scsi_sysfs: Fix typo in is_bin_visible() Hannes Reinecke
  2016-03-10 10:40 ` Johannes Thumshirn
@ 2016-03-10 15:25 ` Ewan Milne
  2016-03-10 15:28   ` Laurence Oberman
  2016-03-11  1:30 ` Martin K. Petersen
  2 siblings, 1 reply; 5+ messages in thread
From: Ewan Milne @ 2016-03-10 15:25 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Martin K. Petersen, Christoph Hellwig, Johannes Thumshirn,
	James Bottomley, linux-scsi, Hannes Reinecke

On Thu, 2016-03-10 at 11:25 +0100, Hannes Reinecke wrote:
> The test for the existence vpd_pg83 is inverted.
> 
> Fixes: 7e47976bcff ("scsi_sysfs: add 'is_bin_visible' callback")
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> ---
>  drivers/scsi/scsi_sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
> index 58ac9c1..d805d55 100644
> --- a/drivers/scsi/scsi_sysfs.c
> +++ b/drivers/scsi/scsi_sysfs.c
> @@ -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: Ewan D. Milne <emilne@redhat.com>



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

* Re: [PATCH] scsi_sysfs: Fix typo in is_bin_visible()
  2016-03-10 15:25 ` Ewan Milne
@ 2016-03-10 15:28   ` Laurence Oberman
  0 siblings, 0 replies; 5+ messages in thread
From: Laurence Oberman @ 2016-03-10 15:28 UTC (permalink / raw)
  To: emilne
  Cc: Hannes Reinecke, Martin K. Petersen, Christoph Hellwig,
	Johannes Thumshirn, James Bottomley, linux-scsi, Hannes Reinecke

Reviewed-by:Laurence Oberman loberman@redhat.com>

Laurence Oberman
Principal Software Maintenance Engineer
Red Hat Global Support Services

----- Original Message -----
From: "Ewan Milne" <emilne@redhat.com>
To: "Hannes Reinecke" <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>, "Christoph Hellwig" <hch@lst.de>, "Johannes Thumshirn" <jthumshirn@suse.com>, "James Bottomley" <james.bottomley@hansenpartnership.com>, linux-scsi@vger.kernel.org, "Hannes Reinecke" <hare@suse.com>
Sent: Thursday, March 10, 2016 10:25:08 AM
Subject: Re: [PATCH] scsi_sysfs: Fix typo in is_bin_visible()

On Thu, 2016-03-10 at 11:25 +0100, Hannes Reinecke wrote:
> The test for the existence vpd_pg83 is inverted.
> 
> Fixes: 7e47976bcff ("scsi_sysfs: add 'is_bin_visible' callback")
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> ---
>  drivers/scsi/scsi_sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
> index 58ac9c1..d805d55 100644
> --- a/drivers/scsi/scsi_sysfs.c
> +++ b/drivers/scsi/scsi_sysfs.c
> @@ -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: Ewan D. Milne <emilne@redhat.com>


--
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] 5+ messages in thread

* Re: [PATCH] scsi_sysfs: Fix typo in is_bin_visible()
  2016-03-10 10:25 [PATCH] scsi_sysfs: Fix typo in is_bin_visible() Hannes Reinecke
  2016-03-10 10:40 ` Johannes Thumshirn
  2016-03-10 15:25 ` Ewan Milne
@ 2016-03-11  1:30 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2016-03-11  1:30 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Martin K. Petersen, Christoph Hellwig, Johannes Thumshirn,
	James Bottomley, linux-scsi, Hannes Reinecke

>>>>> "Hannes" == Hannes Reinecke <hare@suse.de> writes:

Hannes> The test for the existence vpd_pg83 is inverted.

Applied to 4.6/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2016-03-11  1:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-10 10:25 [PATCH] scsi_sysfs: Fix typo in is_bin_visible() Hannes Reinecke
2016-03-10 10:40 ` Johannes Thumshirn
2016-03-10 15:25 ` Ewan Milne
2016-03-10 15:28   ` Laurence Oberman
2016-03-11  1:30 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox