From patchwork Mon Aug 14 14:03:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Battersby X-Patchwork-Id: 713757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 587EFC001B0 for ; Mon, 14 Aug 2023 14:18:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231313AbjHNORi (ORCPT ); Mon, 14 Aug 2023 10:17:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbjHNORJ (ORCPT ); Mon, 14 Aug 2023 10:17:09 -0400 X-Greylist: delayed 817 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 14 Aug 2023 07:17:04 PDT Received: from mail.cybernetics.com (mail.cybernetics.com [72.215.153.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E02A110C for ; Mon, 14 Aug 2023 07:17:04 -0700 (PDT) X-ASG-Debug-ID: 1692021805-1cf4391f272bf8d0001-ziuLRu Received: from cybernetics.com ([10.10.4.126]) by mail.cybernetics.com with ESMTP id mZQ2l6KASByIrRMF; Mon, 14 Aug 2023 10:03:25 -0400 (EDT) X-Barracuda-Envelope-From: tonyb@cybernetics.com X-Barracuda-RBL-Trusted-Forwarder: 10.10.4.126 X-ASG-Whitelist: Client DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cybernetics.com; s=mail; bh=iQfR5vLmXGc4HMtmvXiD/sEfK38zd70i4TT0WEF+G84=; h=Content-Transfer-Encoding:Content-Type:Subject:From:Cc:To:Content-Language: MIME-Version:Date:Message-ID; b=A8RDNRvnHHt9OA0pExFalEBGAvfKaex1St/nWZDCxvX0d fkNZ+lR4RGlqzvP4LQsEaTpbMr90w8fhXs88B3NiaJ0/sFS8CjU62rHQlnhYxoHvGUme5oxq85Pok 7flClbLt0W8L9wqcUKGXMECrwnZblJcQuMIRYL0NMRluuobho= Received: from [10.157.2.224] (HELO [192.168.200.1]) by cybernetics.com (CommuniGate Pro SMTP 7.1.1) with ESMTPS id 12767503; Mon, 14 Aug 2023 10:03:25 -0400 Message-ID: X-Barracuda-RBL-Trusted-Forwarder: 10.157.2.224 Date: Mon, 14 Aug 2023 10:03:25 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: linux-scsi , "linux-kernel@vger.kernel.org" From: Tony Battersby Subject: [PATCH] scsi: core: Use 32-bit hostnum in scsi_host_lookup() X-ASG-Orig-Subj: [PATCH] scsi: core: Use 32-bit hostnum in scsi_host_lookup() X-Barracuda-Connect: UNKNOWN[10.10.4.126] X-Barracuda-Start-Time: 1692021805 X-Barracuda-URL: https://10.10.4.122:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 0 X-Virus-Scanned: by bsmtpd at cybernetics.com X-Barracuda-Scan-Msg-Size: 1994 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Change scsi_host_lookup() hostnum argument type from unsigned short to unsigned int to match the type used everywhere else. Fixes: 6d49f63b415c ("[SCSI] Make host_no an unsigned int") Signed-off-by: Tony Battersby --- drivers/scsi/hosts.c | 4 ++-- include/scsi/scsi_host.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) base-commit: 2ccdd1b13c591d306f0401d98dedc4bdcd02b421 diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 198edf03f929..d7f51b84f3c7 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -537,7 +537,7 @@ EXPORT_SYMBOL(scsi_host_alloc); static int __scsi_host_match(struct device *dev, const void *data) { struct Scsi_Host *p; - const unsigned short *hostnum = data; + const unsigned int *hostnum = data; p = class_to_shost(dev); return p->host_no == *hostnum; @@ -554,7 +554,7 @@ static int __scsi_host_match(struct device *dev, const void *data) * that scsi_host_get() took. The put_device() below dropped * the reference from class_find_device(). **/ -struct Scsi_Host *scsi_host_lookup(unsigned short hostnum) +struct Scsi_Host *scsi_host_lookup(unsigned int hostnum) { struct device *cdev; struct Scsi_Host *shost = NULL; diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 70b7475dcf56..a2b8d30c4c80 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -769,7 +769,7 @@ extern void scsi_remove_host(struct Scsi_Host *); extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *); extern int scsi_host_busy(struct Scsi_Host *shost); extern void scsi_host_put(struct Scsi_Host *t); -extern struct Scsi_Host *scsi_host_lookup(unsigned short); +extern struct Scsi_Host *scsi_host_lookup(unsigned int hostnum); extern const char *scsi_host_state_name(enum scsi_host_state); extern void scsi_host_complete_all_commands(struct Scsi_Host *shost, enum scsi_host_status status);