From patchwork Thu Nov 16 17:38:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 10061615 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8DA4C60230 for ; Thu, 16 Nov 2017 17:38:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 761C52ABA2 for ; Thu, 16 Nov 2017 17:38:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 693762ABA6; Thu, 16 Nov 2017 17:38:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB6ED2ABA2 for ; Thu, 16 Nov 2017 17:38:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751390AbdKPRiU (ORCPT ); Thu, 16 Nov 2017 12:38:20 -0500 Received: from bastet.se.axis.com ([195.60.68.11]:55507 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934432AbdKPRiS (ORCPT ); Thu, 16 Nov 2017 12:38:18 -0500 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 69A961813E; Thu, 16 Nov 2017 18:38:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id JDBcBVHTkLX6; Thu, 16 Nov 2017 18:38:16 +0100 (CET) Received: from boulder02.se.axis.com (boulder02.se.axis.com [10.0.8.16]) by bastet.se.axis.com (Postfix) with ESMTPS id D4E321858D; Thu, 16 Nov 2017 18:38:16 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C282D1A06F; Thu, 16 Nov 2017 18:38:16 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B727B1A062; Thu, 16 Nov 2017 18:38:16 +0100 (CET) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder02.se.axis.com (Postfix) with ESMTP; Thu, 16 Nov 2017 18:38:16 +0100 (CET) Received: from lnxartpec1.se.axis.com (lnxartpec1.se.axis.com [10.88.4.10]) by thoth.se.axis.com (Postfix) with ESMTP id AA853228; Thu, 16 Nov 2017 18:38:16 +0100 (CET) Received: by lnxartpec1.se.axis.com (Postfix, from userid 20283) id A43E0400FC; Thu, 16 Nov 2017 18:38:16 +0100 (CET) From: Niklas Cassel To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: Niklas Cassel , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: pmcraid: use correct size unit when calling find_first_zero_bit() Date: Thu, 16 Nov 2017 18:38:06 +0100 Message-Id: <20171116173806.18378-1-niklas.cassel@axis.com> X-Mailer: git-send-email 2.14.2 X-TM-AS-GCONF: 00 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP find_first_zero_bit()'s parameter 'size' is defined in bits, not in bytes. Signed-off-by: Niklas Cassel --- 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; }