Commit b7244a31 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

staging: csr: remove CsrMemSet

It's really just memset(), so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 957417bf
...@@ -43,12 +43,6 @@ void *CsrMemCpy(void *dest, const void *src, size_t count) ...@@ -43,12 +43,6 @@ void *CsrMemCpy(void *dest, const void *src, size_t count)
} }
EXPORT_SYMBOL_GPL(CsrMemCpy); EXPORT_SYMBOL_GPL(CsrMemCpy);
void *CsrMemSet(void *dest, u8 c, size_t count)
{
return memset(dest, c, count);
}
EXPORT_SYMBOL_GPL(CsrMemSet);
void *CsrMemMove(void *dest, const void *src, size_t count) void *CsrMemMove(void *dest, const void *src, size_t count)
{ {
return memmove(dest, src, count); return memmove(dest, src, count);
......
...@@ -35,7 +35,6 @@ void CsrUInt16ToHex(u16 number, char *str); ...@@ -35,7 +35,6 @@ void CsrUInt16ToHex(u16 number, char *str);
#define CsrStrCmp(s1, s2) ((s32) strcmp((s1), (s2))) #define CsrStrCmp(s1, s2) ((s32) strcmp((s1), (s2)))
#define CsrStrNCmp(s1, s2, n) ((s32) strncmp((s1), (s2), (n))) #define CsrStrNCmp(s1, s2, n) ((s32) strncmp((s1), (s2), (n)))
#define CsrStrChr strchr #define CsrStrChr strchr
#define CsrMemSet memset
#define CsrStrLen strlen #define CsrStrLen strlen
#else /* !CSR_USE_STDC_LIB */ #else /* !CSR_USE_STDC_LIB */
void *CsrMemCpy(void *dest, const void *src, size_t count); void *CsrMemCpy(void *dest, const void *src, size_t count);
...@@ -46,7 +45,6 @@ s32 CsrMemCmp(const void *buf1, const void *buf2, size_t count); ...@@ -46,7 +45,6 @@ s32 CsrMemCmp(const void *buf1, const void *buf2, size_t count);
s32 CsrStrCmp(const char *string1, const char *string2); s32 CsrStrCmp(const char *string1, const char *string2);
s32 CsrStrNCmp(const char *string1, const char *string2, size_t count); s32 CsrStrNCmp(const char *string1, const char *string2, size_t count);
char *CsrStrChr(const char *string, char c); char *CsrStrChr(const char *string, char c);
void *CsrMemSet(void *dest, u8 c, size_t count);
size_t CsrStrLen(const char *string); size_t CsrStrLen(const char *string);
#endif /* !CSR_USE_STDC_LIB */ #endif /* !CSR_USE_STDC_LIB */
s32 CsrVsnprintf(char *string, size_t count, const char *format, va_list args); s32 CsrVsnprintf(char *string, size_t count, const char *format, va_list args);
......
...@@ -77,7 +77,7 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv) ...@@ -77,7 +77,7 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv)
{ {
return NULL; return NULL;
} }
CsrMemSet(card, 0, sizeof(card_t)); memset(card, 0, sizeof(card_t));
card->sdio_if = sdio; card->sdio_if = sdio;
...@@ -2090,7 +2090,7 @@ static CsrResult card_init_slots(card_t *card) ...@@ -2090,7 +2090,7 @@ static CsrResult card_init_slots(card_t *card)
} }
/* Dynamic queue reservation */ /* Dynamic queue reservation */
CsrMemSet(&card->dynamic_slot_data, 0, sizeof(card_dynamic_slot_t)); memset(&card->dynamic_slot_data, 0, sizeof(card_dynamic_slot_t));
for (i = 0; i < UNIFI_NO_OF_TX_QS; i++) for (i = 0; i < UNIFI_NO_OF_TX_QS; i++)
{ {
...@@ -4109,7 +4109,7 @@ void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo) ...@@ -4109,7 +4109,7 @@ void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo)
q_t *sigq; q_t *sigq;
u16 nslots, i; u16 nslots, i;
CsrMemSet(hipqosinfo, 0, sizeof(unifi_HipQosInfo)); memset(hipqosinfo, 0, sizeof(unifi_HipQosInfo));
nslots = card->config_data.num_fromhost_data_slots; nslots = card->config_data.num_fromhost_data_slots;
......
...@@ -2105,7 +2105,7 @@ static CsrResult process_fh_cmd_queue(card_t *card, s32 *processed) ...@@ -2105,7 +2105,7 @@ static CsrResult process_fh_cmd_queue(card_t *card, s32 *processed)
(u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4)); (u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4));
CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length); CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length);
CsrMemSet(card->fh_buffer.ptr + 2 + signal_length, 0, memset(card->fh_buffer.ptr + 2 + signal_length, 0,
total_length - (2 + signal_length)); total_length - (2 + signal_length));
#ifdef CSR_WIFI_HIP_NOISY #ifdef CSR_WIFI_HIP_NOISY
...@@ -2383,7 +2383,7 @@ static CsrResult process_fh_traffic_queue(card_t *card, s32 *processed) ...@@ -2383,7 +2383,7 @@ static CsrResult process_fh_traffic_queue(card_t *card, s32 *processed)
(u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4)); (u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4));
CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length); CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length);
CsrMemSet(card->fh_buffer.ptr + 2 + signal_length, 0, memset(card->fh_buffer.ptr + 2 + signal_length, 0,
total_length - (2 + signal_length)); total_length - (2 + signal_length));
#ifdef CSR_WIFI_HIP_NOISY #ifdef CSR_WIFI_HIP_NOISY
...@@ -2485,7 +2485,7 @@ static CsrResult flush_fh_buffer(card_t *card) ...@@ -2485,7 +2485,7 @@ static CsrResult flush_fh_buffer(card_t *card)
{ {
padding_chunks = (data_round / sig_units) - chunks_in_last_block; padding_chunks = (data_round / sig_units) - chunks_in_last_block;
CsrMemSet(card->fh_buffer.ptr, 0, padding_chunks * sig_units); memset(card->fh_buffer.ptr, 0, padding_chunks * sig_units);
for (i = 0; i < padding_chunks; i++) for (i = 0; i < padding_chunks; i++)
{ {
card->fh_buffer.ptr[1] = SDIO_CMD_PADDING << 4; card->fh_buffer.ptr[1] = SDIO_CMD_PADDING << 4;
......
...@@ -697,7 +697,7 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv, ...@@ -697,7 +697,7 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv,
/* Zero out the rest of the buffer (This isn't needed, but it /* Zero out the rest of the buffer (This isn't needed, but it
* makes debugging things later much easier). */ * makes debugging things later much easier). */
CsrMemSet(buf + data_len, 0, write_len - data_len); memset(buf + data_len, 0, write_len - data_len);
} }
else else
{ {
......
...@@ -671,7 +671,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode) ...@@ -671,7 +671,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode)
{ {
return NULL; return NULL;
} }
CsrMemSet(newnode, 0, sizeof(coredump_buffer)); memset(newnode, 0, sizeof(coredump_buffer));
/* Allocate chip memory zone capture buffers */ /* Allocate chip memory zone capture buffers */
for (i = 0; i < HIP_CDUMP_NUM_ZONES; i++) for (i = 0; i < HIP_CDUMP_NUM_ZONES; i++)
...@@ -681,7 +681,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode) ...@@ -681,7 +681,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode)
newnode->zone[i] = newzone; newnode->zone[i] = newzone;
if (newzone != NULL) if (newzone != NULL)
{ {
CsrMemSet(newzone, 0, zone_size); memset(newzone, 0, zone_size);
} }
else else
{ {
......
...@@ -166,7 +166,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin ...@@ -166,7 +166,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin
ct.ioffset = 0; ct.ioffset = 0;
ct.iread = readfn; ct.iread = readfn;
CsrMemSet(fwinfo, 0, sizeof(xbv1_t)); memset(fwinfo, 0, sizeof(xbv1_t));
fwinfo->mode = xbv_unknown; fwinfo->mode = xbv_unknown;
/* File must start with XBV1 triplet */ /* File must start with XBV1 triplet */
...@@ -1026,7 +1026,7 @@ void* xbv_to_patch(card_t *card, fwreadfn_t readfn, ...@@ -1026,7 +1026,7 @@ void* xbv_to_patch(card_t *card, fwreadfn_t readfn,
return NULL; return NULL;
} }
CsrMemSet(patch_buf, 0xdd, patch_buf_size); memset(patch_buf, 0xdd, patch_buf_size);
/* Write XBV + VERF headers */ /* Write XBV + VERF headers */
patch_offs += write_xbv_header(patch_buf, patch_offs, 0); patch_offs += write_xbv_header(patch_buf, patch_offs, 0);
......
...@@ -1210,7 +1210,7 @@ void uf_send_pkt_to_encrypt(struct work_struct *work) ...@@ -1210,7 +1210,7 @@ void uf_send_pkt_to_encrypt(struct work_struct *work)
if (pktBulkDataLength > 0) { if (pktBulkDataLength > 0) {
pktBulkData = (u8 *)CsrPmemAlloc(pktBulkDataLength); pktBulkData = (u8 *)CsrPmemAlloc(pktBulkDataLength);
CsrMemSet(pktBulkData, 0, pktBulkDataLength); memset(pktBulkData, 0, pktBulkDataLength);
} else { } else {
unifi_error(priv, "uf_send_pkt_to_encrypt() : invalid buffer\n"); unifi_error(priv, "uf_send_pkt_to_encrypt() : invalid buffer\n");
return; return;
......
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