From patchwork Tue Oct 18 11:16:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 4083 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1887578wrs; Tue, 18 Oct 2022 03:52:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48sDfPCOcU7YDSPxFa2sEC14HAii7boUVgjW/wIaU7/RM4kCddGQ5PP02poomjU/fMvh88 X-Received: by 2002:a17:907:320c:b0:77b:6f08:9870 with SMTP id xg12-20020a170907320c00b0077b6f089870mr1867262ejb.249.1666090379544; Tue, 18 Oct 2022 03:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666090379; cv=none; d=google.com; s=arc-20160816; b=m4ihm5tf5R6vf6unQkfPBPvCDNF63O2bpyMDbzHYS435ZKQxpjL4byET2X8z80qZhk h8szlj709ntaYssiiM2CsBmEPRuHSK9JPrwlv0K8cCNa7wRJrNe5n8jyWTlYHvtrgCnd MtZgm4+TfV6y5yTaBAA18Z30W7CdRAQVHry26FyKrfbqQJRrLQxCElGHQ7qT1byh1tdJ oePSOeSUf8Wb6oI7N2p0DbZ0ed/fMYltl0QuAactN+hqGMimmz78tmjrok5CMYycwhW2 rrOZlod964xPnJ/iEZfCMIIJjVVqhcDUqD2tB/U7pEqMnbLb/W5Nd2P2hR8K8/YhVMMy TazA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=xfqtzOFy8EmiMm4hOrwETKqvgNKmDTtzdKVLNIWSG8E=; b=cIsA6ByVtA15148jOwZNIBhyEY6WqzOuXDpcsJt8xIJoQ7GulR//MczOU/LuHWJF+i NJ+FW39Ogvjy8JfRDU6ErFbra0ASCzoP9i3Fn31yiU7u7RX8OgD494lWU/lbASGcHrs8 vvmSBZRT7ALWkUnBlNertAxRICyL6n23h2sGBWAC+vkWNzZWCsqhVr4fM2Zty7Q6K0k6 W3q/ZxGLbh3e6tqCt232ijGD8ZjuPVGuuuUizpAmPOp2lj9oXtyUX5rbd6eSIDe2qAre SWOH5aqkq7GfSQ80kGj2Iq+dO6oebY5BHpPkzWj4ynrsAQWPerU522ESvarE/IzTe+wP NLjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a50d751000000b00447a8836a56si11533851edj.208.2022.10.18.03.52.34; Tue, 18 Oct 2022 03:52:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230104AbiJRKqv (ORCPT + 99 others); Tue, 18 Oct 2022 06:46:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230025AbiJRKqI (ORCPT ); Tue, 18 Oct 2022 06:46:08 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0BC5B5154; Tue, 18 Oct 2022 03:45:59 -0700 (PDT) Received: from fraeml711-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Ms9TV1QFSz67hlj; Tue, 18 Oct 2022 18:44:14 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml711-chm.china.huawei.com (10.206.15.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 12:45:56 +0200 Received: from localhost.localdomain (10.69.192.58) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 11:45:53 +0100 From: John Garry To: , , , CC: , , , , , , John Garry Subject: [PATCH v4 6/7] scsi: mvsas: Delete mvs_tag_init() Date: Tue, 18 Oct 2022 19:16:02 +0800 Message-ID: <1666091763-11023-7-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1666091763-11023-1-git-send-email-john.garry@huawei.com> References: <1666091763-11023-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747022385963050707?= X-GMAIL-MSGID: =?utf-8?q?1747022385963050707?= All mvs_tag_init() does is zero the tag bitmap, but this is already done with the kzalloc() call to alloc the tags, so delete this unneeded function. Signed-off-by: John Garry Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke --- drivers/scsi/mvsas/mv_init.c | 2 -- drivers/scsi/mvsas/mv_sas.c | 7 ------- drivers/scsi/mvsas/mv_sas.h | 1 - 3 files changed, 10 deletions(-) diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index 2fde496fff5f..c85fb812ad43 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -286,8 +286,6 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) } mvi->tags_num = slot_nr; - /* Initialize tags */ - mvs_tag_init(mvi); return 0; err_out: return 1; diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index bf7d4995b257..3aed5e3e0c8c 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c @@ -51,13 +51,6 @@ inline int mvs_tag_alloc(struct mvs_info *mvi, u32 *tag_out) return 0; } -void mvs_tag_init(struct mvs_info *mvi) -{ - int i; - for (i = 0; i < mvi->tags_num; ++i) - mvs_tag_clear(mvi, i); -} - static struct mvs_info *mvs_find_dev_mvi(struct domain_device *dev) { unsigned long i = 0, j = 0, hi = 0; diff --git a/drivers/scsi/mvsas/mv_sas.h b/drivers/scsi/mvsas/mv_sas.h index 509d8f32a04f..fe57665bdb50 100644 --- a/drivers/scsi/mvsas/mv_sas.h +++ b/drivers/scsi/mvsas/mv_sas.h @@ -428,7 +428,6 @@ void mvs_tag_clear(struct mvs_info *mvi, u32 tag); void mvs_tag_free(struct mvs_info *mvi, u32 tag); void mvs_tag_set(struct mvs_info *mvi, unsigned int tag); int mvs_tag_alloc(struct mvs_info *mvi, u32 *tag_out); -void mvs_tag_init(struct mvs_info *mvi); void mvs_iounmap(void __iomem *regs); int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex); void mvs_phys_reset(struct mvs_info *mvi, u32 phy_mask, int hard);