* [PATCH 0/4] scsi: megaraid: make a bunch of symbols static
@ 2020-04-07 9:28 Jason Yan
2020-04-07 9:28 ` [PATCH 1/4] scsi: megaraid: make two symbols static in megaraid_mbox.c Jason Yan
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Jason Yan @ 2020-04-07 9:28 UTC (permalink / raw)
To: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara, jejb,
martin.petersen, megaraidlinux.pdl, linux-scsi
Cc: Jason Yan
Make a bunch of symbols static to fix some sparse warnings.
Jason Yan (4):
scsi: megaraid: make two symbols static in megaraid_mbox.c
scsi: megaraid: make some symbols static in megaraid_sas_fp.c
scsi: megaraid: make some symbols static in megaraid_sas_fusion.c
scsi: megaraid: make two symbols static in megaraid_sas_base.c
drivers/scsi/megaraid/megaraid_mbox.c | 6 +++---
drivers/scsi/megaraid/megaraid_sas_base.c | 4 ++--
drivers/scsi/megaraid/megaraid_sas_fp.c | 12 ++++++------
drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
--
2.17.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] scsi: megaraid: make two symbols static in megaraid_mbox.c
2020-04-07 9:28 [PATCH 0/4] scsi: megaraid: make a bunch of symbols static Jason Yan
@ 2020-04-07 9:28 ` Jason Yan
2020-04-07 9:28 ` [PATCH 2/4] scsi: megaraid: make some symbols static in megaraid_sas_fp.c Jason Yan
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jason Yan @ 2020-04-07 9:28 UTC (permalink / raw)
To: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara, jejb,
martin.petersen, megaraidlinux.pdl, linux-scsi
Cc: Jason Yan
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 <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
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[] = {
--
2.17.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] scsi: megaraid: make some symbols static in megaraid_sas_fp.c
2020-04-07 9:28 [PATCH 0/4] scsi: megaraid: make a bunch of symbols static Jason Yan
2020-04-07 9:28 ` [PATCH 1/4] scsi: megaraid: make two symbols static in megaraid_mbox.c Jason Yan
@ 2020-04-07 9:28 ` Jason Yan
2020-04-07 9:28 ` [PATCH 3/4] scsi: megaraid: make some symbols static in megaraid_sas_fusion.c Jason Yan
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jason Yan @ 2020-04-07 9:28 UTC (permalink / raw)
To: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara, jejb,
martin.petersen, megaraidlinux.pdl, linux-scsi
Cc: Jason Yan
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 <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
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)
--
2.17.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] scsi: megaraid: make some symbols static in megaraid_sas_fusion.c
2020-04-07 9:28 [PATCH 0/4] scsi: megaraid: make a bunch of symbols static Jason Yan
2020-04-07 9:28 ` [PATCH 1/4] scsi: megaraid: make two symbols static in megaraid_mbox.c Jason Yan
2020-04-07 9:28 ` [PATCH 2/4] scsi: megaraid: make some symbols static in megaraid_sas_fp.c Jason Yan
@ 2020-04-07 9:28 ` Jason Yan
2020-04-07 9:28 ` [PATCH 4/4] scsi: megaraid: make two symbols static in megaraid_sas_base.c Jason Yan
2020-04-15 1:40 ` [PATCH 0/4] scsi: megaraid: make a bunch of symbols static Martin K. Petersen
4 siblings, 0 replies; 6+ messages in thread
From: Jason Yan @ 2020-04-07 9:28 UTC (permalink / raw)
To: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara, jejb,
martin.petersen, megaraidlinux.pdl, linux-scsi
Cc: Jason Yan
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 <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
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;
--
2.17.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] scsi: megaraid: make two symbols static in megaraid_sas_base.c
2020-04-07 9:28 [PATCH 0/4] scsi: megaraid: make a bunch of symbols static Jason Yan
` (2 preceding siblings ...)
2020-04-07 9:28 ` [PATCH 3/4] scsi: megaraid: make some symbols static in megaraid_sas_fusion.c Jason Yan
@ 2020-04-07 9:28 ` Jason Yan
2020-04-15 1:40 ` [PATCH 0/4] scsi: megaraid: make a bunch of symbols static Martin K. Petersen
4 siblings, 0 replies; 6+ messages in thread
From: Jason Yan @ 2020-04-07 9:28 UTC (permalink / raw)
To: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara, jejb,
martin.petersen, megaraidlinux.pdl, linux-scsi
Cc: Jason Yan
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 <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
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.");
--
2.17.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] scsi: megaraid: make a bunch of symbols static
2020-04-07 9:28 [PATCH 0/4] scsi: megaraid: make a bunch of symbols static Jason Yan
` (3 preceding siblings ...)
2020-04-07 9:28 ` [PATCH 4/4] scsi: megaraid: make two symbols static in megaraid_sas_base.c Jason Yan
@ 2020-04-15 1:40 ` Martin K. Petersen
4 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2020-04-15 1:40 UTC (permalink / raw)
To: Jason Yan
Cc: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara, jejb,
martin.petersen, megaraidlinux.pdl, linux-scsi
Jason,
> Make a bunch of symbols static to fix some sparse warnings.
>
> Jason Yan (4):
> scsi: megaraid: make two symbols static in megaraid_mbox.c
> scsi: megaraid: make some symbols static in megaraid_sas_fp.c
> scsi: megaraid: make some symbols static in megaraid_sas_fusion.c
> scsi: megaraid: make two symbols static in megaraid_sas_base.c
Applied to 5.8/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-15 1:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-07 9:28 [PATCH 0/4] scsi: megaraid: make a bunch of symbols static Jason Yan
2020-04-07 9:28 ` [PATCH 1/4] scsi: megaraid: make two symbols static in megaraid_mbox.c Jason Yan
2020-04-07 9:28 ` [PATCH 2/4] scsi: megaraid: make some symbols static in megaraid_sas_fp.c Jason Yan
2020-04-07 9:28 ` [PATCH 3/4] scsi: megaraid: make some symbols static in megaraid_sas_fusion.c Jason Yan
2020-04-07 9:28 ` [PATCH 4/4] scsi: megaraid: make two symbols static in megaraid_sas_base.c Jason Yan
2020-04-15 1:40 ` [PATCH 0/4] scsi: megaraid: make a bunch of symbols static Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).