diff options
author | Baoyou Xie <baoyou.xie@linaro.org> | 2016-09-26 08:00:59 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-09-28 01:06:50 -0400 |
commit | 0825b8ee2e58ac6616a9936a745a8ad68b0dd362 (patch) | |
tree | 0ebe41c5ed81e1c1be974ae12334c11a798cdb57 /drivers/scsi/be2iscsi/be_main.c | |
parent | 14bf41dcef651c13911a1715e83220732a3a4071 (diff) |
scsi: be2iscsi: mark symbols static where possible
We get 6 warnings when building kernel with W=1:
drivers/scsi/be2iscsi/be_main.c:65:1: warning: no previous prototype for 'beiscsi_log_enable_disp' [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:78:1: warning: no previous prototype for 'beiscsi_log_enable_change' [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:97:1: warning: no previous prototype for 'beiscsi_log_enable_store' [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:116:1: warning: no previous prototype for 'beiscsi_log_enable_init' [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:4587:5: warning: no previous prototype for 'beiscsi_iotask_v2' [-Wmissing-prototypes]
drivers/scsi/be2iscsi/be_main.c:4976:6: warning: no previous prototype for 'beiscsi_hba_attrs_init' [-Wmissing-prototypes]
In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static. So this
patch marks these functions with 'static'.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Reviewed-by: Jitendra Bhivare <Jitendra.bhivare@broadcom>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 6a6906f847db..68138a647dfc 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -61,7 +61,7 @@ MODULE_PARM_DESC(be_max_phys_size, | |||
61 | "memory that can be allocated. Range is 16 - 128"); | 61 | "memory that can be allocated. Range is 16 - 128"); |
62 | 62 | ||
63 | #define beiscsi_disp_param(_name)\ | 63 | #define beiscsi_disp_param(_name)\ |
64 | ssize_t \ | 64 | static ssize_t \ |
65 | beiscsi_##_name##_disp(struct device *dev,\ | 65 | beiscsi_##_name##_disp(struct device *dev,\ |
66 | struct device_attribute *attrib, char *buf) \ | 66 | struct device_attribute *attrib, char *buf) \ |
67 | { \ | 67 | { \ |
@@ -74,7 +74,7 @@ beiscsi_##_name##_disp(struct device *dev,\ | |||
74 | } | 74 | } |
75 | 75 | ||
76 | #define beiscsi_change_param(_name, _minval, _maxval, _defaval)\ | 76 | #define beiscsi_change_param(_name, _minval, _maxval, _defaval)\ |
77 | int \ | 77 | static int \ |
78 | beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)\ | 78 | beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)\ |
79 | {\ | 79 | {\ |
80 | if (val >= _minval && val <= _maxval) {\ | 80 | if (val >= _minval && val <= _maxval) {\ |
@@ -93,7 +93,7 @@ beiscsi_##_name##_change(struct beiscsi_hba *phba, uint32_t val)\ | |||
93 | } | 93 | } |
94 | 94 | ||
95 | #define beiscsi_store_param(_name) \ | 95 | #define beiscsi_store_param(_name) \ |
96 | ssize_t \ | 96 | static ssize_t \ |
97 | beiscsi_##_name##_store(struct device *dev,\ | 97 | beiscsi_##_name##_store(struct device *dev,\ |
98 | struct device_attribute *attr, const char *buf,\ | 98 | struct device_attribute *attr, const char *buf,\ |
99 | size_t count) \ | 99 | size_t count) \ |
@@ -112,7 +112,7 @@ beiscsi_##_name##_store(struct device *dev,\ | |||
112 | } | 112 | } |
113 | 113 | ||
114 | #define beiscsi_init_param(_name, _minval, _maxval, _defval) \ | 114 | #define beiscsi_init_param(_name, _minval, _maxval, _defval) \ |
115 | int \ | 115 | static int \ |
116 | beiscsi_##_name##_init(struct beiscsi_hba *phba, uint32_t val) \ | 116 | beiscsi_##_name##_init(struct beiscsi_hba *phba, uint32_t val) \ |
117 | { \ | 117 | { \ |
118 | if (val >= _minval && val <= _maxval) {\ | 118 | if (val >= _minval && val <= _maxval) {\ |
@@ -4584,7 +4584,7 @@ free_hndls: | |||
4584 | io_task->cmd_bhs = NULL; | 4584 | io_task->cmd_bhs = NULL; |
4585 | return -ENOMEM; | 4585 | return -ENOMEM; |
4586 | } | 4586 | } |
4587 | int beiscsi_iotask_v2(struct iscsi_task *task, struct scatterlist *sg, | 4587 | static int beiscsi_iotask_v2(struct iscsi_task *task, struct scatterlist *sg, |
4588 | unsigned int num_sg, unsigned int xferlen, | 4588 | unsigned int num_sg, unsigned int xferlen, |
4589 | unsigned int writedir) | 4589 | unsigned int writedir) |
4590 | { | 4590 | { |
@@ -4973,7 +4973,7 @@ static int beiscsi_bsg_request(struct bsg_job *job) | |||
4973 | return rc; | 4973 | return rc; |
4974 | } | 4974 | } |
4975 | 4975 | ||
4976 | void beiscsi_hba_attrs_init(struct beiscsi_hba *phba) | 4976 | static void beiscsi_hba_attrs_init(struct beiscsi_hba *phba) |
4977 | { | 4977 | { |
4978 | /* Set the logging parameter */ | 4978 | /* Set the logging parameter */ |
4979 | beiscsi_log_enable_init(phba, beiscsi_log_enable); | 4979 | beiscsi_log_enable_init(phba, beiscsi_log_enable); |