Commit bf774d14 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

qed: Make some functions static

Fixes the following sparse warning:

drivers/net/ethernet/qlogic/qed/qed_cxt.c:1534:6: warning: symbol 'qed_cm_init_pf' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_dev.c:233:4: warning: symbol 'qed_init_qm_get_num_tcs' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_dev.c:238:5: warning: symbol 'qed_init_qm_get_num_vfs' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_dev.c:246:5: warning: symbol 'qed_init_qm_get_num_pf_rls' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_dev.c:264:5: warning: symbol 'qed_init_qm_get_num_vports' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_dev.c:276:5: warning: symbol 'qed_init_qm_get_num_pqs' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_mcp.c:573:5: warning: symbol 'qed_mcp_nvm_wr_cmd' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_mcp.c:3012:1: warning: symbol '__qed_mcp_resc_lock' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_dcbx.c:870:6: warning: symbol 'qed_dcbx_aen' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_debug.c:7841:5: warning: symbol 'qed_dbg_nvm_image_length' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_debug.c:7857:5: warning: symbol 'qed_dbg_nvm_image' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_sriov.c:675:6: warning: symbol '_qed_iov_pf_sanity_check' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_sriov.c:690:6: warning: symbol 'qed_iov_pf_sanity_check' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_sriov.c:3982:6: warning: symbol 'qed_iov_pf_get_pending_events' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_vf.c:172:5: warning: symbol '_qed_vf_pf_release' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_rdma.c:137:5: warning: symbol 'qed_rdma_get_sb_id' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_rdma.c:709:5: warning: symbol 'qed_rdma_stop' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_ll2.c:161:6: warning: symbol 'qed_ll2b_complete_rx_packet' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_roce.c:160:6: warning: symbol 'qed_roce_free_cid_pair' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:380:12: warning: symbol 'iwarp_state_names' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:946:1: warning: symbol 'qed_iwarp_parse_private_data' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:971:1: warning: symbol 'qed_iwarp_mpa_reply_arrived' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:2504:1: warning: symbol 'qed_iwarp_ll2_slowpath' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:2806:6: warning: symbol 'qed_iwarp_qp_in_error' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:2827:6: warning: symbol 'qed_iwarp_exception_received' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_iwarp.c:2958:1: warning: symbol 'qed_iwarp_connect_complete' was not declared. Should it be static?
drivers/net/ethernet/qlogic/qed/qed_iscsi.c:876:6: warning: symbol 'qed_iscsi_free_connection' was not declared. Should it be static?
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarDenis Bolotin <Denis.Bolotin@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e65d4d96
...@@ -1531,7 +1531,7 @@ void qed_qm_init_pf(struct qed_hwfn *p_hwfn, ...@@ -1531,7 +1531,7 @@ void qed_qm_init_pf(struct qed_hwfn *p_hwfn,
} }
/* CM PF */ /* CM PF */
void qed_cm_init_pf(struct qed_hwfn *p_hwfn) static void qed_cm_init_pf(struct qed_hwfn *p_hwfn)
{ {
/* XCM pure-LB queue */ /* XCM pure-LB queue */
STORE_RT_REG(p_hwfn, XCM_REG_CON_PHY_Q3_RT_OFFSET, STORE_RT_REG(p_hwfn, XCM_REG_CON_PHY_Q3_RT_OFFSET,
......
...@@ -867,7 +867,7 @@ static int qed_dcbx_read_mib(struct qed_hwfn *p_hwfn, ...@@ -867,7 +867,7 @@ static int qed_dcbx_read_mib(struct qed_hwfn *p_hwfn,
return rc; return rc;
} }
void qed_dcbx_aen(struct qed_hwfn *hwfn, u32 mib_type) static void qed_dcbx_aen(struct qed_hwfn *hwfn, u32 mib_type)
{ {
struct qed_common_cb_ops *op = hwfn->cdev->protocol_ops.common; struct qed_common_cb_ops *op = hwfn->cdev->protocol_ops.common;
void *cookie = hwfn->cdev->ops_cookie; void *cookie = hwfn->cdev->ops_cookie;
......
...@@ -7838,7 +7838,7 @@ int qed_dbg_igu_fifo_size(struct qed_dev *cdev) ...@@ -7838,7 +7838,7 @@ int qed_dbg_igu_fifo_size(struct qed_dev *cdev)
return qed_dbg_feature_size(cdev, DBG_FEATURE_IGU_FIFO); return qed_dbg_feature_size(cdev, DBG_FEATURE_IGU_FIFO);
} }
int qed_dbg_nvm_image_length(struct qed_hwfn *p_hwfn, static int qed_dbg_nvm_image_length(struct qed_hwfn *p_hwfn,
enum qed_nvm_images image_id, u32 *length) enum qed_nvm_images image_id, u32 *length)
{ {
struct qed_nvm_image_att image_att; struct qed_nvm_image_att image_att;
...@@ -7854,8 +7854,9 @@ int qed_dbg_nvm_image_length(struct qed_hwfn *p_hwfn, ...@@ -7854,8 +7854,9 @@ int qed_dbg_nvm_image_length(struct qed_hwfn *p_hwfn,
return rc; return rc;
} }
int qed_dbg_nvm_image(struct qed_dev *cdev, void *buffer, static int qed_dbg_nvm_image(struct qed_dev *cdev, void *buffer,
u32 *num_dumped_bytes, enum qed_nvm_images image_id) u32 *num_dumped_bytes,
enum qed_nvm_images image_id)
{ {
struct qed_hwfn *p_hwfn = struct qed_hwfn *p_hwfn =
&cdev->hwfns[cdev->dbg_params.engine_for_debug]; &cdev->hwfns[cdev->dbg_params.engine_for_debug];
......
...@@ -230,12 +230,12 @@ static u32 qed_get_pq_flags(struct qed_hwfn *p_hwfn) ...@@ -230,12 +230,12 @@ static u32 qed_get_pq_flags(struct qed_hwfn *p_hwfn)
} }
/* Getters for resource amounts necessary for qm initialization */ /* Getters for resource amounts necessary for qm initialization */
u8 qed_init_qm_get_num_tcs(struct qed_hwfn *p_hwfn) static u8 qed_init_qm_get_num_tcs(struct qed_hwfn *p_hwfn)
{ {
return p_hwfn->hw_info.num_hw_tc; return p_hwfn->hw_info.num_hw_tc;
} }
u16 qed_init_qm_get_num_vfs(struct qed_hwfn *p_hwfn) static u16 qed_init_qm_get_num_vfs(struct qed_hwfn *p_hwfn)
{ {
return IS_QED_SRIOV(p_hwfn->cdev) ? return IS_QED_SRIOV(p_hwfn->cdev) ?
p_hwfn->cdev->p_iov_info->total_vfs : 0; p_hwfn->cdev->p_iov_info->total_vfs : 0;
...@@ -243,7 +243,7 @@ u16 qed_init_qm_get_num_vfs(struct qed_hwfn *p_hwfn) ...@@ -243,7 +243,7 @@ u16 qed_init_qm_get_num_vfs(struct qed_hwfn *p_hwfn)
#define NUM_DEFAULT_RLS 1 #define NUM_DEFAULT_RLS 1
u16 qed_init_qm_get_num_pf_rls(struct qed_hwfn *p_hwfn) static u16 qed_init_qm_get_num_pf_rls(struct qed_hwfn *p_hwfn)
{ {
u16 num_pf_rls, num_vfs = qed_init_qm_get_num_vfs(p_hwfn); u16 num_pf_rls, num_vfs = qed_init_qm_get_num_vfs(p_hwfn);
...@@ -261,7 +261,7 @@ u16 qed_init_qm_get_num_pf_rls(struct qed_hwfn *p_hwfn) ...@@ -261,7 +261,7 @@ u16 qed_init_qm_get_num_pf_rls(struct qed_hwfn *p_hwfn)
return num_pf_rls; return num_pf_rls;
} }
u16 qed_init_qm_get_num_vports(struct qed_hwfn *p_hwfn) static u16 qed_init_qm_get_num_vports(struct qed_hwfn *p_hwfn)
{ {
u32 pq_flags = qed_get_pq_flags(p_hwfn); u32 pq_flags = qed_get_pq_flags(p_hwfn);
...@@ -273,7 +273,7 @@ u16 qed_init_qm_get_num_vports(struct qed_hwfn *p_hwfn) ...@@ -273,7 +273,7 @@ u16 qed_init_qm_get_num_vports(struct qed_hwfn *p_hwfn)
} }
/* calc amount of PQs according to the requested flags */ /* calc amount of PQs according to the requested flags */
u16 qed_init_qm_get_num_pqs(struct qed_hwfn *p_hwfn) static u16 qed_init_qm_get_num_pqs(struct qed_hwfn *p_hwfn)
{ {
u32 pq_flags = qed_get_pq_flags(p_hwfn); u32 pq_flags = qed_get_pq_flags(p_hwfn);
......
...@@ -873,7 +873,7 @@ static void qed_iscsi_release_connection(struct qed_hwfn *p_hwfn, ...@@ -873,7 +873,7 @@ static void qed_iscsi_release_connection(struct qed_hwfn *p_hwfn,
spin_unlock_bh(&p_hwfn->p_iscsi_info->lock); spin_unlock_bh(&p_hwfn->p_iscsi_info->lock);
} }
void qed_iscsi_free_connection(struct qed_hwfn *p_hwfn, static void qed_iscsi_free_connection(struct qed_hwfn *p_hwfn,
struct qed_iscsi_conn *p_conn) struct qed_iscsi_conn *p_conn)
{ {
qed_chain_free(p_hwfn->cdev, &p_conn->xhq); qed_chain_free(p_hwfn->cdev, &p_conn->xhq);
......
...@@ -377,7 +377,7 @@ qed_iwarp2roce_state(enum qed_iwarp_qp_state state) ...@@ -377,7 +377,7 @@ qed_iwarp2roce_state(enum qed_iwarp_qp_state state)
} }
} }
const char *iwarp_state_names[] = { const static char *iwarp_state_names[] = {
"IDLE", "IDLE",
"RTS", "RTS",
"TERMINATE", "TERMINATE",
...@@ -942,7 +942,7 @@ qed_iwarp_return_ep(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep) ...@@ -942,7 +942,7 @@ qed_iwarp_return_ep(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock); spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock);
} }
void static void
qed_iwarp_parse_private_data(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep) qed_iwarp_parse_private_data(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
{ {
struct mpa_v2_hdr *mpa_v2_params; struct mpa_v2_hdr *mpa_v2_params;
...@@ -967,7 +967,7 @@ qed_iwarp_parse_private_data(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep) ...@@ -967,7 +967,7 @@ qed_iwarp_parse_private_data(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
mpa_data_size; mpa_data_size;
} }
void static void
qed_iwarp_mpa_reply_arrived(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep) qed_iwarp_mpa_reply_arrived(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep)
{ {
struct qed_iwarp_cm_event_params params; struct qed_iwarp_cm_event_params params;
...@@ -2500,7 +2500,7 @@ static void qed_iwarp_ll2_rel_tx_pkt(void *cxt, u8 connection_handle, ...@@ -2500,7 +2500,7 @@ static void qed_iwarp_ll2_rel_tx_pkt(void *cxt, u8 connection_handle,
/* The only slowpath for iwarp ll2 is unalign flush. When this completion /* The only slowpath for iwarp ll2 is unalign flush. When this completion
* is received, need to reset the FPDU. * is received, need to reset the FPDU.
*/ */
void static void
qed_iwarp_ll2_slowpath(void *cxt, qed_iwarp_ll2_slowpath(void *cxt,
u8 connection_handle, u8 connection_handle,
u32 opaque_data_0, u32 opaque_data_1) u32 opaque_data_0, u32 opaque_data_1)
...@@ -2803,8 +2803,9 @@ int qed_iwarp_stop(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) ...@@ -2803,8 +2803,9 @@ int qed_iwarp_stop(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
return qed_iwarp_ll2_stop(p_hwfn, p_ptt); return qed_iwarp_ll2_stop(p_hwfn, p_ptt);
} }
void qed_iwarp_qp_in_error(struct qed_hwfn *p_hwfn, static void qed_iwarp_qp_in_error(struct qed_hwfn *p_hwfn,
struct qed_iwarp_ep *ep, u8 fw_return_code) struct qed_iwarp_ep *ep,
u8 fw_return_code)
{ {
struct qed_iwarp_cm_event_params params; struct qed_iwarp_cm_event_params params;
...@@ -2824,8 +2825,9 @@ void qed_iwarp_qp_in_error(struct qed_hwfn *p_hwfn, ...@@ -2824,8 +2825,9 @@ void qed_iwarp_qp_in_error(struct qed_hwfn *p_hwfn,
ep->event_cb(ep->cb_context, &params); ep->event_cb(ep->cb_context, &params);
} }
void qed_iwarp_exception_received(struct qed_hwfn *p_hwfn, static void qed_iwarp_exception_received(struct qed_hwfn *p_hwfn,
struct qed_iwarp_ep *ep, int fw_ret_code) struct qed_iwarp_ep *ep,
int fw_ret_code)
{ {
struct qed_iwarp_cm_event_params params; struct qed_iwarp_cm_event_params params;
bool event_cb = false; bool event_cb = false;
...@@ -2954,7 +2956,7 @@ qed_iwarp_tcp_connect_unsuccessful(struct qed_hwfn *p_hwfn, ...@@ -2954,7 +2956,7 @@ qed_iwarp_tcp_connect_unsuccessful(struct qed_hwfn *p_hwfn,
} }
} }
void static void
qed_iwarp_connect_complete(struct qed_hwfn *p_hwfn, qed_iwarp_connect_complete(struct qed_hwfn *p_hwfn,
struct qed_iwarp_ep *ep, u8 fw_return_code) struct qed_iwarp_ep *ep, u8 fw_return_code)
{ {
......
...@@ -158,7 +158,8 @@ static void qed_ll2_kill_buffers(struct qed_dev *cdev) ...@@ -158,7 +158,8 @@ static void qed_ll2_kill_buffers(struct qed_dev *cdev)
qed_ll2_dealloc_buffer(cdev, buffer); qed_ll2_dealloc_buffer(cdev, buffer);
} }
void qed_ll2b_complete_rx_packet(void *cxt, struct qed_ll2_comp_rx_data *data) static void qed_ll2b_complete_rx_packet(void *cxt,
struct qed_ll2_comp_rx_data *data)
{ {
struct qed_hwfn *p_hwfn = cxt; struct qed_hwfn *p_hwfn = cxt;
struct qed_ll2_buffer *buffer = data->cookie; struct qed_ll2_buffer *buffer = data->cookie;
......
...@@ -570,7 +570,8 @@ int qed_mcp_cmd(struct qed_hwfn *p_hwfn, ...@@ -570,7 +570,8 @@ int qed_mcp_cmd(struct qed_hwfn *p_hwfn,
return 0; return 0;
} }
int qed_mcp_nvm_wr_cmd(struct qed_hwfn *p_hwfn, static int
qed_mcp_nvm_wr_cmd(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt, struct qed_ptt *p_ptt,
u32 cmd, u32 cmd,
u32 param, u32 param,
...@@ -3008,7 +3009,7 @@ static int qed_mcp_resource_cmd(struct qed_hwfn *p_hwfn, ...@@ -3008,7 +3009,7 @@ static int qed_mcp_resource_cmd(struct qed_hwfn *p_hwfn,
return rc; return rc;
} }
int static int
__qed_mcp_resc_lock(struct qed_hwfn *p_hwfn, __qed_mcp_resc_lock(struct qed_hwfn *p_hwfn,
struct qed_ptt *p_ptt, struct qed_ptt *p_ptt,
struct qed_resc_lock_params *p_params) struct qed_resc_lock_params *p_params)
......
...@@ -134,7 +134,7 @@ static bool qed_bmap_is_empty(struct qed_bmap *bmap) ...@@ -134,7 +134,7 @@ static bool qed_bmap_is_empty(struct qed_bmap *bmap)
return bmap->max_count == find_first_bit(bmap->bitmap, bmap->max_count); return bmap->max_count == find_first_bit(bmap->bitmap, bmap->max_count);
} }
u32 qed_rdma_get_sb_id(void *p_hwfn, u32 rel_sb_id) static u32 qed_rdma_get_sb_id(void *p_hwfn, u32 rel_sb_id)
{ {
/* First sb id for RoCE is after all the l2 sb */ /* First sb id for RoCE is after all the l2 sb */
return FEAT_NUM((struct qed_hwfn *)p_hwfn, QED_PF_L2_QUE) + rel_sb_id; return FEAT_NUM((struct qed_hwfn *)p_hwfn, QED_PF_L2_QUE) + rel_sb_id;
...@@ -706,7 +706,7 @@ static int qed_rdma_setup(struct qed_hwfn *p_hwfn, ...@@ -706,7 +706,7 @@ static int qed_rdma_setup(struct qed_hwfn *p_hwfn,
return qed_rdma_start_fw(p_hwfn, params, p_ptt); return qed_rdma_start_fw(p_hwfn, params, p_ptt);
} }
int qed_rdma_stop(void *rdma_cxt) static int qed_rdma_stop(void *rdma_cxt)
{ {
struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt; struct qed_hwfn *p_hwfn = (struct qed_hwfn *)rdma_cxt;
struct rdma_close_func_ramrod_data *p_ramrod; struct rdma_close_func_ramrod_data *p_ramrod;
......
...@@ -157,7 +157,7 @@ static enum roce_flavor qed_roce_mode_to_flavor(enum roce_mode roce_mode) ...@@ -157,7 +157,7 @@ static enum roce_flavor qed_roce_mode_to_flavor(enum roce_mode roce_mode)
return flavor; return flavor;
} }
void qed_roce_free_cid_pair(struct qed_hwfn *p_hwfn, u16 cid) static void qed_roce_free_cid_pair(struct qed_hwfn *p_hwfn, u16 cid)
{ {
spin_lock_bh(&p_hwfn->p_rdma_info->lock); spin_lock_bh(&p_hwfn->p_rdma_info->lock);
qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->cid_map, cid); qed_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->cid_map, cid);
......
...@@ -672,7 +672,7 @@ int qed_iov_hw_info(struct qed_hwfn *p_hwfn) ...@@ -672,7 +672,7 @@ int qed_iov_hw_info(struct qed_hwfn *p_hwfn)
return 0; return 0;
} }
bool _qed_iov_pf_sanity_check(struct qed_hwfn *p_hwfn, static bool _qed_iov_pf_sanity_check(struct qed_hwfn *p_hwfn,
int vfid, bool b_fail_malicious) int vfid, bool b_fail_malicious)
{ {
/* Check PF supports sriov */ /* Check PF supports sriov */
...@@ -687,7 +687,7 @@ bool _qed_iov_pf_sanity_check(struct qed_hwfn *p_hwfn, ...@@ -687,7 +687,7 @@ bool _qed_iov_pf_sanity_check(struct qed_hwfn *p_hwfn,
return true; return true;
} }
bool qed_iov_pf_sanity_check(struct qed_hwfn *p_hwfn, int vfid) static bool qed_iov_pf_sanity_check(struct qed_hwfn *p_hwfn, int vfid)
{ {
return _qed_iov_pf_sanity_check(p_hwfn, vfid, true); return _qed_iov_pf_sanity_check(p_hwfn, vfid, true);
} }
...@@ -3979,7 +3979,7 @@ static void qed_iov_process_mbx_req(struct qed_hwfn *p_hwfn, ...@@ -3979,7 +3979,7 @@ static void qed_iov_process_mbx_req(struct qed_hwfn *p_hwfn,
} }
} }
void qed_iov_pf_get_pending_events(struct qed_hwfn *p_hwfn, u64 *events) static void qed_iov_pf_get_pending_events(struct qed_hwfn *p_hwfn, u64 *events)
{ {
int i; int i;
......
...@@ -169,7 +169,7 @@ static void qed_vf_pf_add_qid(struct qed_hwfn *p_hwfn, ...@@ -169,7 +169,7 @@ static void qed_vf_pf_add_qid(struct qed_hwfn *p_hwfn,
p_qid_tlv->qid = p_cid->qid_usage_idx; p_qid_tlv->qid = p_cid->qid_usage_idx;
} }
int _qed_vf_pf_release(struct qed_hwfn *p_hwfn, bool b_final) static int _qed_vf_pf_release(struct qed_hwfn *p_hwfn, bool b_final)
{ {
struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info; struct qed_vf_iov *p_iov = p_hwfn->vf_iov_info;
struct pfvf_def_resp_tlv *resp; struct pfvf_def_resp_tlv *resp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment