From patchwork Tue Apr 7 09:28:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11477791 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7EB041805 for ; Tue, 7 Apr 2020 09:30:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5D7F420731 for ; Tue, 7 Apr 2020 09:30:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728091AbgDGJaJ (ORCPT ); Tue, 7 Apr 2020 05:30:09 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12619 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726637AbgDGJaJ (ORCPT ); Tue, 7 Apr 2020 05:30:09 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 597CA9DB787C0BBBCC12; Tue, 7 Apr 2020 17:30:03 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Tue, 7 Apr 2020 17:29:54 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan Subject: [PATCH 1/4] scsi: megaraid: make two symbols static in megaraid_mbox.c Date: Tue, 7 Apr 2020 17:28:24 +0800 Message-ID: <20200407092827.18074-2-yanaijie@huawei.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200407092827.18074-1-yanaijie@huawei.com> References: <20200407092827.18074-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following sparse warning: drivers/scsi/megaraid/megaraid_mbox.c:305:5: warning: symbol 'dev_attr_megaraid_mbox_app_hndl' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_mbox.c:315:5: warning: symbol 'dev_attr_megaraid_mbox_ld' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/megaraid/megaraid_mbox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 8443f2f35be2..8f918df631bf 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -302,8 +302,8 @@ static struct pci_driver megaraid_pci_driver = { // definitions for the device attributes for exporting logical drive number // for a scsi address (Host, Channel, Id, Lun) -DEVICE_ATTR(megaraid_mbox_app_hndl, S_IRUSR, megaraid_sysfs_show_app_hndl, - NULL); +static DEVICE_ATTR(megaraid_mbox_app_hndl, S_IRUSR, megaraid_sysfs_show_app_hndl, + NULL); // Host template initializer for megaraid mbox sysfs device attributes static struct device_attribute *megaraid_shost_attrs[] = { @@ -312,7 +312,7 @@ static struct device_attribute *megaraid_shost_attrs[] = { }; -DEVICE_ATTR(megaraid_mbox_ld, S_IRUSR, megaraid_sysfs_show_ldnum, NULL); +static DEVICE_ATTR(megaraid_mbox_ld, S_IRUSR, megaraid_sysfs_show_ldnum, NULL); // Host template initializer for megaraid mbox sysfs device attributes static struct device_attribute *megaraid_sdev_attrs[] = { From patchwork Tue Apr 7 09:28:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11477795 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 71CCC1871 for ; Tue, 7 Apr 2020 09:30:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5AEA02074F for ; Tue, 7 Apr 2020 09:30:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728097AbgDGJaP (ORCPT ); Tue, 7 Apr 2020 05:30:15 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:35594 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728092AbgDGJaO (ORCPT ); Tue, 7 Apr 2020 05:30:14 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8FD3BE39F893B674DDD2; Tue, 7 Apr 2020 17:30:03 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Tue, 7 Apr 2020 17:29:55 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan Subject: [PATCH 2/4] scsi: megaraid: make some symbols static in megaraid_sas_fp.c Date: Tue, 7 Apr 2020 17:28:25 +0800 Message-ID: <20200407092827.18074-3-yanaijie@huawei.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200407092827.18074-1-yanaijie@huawei.com> References: <20200407092827.18074-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following sparse warning: drivers/scsi/megaraid/megaraid_sas_fp.c:88:5: warning: symbol 'mega_div64_32' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fp.c:370:5: warning: symbol 'MR_GetSpanBlock' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fp.c:420:5: warning: symbol 'mr_spanset_get_span_block' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fp.c:645:4: warning: symbol 'get_arm' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fp.c:788:4: warning: symbol 'MR_GetPhyParams' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fp.c:1345:4: warning: symbol 'megasas_get_best_arm_pd' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/megaraid/megaraid_sas_fp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c index 89c3685f5163..3b3d04d7671f 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fp.c +++ b/drivers/scsi/megaraid/megaraid_sas_fp.c @@ -85,7 +85,7 @@ u32 mega_mod64(u64 dividend, u32 divisor) * * @return quotient **/ -u64 mega_div64_32(uint64_t dividend, uint32_t divisor) +static u64 mega_div64_32(uint64_t dividend, uint32_t divisor) { u32 remainder; u64 d; @@ -367,7 +367,7 @@ u8 MR_ValidateMapInfo(struct megasas_instance *instance, u64 map_id) return 1; } -u32 MR_GetSpanBlock(u32 ld, u64 row, u64 *span_blk, +static u32 MR_GetSpanBlock(u32 ld, u64 row, u64 *span_blk, struct MR_DRV_RAID_MAP_ALL *map) { struct MR_SPAN_BLOCK_INFO *pSpanBlock = MR_LdSpanInfoGet(ld, map); @@ -417,7 +417,7 @@ u32 MR_GetSpanBlock(u32 ld, u64 row, u64 *span_blk, * div_error - Devide error code. */ -u32 mr_spanset_get_span_block(struct megasas_instance *instance, +static u32 mr_spanset_get_span_block(struct megasas_instance *instance, u32 ld, u64 row, u64 *span_blk, struct MR_DRV_RAID_MAP_ALL *map) { struct fusion_context *fusion = instance->ctrl_context; @@ -642,7 +642,7 @@ static u32 get_arm_from_strip(struct megasas_instance *instance, } /* This Function will return Phys arm */ -u8 get_arm(struct megasas_instance *instance, u32 ld, u8 span, u64 stripe, +static u8 get_arm(struct megasas_instance *instance, u32 ld, u8 span, u64 stripe, struct MR_DRV_RAID_MAP_ALL *map) { struct MR_LD_RAID *raid = MR_LdRaidGet(ld, map); @@ -785,7 +785,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld, * span - Span number * block - Absolute Block number in the physical disk */ -u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, +static u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, u16 stripRef, struct IO_REQUEST_INFO *io_info, struct RAID_CONTEXT *pRAID_Context, struct MR_DRV_RAID_MAP_ALL *map) @@ -1342,7 +1342,7 @@ void mr_update_load_balance_params(struct MR_DRV_RAID_MAP_ALL *drv_map, } } -u8 megasas_get_best_arm_pd(struct megasas_instance *instance, +static u8 megasas_get_best_arm_pd(struct megasas_instance *instance, struct LD_LOAD_BALANCE_INFO *lbInfo, struct IO_REQUEST_INFO *io_info, struct MR_DRV_RAID_MAP_ALL *drv_map) From patchwork Tue Apr 7 09:28:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11477793 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 561FD1871 for ; Tue, 7 Apr 2020 09:30:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 32A3020731 for ; Tue, 7 Apr 2020 09:30:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728096AbgDGJaO (ORCPT ); Tue, 7 Apr 2020 05:30:14 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12620 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726637AbgDGJaN (ORCPT ); Tue, 7 Apr 2020 05:30:13 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5FD67679D7ADC9F97289; Tue, 7 Apr 2020 17:30:03 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Tue, 7 Apr 2020 17:29:55 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan Subject: [PATCH 3/4] scsi: megaraid: make some symbols static in megaraid_sas_fusion.c Date: Tue, 7 Apr 2020 17:28:26 +0800 Message-ID: <20200407092827.18074-4-yanaijie@huawei.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200407092827.18074-1-yanaijie@huawei.com> References: <20200407092827.18074-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following sparse warning: drivers/scsi/megaraid/megaraid_sas_fusion.c:180:1: warning: symbol 'megasas_enable_intr_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:202:1: warning: symbol 'megasas_disable_intr_fusion' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_fusion.c:4233:6: warning: symbol 'megasas_refire_mgmt_cmd' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index b2ad96564484..bec3d4cca74f 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -176,7 +176,7 @@ static inline bool megasas_check_same_4gb_region * megasas_enable_intr_fusion - Enables interrupts * @regs: MFI register set */ -void +static void megasas_enable_intr_fusion(struct megasas_instance *instance) { struct megasas_register_set __iomem *regs; @@ -198,7 +198,7 @@ megasas_enable_intr_fusion(struct megasas_instance *instance) * megasas_disable_intr_fusion - Disables interrupt * @regs: MFI register set */ -void +static void megasas_disable_intr_fusion(struct megasas_instance *instance) { u32 mask = 0xFFFFFFFF; @@ -4230,7 +4230,7 @@ void megasas_reset_reply_desc(struct megasas_instance *instance) * megasas_refire_mgmt_cmd : Re-fire management commands * @instance: Controller's soft instance */ -void megasas_refire_mgmt_cmd(struct megasas_instance *instance, +static void megasas_refire_mgmt_cmd(struct megasas_instance *instance, bool return_ioctl) { int j; From patchwork Tue Apr 7 09:28:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Yan X-Patchwork-Id: 11477797 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2574B1871 for ; Tue, 7 Apr 2020 09:30:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 047EF20731 for ; Tue, 7 Apr 2020 09:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726767AbgDGJan (ORCPT ); Tue, 7 Apr 2020 05:30:43 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:35592 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726716AbgDGJan (ORCPT ); Tue, 7 Apr 2020 05:30:43 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 88D00879BDBBB93E2E5B; Tue, 7 Apr 2020 17:30:03 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Tue, 7 Apr 2020 17:29:56 +0800 From: Jason Yan To: , , , , , , CC: Jason Yan Subject: [PATCH 4/4] scsi: megaraid: make two symbols static in megaraid_sas_base.c Date: Tue, 7 Apr 2020 17:28:27 +0800 Message-ID: <20200407092827.18074-5-yanaijie@huawei.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20200407092827.18074-1-yanaijie@huawei.com> References: <20200407092827.18074-1-yanaijie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following sparse warning: drivers/scsi/megaraid/megaraid_sas_base.c:84:5: warning: symbol 'rdpq_enable' was not declared. Should it be static? drivers/scsi/megaraid/megaraid_sas_base.c:92:14: warning: symbol 'scmd_timeout' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index babe85d7b537..fb9c3ceed508 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -81,7 +81,7 @@ int smp_affinity_enable = 1; module_param(smp_affinity_enable, int, 0444); MODULE_PARM_DESC(smp_affinity_enable, "SMP affinity feature enable/disable Default: enable(1)"); -int rdpq_enable = 1; +static int rdpq_enable = 1; module_param(rdpq_enable, int, 0444); MODULE_PARM_DESC(rdpq_enable, "Allocate reply queue in chunks for large queue depth enable/disable Default: enable(1)"); @@ -89,7 +89,7 @@ unsigned int dual_qdepth_disable; module_param(dual_qdepth_disable, int, 0444); MODULE_PARM_DESC(dual_qdepth_disable, "Disable dual queue depth feature. Default: 0"); -unsigned int scmd_timeout = MEGASAS_DEFAULT_CMD_TIMEOUT; +static unsigned int scmd_timeout = MEGASAS_DEFAULT_CMD_TIMEOUT; module_param(scmd_timeout, int, 0444); MODULE_PARM_DESC(scmd_timeout, "scsi command timeout (10-90s), default 90s. See megasas_reset_timer.");