Skip to content

Commit

Permalink
staging: csr: remove func_enter macro
Browse files Browse the repository at this point in the history
this macro is used for debugging purposes,

it actually defined as

if (unifi_debug >= 5) {
	printk("unifi => %s\n", __FUNCTION__);
}

which produces too many of those prints if the unifi_debug is >=5.
remove these calls and the macro itself altogether

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Devendra Naga authored and Greg Kroah-Hartman committed Oct 29, 2012
1 parent cb1f626 commit 438d2d1
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 214 deletions.
56 changes: 0 additions & 56 deletions drivers/staging/csr/csr_wifi_hip_card_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv)
card_t *card;
u32 i;

func_enter();


card = kzalloc(sizeof(card_t), GFP_KERNEL);
if (card == NULL)
Expand Down Expand Up @@ -171,7 +169,6 @@ CsrResult unifi_init_card(card_t *card, s32 led_mask)
{
CsrResult r;

func_enter();

if (card == NULL)
{
Expand Down Expand Up @@ -223,8 +220,6 @@ CsrResult unifi_init(card_t *card)
CsrResult r;
CsrResult csrResult;

func_enter();

if (card == NULL)
{
func_exit_r(CSR_WIFI_HIP_RESULT_INVALID_VALUE);
Expand Down Expand Up @@ -363,8 +358,6 @@ CsrResult unifi_download(card_t *card, s32 led_mask)
CsrResult r;
void *dlpriv;

func_enter();

if (card == NULL)
{
func_exit_r(CSR_WIFI_HIP_RESULT_INVALID_VALUE);
Expand Down Expand Up @@ -425,8 +418,6 @@ static CsrResult unifi_hip_init(card_t *card)
CsrResult r;
CsrResult csrResult;

func_enter();

r = card_hw_init(card);
if (r == CSR_WIFI_HIP_RESULT_NO_DEVICE)
{
Expand Down Expand Up @@ -609,8 +600,6 @@ static CsrResult card_hw_init(card_t *card)
s16 search_4slut_again;
CsrResult csrResult;

func_enter();

/*
* The device revision from the TPLMID_MANF and TPLMID_CARD fields
* of the CIS are available as
Expand Down Expand Up @@ -1004,8 +993,6 @@ static CsrResult card_wait_for_unifi_to_reset(card_t *card)
u8 io_enable;
CsrResult csrResult;

func_enter();

r = CSR_RESULT_SUCCESS;
for (i = 0; i < MAILBOX2_ATTEMPTS; i++)
{
Expand Down Expand Up @@ -1136,8 +1123,6 @@ static CsrResult card_wait_for_unifi_to_disable(card_t *card)
u8 io_enable;
CsrResult csrResult;

func_enter();

if (card->chip_id <= SDIO_CARD_ID_UNIFI_2)
{
unifi_error(card->ospriv,
Expand Down Expand Up @@ -1238,8 +1223,6 @@ CsrResult card_wait_for_firmware_to_start(card_t *card, u32 *paddr)
u16 mbox0, mbox1;
CsrResult r;

func_enter();

/*
* Wait for UniFi to initialise its data structures by polling
* the SHARED_MAILBOX1 register.
Expand Down Expand Up @@ -1358,7 +1341,6 @@ CsrResult card_wait_for_firmware_to_start(card_t *card, u32 *paddr)
*/
CsrResult unifi_capture_panic(card_t *card)
{
func_enter();

/* The firmware must have previously initialised to read the panic addresses
* from the SLUT
Expand Down Expand Up @@ -1405,8 +1387,6 @@ static CsrResult card_access_panic(card_t *card)
s32 i;
CsrResult r, sr;

func_enter();

/* A chip version of zero means that the version never got succesfully read
* during reset. In this case give up because it will not be possible to
* verify the chip version.
Expand Down Expand Up @@ -1536,8 +1516,6 @@ void unifi_read_panic(card_t *card)
CsrResult r;
u16 p_code, p_arg;

func_enter();

/* The firmware must have previously initialised to read the panic addresses
* from the SLUT
*/
Expand Down Expand Up @@ -1607,8 +1585,6 @@ static CsrResult card_allocate_memory_resources(card_t *card)
s16 n, i, k, r;
sdio_config_data_t *cfg_data;

func_enter();

/* Reset any state carried forward from a previous life */
card->fh_command_queue.q_rd_ptr = 0;
card->fh_command_queue.q_wr_ptr = 0;
Expand Down Expand Up @@ -1781,7 +1757,6 @@ static void unifi_free_bulk_data(card_t *card, bulk_data_desc_t *bulk_data_slot)
*/
static void card_free_memory_resources(card_t *card)
{
func_enter();

unifi_trace(card->ospriv, UDBG1, "Freeing card memory resources.\n");

Expand Down Expand Up @@ -1820,8 +1795,6 @@ static void card_init_soft_queues(card_t *card)
{
s16 i;

func_enter();

unifi_trace(card->ospriv, UDBG1, "Initialising internal signal queues.\n");
/* Reset any state carried forward from a previous life */
card->fh_command_queue.q_rd_ptr = 0;
Expand Down Expand Up @@ -1858,7 +1831,6 @@ static void card_init_soft_queues(card_t *card)
void unifi_cancel_pending_signals(card_t *card)
{
s16 i, n, r;
func_enter();

unifi_trace(card->ospriv, UDBG1, "Canceling pending signals.\n");

Expand Down Expand Up @@ -1951,7 +1923,6 @@ void unifi_cancel_pending_signals(card_t *card)
*/
void unifi_free_card(card_t *card)
{
func_enter();
#ifdef CSR_PRE_ALLOC_NET_DATA
prealloc_netdata_free(card);
#endif
Expand Down Expand Up @@ -1989,8 +1960,6 @@ static CsrResult card_init_slots(card_t *card)
CsrResult r;
u8 i;

func_enter();

/* Allocate the buffers we need, only once. */
if (card->memory_resources_allocated == 1)
{
Expand Down Expand Up @@ -2153,8 +2122,6 @@ static void CardReassignDynamicReservation(card_t *card)
{
u8 i;

func_enter();

unifi_trace(card->ospriv, UDBG5, "Packets Txed %d %d %d %d\n",
card->dynamic_slot_data.packets_txed[0],
card->dynamic_slot_data.packets_txed[1],
Expand Down Expand Up @@ -2206,8 +2173,6 @@ static void CardCheckDynamicReservation(card_t *card, unifi_TrafficQueue queue)
q_t *sigq;
u16 num_data_slots = card->config_data.num_fromhost_data_slots - UNIFI_RESERVED_COMMAND_SLOTS;

func_enter();

/* Calculate the pending queue length */
sigq = &card->fh_traffic_queue[queue];
q_len = CSR_WIFI_HIP_Q_SLOTS_USED(sigq);
Expand Down Expand Up @@ -2336,8 +2301,6 @@ void CardClearFromHostDataSlot(card_t *card, const s16 slot)
u8 queue = card->from_host_data[slot].queue;
const void *os_data_ptr = card->from_host_data[slot].bd.os_data_ptr;

func_enter();

if (card->from_host_data[slot].bd.data_length == 0)
{
unifi_warning(card->ospriv,
Expand Down Expand Up @@ -2457,8 +2420,6 @@ u16 CardGetFreeFromHostDataSlots(card_t *card)
{
u16 i, n = 0;

func_enter();

/* First two slots reserved for MLME */
for (i = 0; i < card->config_data.num_fromhost_data_slots; i++)
{
Expand Down Expand Up @@ -2506,7 +2467,6 @@ u16 CardAreAllFromHostDataSlotsEmpty(card_t *card)

static CsrResult unifi_identify_hw(card_t *card)
{
func_enter();

card->chip_id = card->sdio_if->sdioId.cardId;
card->function = card->sdio_if->sdioId.sdioFunction;
Expand Down Expand Up @@ -2541,8 +2501,6 @@ static CsrResult unifi_prepare_hw(card_t *card)
CsrResult csrResult;
enum unifi_host_state old_state = card->host_state;

func_enter();

r = unifi_identify_hw(card);
if (r == CSR_WIFI_HIP_RESULT_NO_DEVICE)
{
Expand Down Expand Up @@ -2625,8 +2583,6 @@ static CsrResult unifi_read_chip_version(card_t *card)
CsrResult r;
u16 ver;

func_enter();

gbl_chip_version = ChipHelper_GBL_CHIP_VERSION(card->helper);

/* Try to read the chip version from register. */
Expand Down Expand Up @@ -2684,8 +2640,6 @@ static CsrResult unifi_reset_hardware(card_t *card)
u16 new_block_size = UNIFI_IO_BLOCK_SIZE;
CsrResult csrResult;

func_enter();

/* Errors returned by unifi_prepare_hw() are not critical at this point */
r = unifi_prepare_hw(card);
if (r == CSR_WIFI_HIP_RESULT_NO_DEVICE)
Expand Down Expand Up @@ -2818,8 +2772,6 @@ static CsrResult card_reset_method_io_enable(card_t *card)
CsrResult r;
CsrResult csrResult;

func_enter();

/*
* This resets only function 1, so should be used in
* preference to the method below (CSR_FUNC_EN)
Expand Down Expand Up @@ -2915,8 +2867,6 @@ static CsrResult card_reset_method_dbg_reset(card_t *card)
{
CsrResult r;

func_enter();

/*
* Prepare UniFi for h/w reset
*/
Expand Down Expand Up @@ -3008,8 +2958,6 @@ CsrResult unifi_card_hard_reset(card_t *card)
const struct chip_helper_reset_values *init_data;
u32 chunks;

func_enter();

/* Clear cache of page registers */
card->proc_select = (u32)(-1);
card->dmem_page = (u32)(-1);
Expand Down Expand Up @@ -3097,8 +3045,6 @@ CsrResult CardGenInt(card_t *card)
{
CsrResult r;

func_enter();

if (card->chip_id > SDIO_CARD_ID_UNIFI_2)
{
r = sdio_write_f0(card, SDIO_CSR_FROM_HOST_SCRATCH0,
Expand Down Expand Up @@ -3388,8 +3334,6 @@ CsrResult CardWriteBulkData(card_t *card, card_signal_t *csptr, unifi_TrafficQue
bulk_data_desc_t *bulkdata = csptr->bulkdata;
s16 h, nslots;

func_enter();

/* Count the number of slots required */
for (i = 0; i < UNIFI_MAX_DATA_REFERENCES; i++)
{
Expand Down
4 changes: 0 additions & 4 deletions drivers/staging/csr/csr_wifi_hip_download.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,6 @@ CsrResult unifi_dl_firmware(card_t *card, void *dlpriv)
xbv1_t *fwinfo;
CsrResult r;

func_enter();

fwinfo = kmalloc(sizeof(xbv1_t), GFP_KERNEL);
if (fwinfo == NULL)
{
Expand Down Expand Up @@ -407,8 +405,6 @@ CsrResult unifi_dl_patch(card_t *card, void *dlpriv, u32 boot_ctrl)
xbv1_t *fwinfo;
CsrResult r;

func_enter();

unifi_info(card->ospriv, "unifi_dl_patch %p %08x\n", dlpriv, boot_ctrl);

fwinfo = kmalloc(sizeof(xbv1_t), GFP_KERNEL);
Expand Down
17 changes: 0 additions & 17 deletions drivers/staging/csr/csr_wifi_hip_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ CsrResult unifi_coredump_request_at_next_reset(card_t *card, s8 enable)
{
CsrResult r;

func_enter();

if (enable)
{
unifi_trace(card->ospriv, UDBG2, "Mini-coredump requested after reset\n");
Expand Down Expand Up @@ -145,8 +143,6 @@ CsrResult unifi_coredump_handle_request(card_t *card)
{
CsrResult r = CSR_RESULT_SUCCESS;

func_enter();

if (card == NULL)
{
r = CSR_WIFI_HIP_RESULT_INVALID_VALUE;
Expand Down Expand Up @@ -194,8 +190,6 @@ CsrResult unifi_coredump_capture(card_t *card, struct unifi_coredump_req *req)
static u16 dump_seq_no = 1;
u32 time_of_capture;

func_enter();

if (card->dump_next_write == NULL)
{
r = CSR_RESULT_SUCCESS;
Expand Down Expand Up @@ -358,8 +352,6 @@ CsrResult unifi_coredump_get_value(card_t *card, struct unifi_coredump_req *req)
s32 i = 0;
coredump_buffer *find_dump = NULL;

func_enter();

if (req == NULL || card == NULL)
{
r = CSR_WIFI_HIP_RESULT_INVALID_VALUE;
Expand Down Expand Up @@ -481,8 +473,6 @@ static CsrResult unifi_coredump_read_zone(card_t *card, u16 *zonebuf, const stru
{
CsrResult r;

func_enter();

if (zonebuf == NULL || def == NULL)
{
r = CSR_WIFI_HIP_RESULT_INVALID_VALUE;
Expand Down Expand Up @@ -551,8 +541,6 @@ static CsrResult unifi_coredump_read_zones(card_t *card, coredump_buffer *dump_b
CsrResult r = CSR_RESULT_SUCCESS;
s32 i;

func_enter();

/* Walk the table of coredump zone definitions and read them from the chip */
for (i = 0;
(i < HIP_CDUMP_NUM_ZONES) && (r == 0);
Expand Down Expand Up @@ -590,8 +578,6 @@ static CsrResult unifi_coredump_from_sdio(card_t *card, coredump_buffer *dump_bu
CsrResult r;
u32 sdio_addr;

func_enter();

if (dump_buf == NULL)
{
r = CSR_WIFI_HIP_RESULT_INVALID_VALUE;
Expand Down Expand Up @@ -743,8 +729,6 @@ CsrResult unifi_coredump_init(card_t *card, u16 num_dump_buffers)
u32 i = 0;
#endif

func_enter();

card->request_coredump_on_reset = 0;
card->dump_next_write = NULL;
card->dump_cur_read = NULL;
Expand Down Expand Up @@ -826,7 +810,6 @@ void unifi_coredump_free(card_t *card)
s16 i = 0;
s16 j;

func_enter();
unifi_trace(ospriv, UDBG2, "Core dump de-configured\n");

if (card->dump_buf == NULL)
Expand Down
Loading

0 comments on commit 438d2d1

Please sign in to comment.