All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: pmcraid: use correct size unit when calling find_first_zero_bit()
@ 2017-11-16 17:38 Niklas Cassel
  2017-12-08  2:22 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Niklas Cassel @ 2017-11-16 17:38 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen
  Cc: Niklas Cassel, linux-scsi, linux-kernel

find_first_zero_bit()'s parameter 'size' is defined in bits,
not in bytes.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
---
 drivers/scsi/pmcraid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 4f9f115fb6a0..04ce838546f4 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -5216,7 +5216,7 @@ static unsigned short pmcraid_get_minor(void)
 {
 	int minor;
 
-	minor = find_first_zero_bit(pmcraid_minor, sizeof(pmcraid_minor));
+	minor = find_first_zero_bit(pmcraid_minor, PMCRAID_MAX_ADAPTERS);
 	__set_bit(minor, pmcraid_minor);
 	return minor;
 }
-- 
2.14.2

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

* Re: [PATCH] scsi: pmcraid: use correct size unit when calling find_first_zero_bit()
  2017-11-16 17:38 [PATCH] scsi: pmcraid: use correct size unit when calling find_first_zero_bit() Niklas Cassel
@ 2017-12-08  2:22 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2017-12-08  2:22 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: James E.J. Bottomley, Martin K. Petersen, Niklas Cassel,
	linux-scsi, linux-kernel


Niklas,

> find_first_zero_bit()'s parameter 'size' is defined in bits,
> not in bytes.

Applied to 4.16/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2017-12-08  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16 17:38 [PATCH] scsi: pmcraid: use correct size unit when calling find_first_zero_bit() Niklas Cassel
2017-12-08  2:22 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.