qcacmn: Fix -Wmissing-prototypes in HIF

We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in hif.

Change-Id: I342360f48f73a1e5ef42ebc4ca38366669eea0e0
CRs-Fixed: 1091702
This commit is contained in:
Jeff Johnson 2016-10-07 13:00:59 -07:00 • committed by qcabuildsw
commit 6950fdbedd
9 changed files with 56 additions and 47 deletions

View file

@ -38,6 +38,7 @@
#include <a_debug.h>
#include "hif_main.h"
#include "ce_api.h"
#include "ce_bmi.h"
#include "qdf_trace.h"
#include "hif_debug.h"

View file

@ -103,8 +103,8 @@ hif_ce_dump_target_memory(struct hif_softc *scn, void *ramdump_base,
*
* Return: soc physical address
*/
qdf_dma_addr_t get_ce_phy_addr(struct hif_softc *sc, uint32_t address,
unsigned int target_type)
static qdf_dma_addr_t get_ce_phy_addr(struct hif_softc *sc, uint32_t address,
unsigned int target_type)
{
qdf_dma_addr_t ce_phy_addr;
struct hif_softc *scn = sc;

View file

@ -515,7 +515,7 @@ static struct service_to_pipe target_service_to_ce_map_wlan_epping[] = {
* false (attribute set to false)
* true (attribute set to true);
*/
bool ce_mark_datapath(struct CE_state *ce_state)
static bool ce_mark_datapath(struct CE_state *ce_state)
{
struct service_to_pipe *svc_map;
size_t map_sz;
@ -613,7 +613,7 @@ bool ce_srng_based(struct hif_softc *scn)
return false;
}
struct ce_ops *ce_services_attach(struct hif_softc *scn)
static struct ce_ops *ce_services_attach(struct hif_softc *scn)
{
if (ce_srng_based(scn))
return ce_services_srng();
@ -630,7 +630,7 @@ static inline uint32_t ce_get_desc_size(struct hif_softc *scn,
}
struct CE_ring_state *ce_alloc_ring_state(struct CE_state *CE_state,
static struct CE_ring_state *ce_alloc_ring_state(struct CE_state *CE_state,
uint8_t ring_type, uint32_t nentries)
{
uint32_t ce_nbytes;
@ -1337,7 +1337,7 @@ hif_get_free_queue_number(struct hif_opaque_softc *hif_ctx, uint8_t pipe)
}
/* Called by lower (CE) layer when a send to Target completes. */
void
static void
hif_pci_ce_send_done(struct CE_handle *copyeng, void *ce_context,
void *transfer_context, qdf_dma_addr_t CE_data,
unsigned int nbytes, unsigned int transfer_id,
@ -1405,7 +1405,7 @@ static inline void hif_ce_do_recv(struct hif_msg_callbacks *msg_callbacks,
}
/* Called by lower (CE) layer when data is received from the Target. */
void
static void
hif_pci_ce_recv_data(struct CE_handle *copyeng, void *ce_context,
void *transfer_context, qdf_dma_addr_t CE_data,
unsigned int nbytes, unsigned int transfer_id,
@ -1468,7 +1468,7 @@ hif_post_init(struct hif_opaque_softc *hif_ctx, void *unused,
}
int hif_completion_thread_startup(struct HIF_CE_state *hif_state)
static int hif_completion_thread_startup(struct HIF_CE_state *hif_state)
{
struct CE_handle *ce_diag = hif_state->ce_diag;
int pipe_num;
@ -1751,7 +1751,7 @@ QDF_STATUS hif_start(struct hif_opaque_softc *hif_ctx)
return QDF_STATUS_SUCCESS;
}
void hif_recv_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info)
static void hif_recv_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info)
{
struct hif_softc *scn;
struct CE_handle *ce_hdl;
@ -1787,7 +1787,7 @@ void hif_recv_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info)
}
}
void hif_send_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info)
static void hif_send_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info)
{
struct CE_handle *ce_hdl;
struct HIF_CE_state *hif_state;
@ -1850,7 +1850,7 @@ void hif_send_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info)
* not yet processed are on a completion queue. They
* are handled when the completion thread shuts down.
*/
void hif_buffer_cleanup(struct HIF_CE_state *hif_state)
static void hif_buffer_cleanup(struct HIF_CE_state *hif_state)
{
int pipe_num;
struct hif_softc *scn = HIF_GET_SOFTC(hif_state);

View file

@ -259,6 +259,7 @@ bool hif_ce_service_should_yield(struct hif_softc *scn,
* The caller takes responsibility for any needed locking.
*/
static
void war_ce_src_ring_write_idx_set(struct hif_softc *scn,
u32 ctrl_addr, unsigned int write_index)
{
@ -315,7 +316,7 @@ static void ce_validate_nbytes(uint32_t nbytes, struct CE_state *ce_state)
}
#endif
int
static int
ce_send_nolock_legacy(struct CE_handle *copyeng,
void *per_transfer_context,
qdf_dma_addr_t buffer,
@ -480,7 +481,8 @@ ce_sendlist_send(struct CE_handle *copyeng,
return hif_state->ce_services->ce_sendlist_send(copyeng,
per_transfer_context, sendlist, transfer_id);
}
int
static int
ce_sendlist_send_legacy(struct CE_handle *copyeng,
void *per_transfer_context,
struct ce_sendlist *sendlist, unsigned int transfer_id)
@ -999,7 +1001,7 @@ ce_recv_buf_enqueue(struct CE_handle *copyeng,
*
* Return: 0 if the buffer is enqueued
*/
int
static int
ce_recv_buf_enqueue_legacy(struct CE_handle *copyeng,
void *per_recv_context, qdf_dma_addr_t buffer)
{
@ -1123,7 +1125,7 @@ unsigned int ce_recv_entries_avail(struct CE_handle *copyeng)
* Guts of ce_send_entries_done.
* The caller takes responsibility for any necessary locking.
*/
unsigned int
static unsigned int
ce_send_entries_done_nolock_legacy(struct hif_softc *scn,
struct CE_state *CE_state)
{
@ -1158,7 +1160,7 @@ unsigned int ce_send_entries_done(struct CE_handle *copyeng)
* Guts of ce_recv_entries_done.
* The caller takes responsibility for any necessary locking.
*/
unsigned int
static unsigned int
ce_recv_entries_done_nolock_legacy(struct hif_softc *scn,
struct CE_state *CE_state)
{
@ -1199,7 +1201,7 @@ void *ce_debug_cmplsn_context; /* completed send next context */
* Guts of ce_completed_recv_next.
* The caller takes responsibility for any necessary locking.
*/
int
static int
ce_completed_recv_next_nolock_legacy(struct CE_state *CE_state,
void **per_CE_contextp,
void **per_transfer_contextp,
@ -1305,7 +1307,7 @@ ce_revoke_recv_next(struct CE_handle *copyeng,
per_CE_contextp, per_transfer_contextp, bufferp);
}
/* NB: Modeled after ce_completed_recv_next_nolock */
QDF_STATUS
static QDF_STATUS
ce_revoke_recv_next_legacy(struct CE_handle *copyeng,
void **per_CE_contextp,
void **per_transfer_contextp, qdf_dma_addr_t *bufferp)
@ -1366,7 +1368,7 @@ ce_revoke_recv_next_legacy(struct CE_handle *copyeng,
* Guts of ce_completed_send_next.
* The caller takes responsibility for any necessary locking.
*/
int
static int
ce_completed_send_next_nolock_legacy(struct CE_state *CE_state,
void **per_CE_contextp,
void **per_transfer_contextp,
@ -1472,7 +1474,7 @@ ce_cancel_send_next(struct CE_handle *copyeng,
}
/* NB: Modeled after ce_completed_send_next */
QDF_STATUS
static QDF_STATUS
ce_cancel_send_next_legacy(struct CE_handle *copyeng,
void **per_CE_contextp,
void **per_transfer_contextp,
@ -2412,7 +2414,8 @@ void ce_ipa_get_resource(struct CE_handle *ce,
}
#endif /* IPA_OFFLOAD */
bool ce_check_int_watermark(struct CE_state *CE_state, unsigned int *flags)
static bool ce_check_int_watermark(struct CE_state *CE_state,
unsigned int *flags)
{
uint32_t ce_int_status;
uint32_t ctrl_addr = CE_state->ctrl_addr;
@ -2430,7 +2433,7 @@ bool ce_check_int_watermark(struct CE_state *CE_state, unsigned int *flags)
return false;
}
void ce_legacy_src_ring_setup(struct hif_softc *scn, uint32_t ce_id,
static void ce_legacy_src_ring_setup(struct hif_softc *scn, uint32_t ce_id,
struct CE_ring_state *src_ring,
struct CE_attr *attr)
{
@ -2471,7 +2474,7 @@ void ce_legacy_src_ring_setup(struct hif_softc *scn, uint32_t ce_id,
}
void ce_legacy_dest_ring_setup(struct hif_softc *scn, uint32_t ce_id,
static void ce_legacy_dest_ring_setup(struct hif_softc *scn, uint32_t ce_id,
struct CE_ring_state *dest_ring,
struct CE_attr *attr)
{
@ -2509,7 +2512,7 @@ void ce_legacy_dest_ring_setup(struct hif_softc *scn, uint32_t ce_id,
CE_DEST_RING_HIGHMARK_SET(scn, ctrl_addr, dest_ring->nentries);
}
uint32_t ce_get_desc_size_legacy(uint8_t ring_type)
static uint32_t ce_get_desc_size_legacy(uint8_t ring_type)
{
switch (ring_type) {
case CE_RING_SRC:
@ -2526,7 +2529,7 @@ uint32_t ce_get_desc_size_legacy(uint8_t ring_type)
return 0;
}
void ce_ring_setup_legacy(struct hif_softc *scn, uint8_t ring_type,
static void ce_ring_setup_legacy(struct hif_softc *scn, uint8_t ring_type,
uint32_t ce_id, struct CE_ring_state *ring,
struct CE_attr *attr)
{

View file

@ -30,6 +30,7 @@
#include "hif_debug.h"
#include "hif.h"
#include "hif_main.h"
#include "hif_io32.h"
#include "multibus.h"
#include "dummy.h"
#if defined(HIF_PCI) || defined(HIF_SNOC) || defined(HIF_AHB)

View file

@ -76,7 +76,7 @@ static int hif_napi_cpu_migrate(struct qca_napi_data *napid, int cpu,
return 0;
}
int hif_napi_cpu_blacklist(bool is_on) { return 0; }
static int hif_napi_cpu_blacklist(bool is_on) { return 0; }
#endif /* HELIUMPLUS */
/**
@ -1176,9 +1176,9 @@ int hif_napi_cpu_deinit(void *ctx)
* =0 : success
* <0 : error
*/
int hncm_migrate_to(struct qca_napi_data *napid,
int napi_ce,
int didx)
static int hncm_migrate_to(struct qca_napi_data *napid,
int napi_ce,
int didx)
{
int rc = 0;
cpumask_t cpumask;
@ -1207,7 +1207,7 @@ int hncm_migrate_to(struct qca_napi_data *napid,
* Return: >=0 : index in the cpu topology table
* : < 0 : error
*/
int hncm_dest_cpu(struct qca_napi_data *napid, int act)
static int hncm_dest_cpu(struct qca_napi_data *napid, int act)
{
int destidx = -1;
int head, i;

View file

@ -27,6 +27,7 @@
#include "hif_io32.h"
#include "hif_debug.h"
#include "mp_dev.h"
/*chaninfo*/
#define CHANINFOMEM_S2_READ_MASK 0x00000008
@ -116,7 +117,7 @@ void priv_start_agc(struct hif_softc *scn)
0x0f);
}
void priv_stop_agc(struct hif_softc *scn)
static void priv_stop_agc(struct hif_softc *scn)
{
set_target_reg_bits(scn->mem, BB_gains_min_offsets,
AGC_HISTORY_DUMP_MASK,

View file

@ -407,7 +407,7 @@ inline void hif_pci_cancel_deferred_target_sleep(struct hif_softc *scn)
*
* Return: true if target is awake
*/
bool hif_targ_is_awake(struct hif_softc *hif_ctx, void *__iomem *mem)
static bool hif_targ_is_awake(struct hif_softc *hif_ctx, void *__iomem *mem)
{
return true;
}
@ -418,7 +418,7 @@ bool hif_targ_is_awake(struct hif_softc *hif_ctx, void *__iomem *mem)
*
* Return: true if the targets clocks are on
*/
bool hif_targ_is_awake(struct hif_softc *scn, void *__iomem *mem)
static bool hif_targ_is_awake(struct hif_softc *scn, void *__iomem *mem)
{
uint32_t val;
@ -503,7 +503,7 @@ static void hif_pci_device_reset(struct hif_pci_softc *sc)
* 4. Reset all CEs to clear any pending CE tarnsactions
* 5. Warm reset CPU
*/
void hif_pci_device_warm_reset(struct hif_pci_softc *sc)
static void hif_pci_device_warm_reset(struct hif_pci_softc *sc)
{
void __iomem *mem = sc->mem;
int i;
@ -1501,7 +1501,7 @@ void hif_register_bmi_callbacks(struct hif_softc *hif_sc)
* Send an interrupt to the device to wake up the Target CPU
* so it has an opportunity to notice any changed state.
*/
void hif_wake_target_cpu(struct hif_softc *scn)
static void hif_wake_target_cpu(struct hif_softc *scn)
{
QDF_STATUS rv;
uint32_t core_ctrl;
@ -1583,7 +1583,7 @@ static void hif_sleep_entry(void *arg)
#define HIF_HIA_POLLING_DELAY_MS 10
#ifdef CONFIG_WIN
void hif_set_hia_extnd(struct hif_softc *scn)
static void hif_set_hia_extnd(struct hif_softc *scn)
{
struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn);
struct hif_target_info *tgt_info = hif_get_target_info_handle(hif_hdl);
@ -1719,7 +1719,7 @@ void hif_set_hia_extnd(struct hif_softc *scn)
#else
void hif_set_hia_extnd(struct hif_softc *scn)
static void hif_set_hia_extnd(struct hif_softc *scn)
{
}
@ -1736,7 +1736,7 @@ void hif_set_hia_extnd(struct hif_softc *scn)
*
* Return: 0 for success.
*/
int hif_set_hia(struct hif_softc *scn)
static int hif_set_hia(struct hif_softc *scn)
{
QDF_STATUS rv;
uint32_t interconnect_targ_addr = 0;
@ -2122,9 +2122,9 @@ void hif_pci_close(struct hif_softc *hif_sc)
#define BAR_NUM 0
int hif_enable_pci(struct hif_pci_softc *sc,
struct pci_dev *pdev,
const struct pci_device_id *id)
static int hif_enable_pci(struct hif_pci_softc *sc,
struct pci_dev *pdev,
const struct pci_device_id *id)
{
void __iomem *mem;
int ret = 0;
@ -2226,7 +2226,7 @@ err_region:
return ret;
}
void hif_disable_pci(struct hif_pci_softc *sc)
static void hif_disable_pci(struct hif_pci_softc *sc)
{
struct hif_softc *ol_sc = HIF_GET_SOFTC(sc);
@ -2243,7 +2243,7 @@ void hif_disable_pci(struct hif_pci_softc *sc)
pci_disable_device(sc->pdev);
}
int hif_pci_probe_tgt_wakeup(struct hif_pci_softc *sc)
static int hif_pci_probe_tgt_wakeup(struct hif_pci_softc *sc)
{
int ret = 0;
int targ_awake_limit = 500;
@ -2311,7 +2311,7 @@ end:
return ret;
}
void wlan_tasklet_msi(unsigned long data)
static void wlan_tasklet_msi(unsigned long data)
{
struct hif_tasklet_entry *entry = (struct hif_tasklet_entry *)data;
struct hif_pci_softc *sc = (struct hif_pci_softc *) entry->hif_handler;
@ -2343,7 +2343,7 @@ irq_handled:
}
int hif_configure_msi(struct hif_pci_softc *sc)
static int hif_configure_msi(struct hif_pci_softc *sc)
{
int ret = 0;
int num_msi_desired;
@ -3031,7 +3031,6 @@ void hif_process_runtime_resume_success(struct hif_opaque_softc *hif_ctx)
hif_pm_runtime_mark_last_busy(hif_pci_sc->dev);
hif_runtime_pm_set_state_on(scn);
}
#endif
/**
* hif_runtime_suspend() - do the bus suspend part of a runtime suspend
@ -3091,6 +3090,7 @@ int hif_runtime_resume(struct hif_opaque_softc *hif_ctx)
return status;
}
#endif /* #ifdef FEATURE_RUNTIME_PM */
#if CONFIG_PCIE_64BIT_MSI
static void hif_free_msi_ctx(struct hif_softc *scn)
@ -3517,6 +3517,7 @@ end:
return 0;
}
#ifndef QCA_WIFI_QCA8074_VP
/**
* hif_target_sync() : ensure the target is ready
* @scn: hif controll structure
@ -3528,7 +3529,7 @@ end:
*
* Return: none
*/
void hif_target_sync(struct hif_softc *scn)
static void hif_target_sync(struct hif_softc *scn)
{
hif_write32_mb(scn->mem+(SOC_CORE_BASE_ADDRESS |
PCIE_INTR_ENABLE_ADDRESS),
@ -3567,6 +3568,7 @@ void hif_target_sync(struct hif_softc *scn)
hif_write32_mb(scn->mem + PCIE_LOCAL_BASE_ADDRESS +
PCIE_SOC_WAKE_ADDRESS, PCIE_SOC_WAKE_RESET);
}
#endif /* QCA_WIFI_QCA8074_VP */
/**
* hif_enable_bus(): enable bus

View file

@ -350,6 +350,7 @@ void hif_snoc_irq_disable(struct hif_softc *scn, int ce_id)
*
* Return: 0 for success
*/
static
QDF_STATUS hif_snoc_setup_wakeup_sources(struct hif_softc *scn, bool enable)
{
struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn);