diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-20 17:16:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-20 17:16:11 -0400 |
commit | b7244a31e160c4c43043962228e61ae00b03b4c3 (patch) | |
tree | ca7974690d3ee64fb8d86dd90eb353712f88a5e5 | |
parent | 957417bfeca2893254e660b01e18e71bd4572a38 (diff) |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/csr/csr_util.c | 6 | ||||
-rw-r--r-- | drivers/staging/csr/csr_util.h | 2 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_card_sdio.c | 6 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c | 6 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_download.c | 2 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_dump.c | 4 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_xbv.c | 4 | ||||
-rw-r--r-- | drivers/staging/csr/unifi_sme.c | 2 |
8 files changed, 12 insertions, 20 deletions
diff --git a/drivers/staging/csr/csr_util.c b/drivers/staging/csr/csr_util.c index 48ed9b79e073..7b9afeb4eb8f 100644 --- a/drivers/staging/csr/csr_util.c +++ b/drivers/staging/csr/csr_util.c | |||
@@ -43,12 +43,6 @@ void *CsrMemCpy(void *dest, const void *src, size_t count) | |||
43 | } | 43 | } |
44 | EXPORT_SYMBOL_GPL(CsrMemCpy); | 44 | EXPORT_SYMBOL_GPL(CsrMemCpy); |
45 | 45 | ||
46 | void *CsrMemSet(void *dest, u8 c, size_t count) | ||
47 | { | ||
48 | return memset(dest, c, count); | ||
49 | } | ||
50 | EXPORT_SYMBOL_GPL(CsrMemSet); | ||
51 | |||
52 | void *CsrMemMove(void *dest, const void *src, size_t count) | 46 | void *CsrMemMove(void *dest, const void *src, size_t count) |
53 | { | 47 | { |
54 | return memmove(dest, src, count); | 48 | return memmove(dest, src, count); |
diff --git a/drivers/staging/csr/csr_util.h b/drivers/staging/csr/csr_util.h index 3561344f67bf..a32db1757e10 100644 --- a/drivers/staging/csr/csr_util.h +++ b/drivers/staging/csr/csr_util.h | |||
@@ -35,7 +35,6 @@ void CsrUInt16ToHex(u16 number, char *str); | |||
35 | #define CsrStrCmp(s1, s2) ((s32) strcmp((s1), (s2))) | 35 | #define CsrStrCmp(s1, s2) ((s32) strcmp((s1), (s2))) |
36 | #define CsrStrNCmp(s1, s2, n) ((s32) strncmp((s1), (s2), (n))) | 36 | #define CsrStrNCmp(s1, s2, n) ((s32) strncmp((s1), (s2), (n))) |
37 | #define CsrStrChr strchr | 37 | #define CsrStrChr strchr |
38 | #define CsrMemSet memset | ||
39 | #define CsrStrLen strlen | 38 | #define CsrStrLen strlen |
40 | #else /* !CSR_USE_STDC_LIB */ | 39 | #else /* !CSR_USE_STDC_LIB */ |
41 | void *CsrMemCpy(void *dest, const void *src, size_t count); | 40 | 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 | s32 CsrStrCmp(const char *string1, const char *string2); | 45 | s32 CsrStrCmp(const char *string1, const char *string2); |
47 | s32 CsrStrNCmp(const char *string1, const char *string2, size_t count); | 46 | s32 CsrStrNCmp(const char *string1, const char *string2, size_t count); |
48 | char *CsrStrChr(const char *string, char c); | 47 | char *CsrStrChr(const char *string, char c); |
49 | void *CsrMemSet(void *dest, u8 c, size_t count); | ||
50 | size_t CsrStrLen(const char *string); | 48 | size_t CsrStrLen(const char *string); |
51 | #endif /* !CSR_USE_STDC_LIB */ | 49 | #endif /* !CSR_USE_STDC_LIB */ |
52 | s32 CsrVsnprintf(char *string, size_t count, const char *format, va_list args); | 50 | s32 CsrVsnprintf(char *string, size_t count, const char *format, va_list args); |
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio.c b/drivers/staging/csr/csr_wifi_hip_card_sdio.c index 22778de081dd..78fc5c47b614 100644 --- a/drivers/staging/csr/csr_wifi_hip_card_sdio.c +++ b/drivers/staging/csr/csr_wifi_hip_card_sdio.c | |||
@@ -77,7 +77,7 @@ card_t* unifi_alloc_card(CsrSdioFunction *sdio, void *ospriv) | |||
77 | { | 77 | { |
78 | return NULL; | 78 | return NULL; |
79 | } | 79 | } |
80 | CsrMemSet(card, 0, sizeof(card_t)); | 80 | memset(card, 0, sizeof(card_t)); |
81 | 81 | ||
82 | 82 | ||
83 | card->sdio_if = sdio; | 83 | card->sdio_if = sdio; |
@@ -2090,7 +2090,7 @@ static CsrResult card_init_slots(card_t *card) | |||
2090 | } | 2090 | } |
2091 | 2091 | ||
2092 | /* Dynamic queue reservation */ | 2092 | /* Dynamic queue reservation */ |
2093 | CsrMemSet(&card->dynamic_slot_data, 0, sizeof(card_dynamic_slot_t)); | 2093 | memset(&card->dynamic_slot_data, 0, sizeof(card_dynamic_slot_t)); |
2094 | 2094 | ||
2095 | for (i = 0; i < UNIFI_NO_OF_TX_QS; i++) | 2095 | for (i = 0; i < UNIFI_NO_OF_TX_QS; i++) |
2096 | { | 2096 | { |
@@ -4109,7 +4109,7 @@ void unifi_get_hip_qos_info(card_t *card, unifi_HipQosInfo *hipqosinfo) | |||
4109 | q_t *sigq; | 4109 | q_t *sigq; |
4110 | u16 nslots, i; | 4110 | u16 nslots, i; |
4111 | 4111 | ||
4112 | CsrMemSet(hipqosinfo, 0, sizeof(unifi_HipQosInfo)); | 4112 | memset(hipqosinfo, 0, sizeof(unifi_HipQosInfo)); |
4113 | 4113 | ||
4114 | nslots = card->config_data.num_fromhost_data_slots; | 4114 | nslots = card->config_data.num_fromhost_data_slots; |
4115 | 4115 | ||
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c index 9f2343c2f468..b491110d230b 100644 --- a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c +++ b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c | |||
@@ -2105,7 +2105,7 @@ static CsrResult process_fh_cmd_queue(card_t *card, s32 *processed) | |||
2105 | (u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4)); | 2105 | (u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4)); |
2106 | 2106 | ||
2107 | CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length); | 2107 | CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length); |
2108 | CsrMemSet(card->fh_buffer.ptr + 2 + signal_length, 0, | 2108 | memset(card->fh_buffer.ptr + 2 + signal_length, 0, |
2109 | total_length - (2 + signal_length)); | 2109 | total_length - (2 + signal_length)); |
2110 | 2110 | ||
2111 | #ifdef CSR_WIFI_HIP_NOISY | 2111 | #ifdef CSR_WIFI_HIP_NOISY |
@@ -2383,7 +2383,7 @@ static CsrResult process_fh_traffic_queue(card_t *card, s32 *processed) | |||
2383 | (u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4)); | 2383 | (u8)(((signal_length >> 8) & 0xf) | (SDIO_CMD_SIGNAL << 4)); |
2384 | 2384 | ||
2385 | CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length); | 2385 | CsrMemCpy(card->fh_buffer.ptr + 2, packed_sigptr, signal_length); |
2386 | CsrMemSet(card->fh_buffer.ptr + 2 + signal_length, 0, | 2386 | memset(card->fh_buffer.ptr + 2 + signal_length, 0, |
2387 | total_length - (2 + signal_length)); | 2387 | total_length - (2 + signal_length)); |
2388 | 2388 | ||
2389 | #ifdef CSR_WIFI_HIP_NOISY | 2389 | #ifdef CSR_WIFI_HIP_NOISY |
@@ -2485,7 +2485,7 @@ static CsrResult flush_fh_buffer(card_t *card) | |||
2485 | { | 2485 | { |
2486 | padding_chunks = (data_round / sig_units) - chunks_in_last_block; | 2486 | padding_chunks = (data_round / sig_units) - chunks_in_last_block; |
2487 | 2487 | ||
2488 | CsrMemSet(card->fh_buffer.ptr, 0, padding_chunks * sig_units); | 2488 | memset(card->fh_buffer.ptr, 0, padding_chunks * sig_units); |
2489 | for (i = 0; i < padding_chunks; i++) | 2489 | for (i = 0; i < padding_chunks; i++) |
2490 | { | 2490 | { |
2491 | card->fh_buffer.ptr[1] = SDIO_CMD_PADDING << 4; | 2491 | card->fh_buffer.ptr[1] = SDIO_CMD_PADDING << 4; |
diff --git a/drivers/staging/csr/csr_wifi_hip_download.c b/drivers/staging/csr/csr_wifi_hip_download.c index a9d0c39c341e..15da98e2ca9e 100644 --- a/drivers/staging/csr/csr_wifi_hip_download.c +++ b/drivers/staging/csr/csr_wifi_hip_download.c | |||
@@ -697,7 +697,7 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv, | |||
697 | 697 | ||
698 | /* Zero out the rest of the buffer (This isn't needed, but it | 698 | /* Zero out the rest of the buffer (This isn't needed, but it |
699 | * makes debugging things later much easier). */ | 699 | * makes debugging things later much easier). */ |
700 | CsrMemSet(buf + data_len, 0, write_len - data_len); | 700 | memset(buf + data_len, 0, write_len - data_len); |
701 | } | 701 | } |
702 | else | 702 | else |
703 | { | 703 | { |
diff --git a/drivers/staging/csr/csr_wifi_hip_dump.c b/drivers/staging/csr/csr_wifi_hip_dump.c index 3dee9972d183..0d1f9df24114 100644 --- a/drivers/staging/csr/csr_wifi_hip_dump.c +++ b/drivers/staging/csr/csr_wifi_hip_dump.c | |||
@@ -671,7 +671,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode) | |||
671 | { | 671 | { |
672 | return NULL; | 672 | return NULL; |
673 | } | 673 | } |
674 | CsrMemSet(newnode, 0, sizeof(coredump_buffer)); | 674 | memset(newnode, 0, sizeof(coredump_buffer)); |
675 | 675 | ||
676 | /* Allocate chip memory zone capture buffers */ | 676 | /* Allocate chip memory zone capture buffers */ |
677 | for (i = 0; i < HIP_CDUMP_NUM_ZONES; i++) | 677 | for (i = 0; i < HIP_CDUMP_NUM_ZONES; i++) |
@@ -681,7 +681,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode) | |||
681 | newnode->zone[i] = newzone; | 681 | newnode->zone[i] = newzone; |
682 | if (newzone != NULL) | 682 | if (newzone != NULL) |
683 | { | 683 | { |
684 | CsrMemSet(newzone, 0, zone_size); | 684 | memset(newzone, 0, zone_size); |
685 | } | 685 | } |
686 | else | 686 | else |
687 | { | 687 | { |
diff --git a/drivers/staging/csr/csr_wifi_hip_xbv.c b/drivers/staging/csr/csr_wifi_hip_xbv.c index 2c0e46665547..e841306adb1a 100644 --- a/drivers/staging/csr/csr_wifi_hip_xbv.c +++ b/drivers/staging/csr/csr_wifi_hip_xbv.c | |||
@@ -166,7 +166,7 @@ CsrResult xbv1_parse(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwin | |||
166 | ct.ioffset = 0; | 166 | ct.ioffset = 0; |
167 | ct.iread = readfn; | 167 | ct.iread = readfn; |
168 | 168 | ||
169 | CsrMemSet(fwinfo, 0, sizeof(xbv1_t)); | 169 | memset(fwinfo, 0, sizeof(xbv1_t)); |
170 | fwinfo->mode = xbv_unknown; | 170 | fwinfo->mode = xbv_unknown; |
171 | 171 | ||
172 | /* File must start with XBV1 triplet */ | 172 | /* File must start with XBV1 triplet */ |
@@ -1026,7 +1026,7 @@ void* xbv_to_patch(card_t *card, fwreadfn_t readfn, | |||
1026 | return NULL; | 1026 | return NULL; |
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | CsrMemSet(patch_buf, 0xdd, patch_buf_size); | 1029 | memset(patch_buf, 0xdd, patch_buf_size); |
1030 | 1030 | ||
1031 | /* Write XBV + VERF headers */ | 1031 | /* Write XBV + VERF headers */ |
1032 | patch_offs += write_xbv_header(patch_buf, patch_offs, 0); | 1032 | patch_offs += write_xbv_header(patch_buf, patch_offs, 0); |
diff --git a/drivers/staging/csr/unifi_sme.c b/drivers/staging/csr/unifi_sme.c index 85e0c9e56353..2fe7b576a0e0 100644 --- a/drivers/staging/csr/unifi_sme.c +++ b/drivers/staging/csr/unifi_sme.c | |||
@@ -1210,7 +1210,7 @@ void uf_send_pkt_to_encrypt(struct work_struct *work) | |||
1210 | 1210 | ||
1211 | if (pktBulkDataLength > 0) { | 1211 | if (pktBulkDataLength > 0) { |
1212 | pktBulkData = (u8 *)CsrPmemAlloc(pktBulkDataLength); | 1212 | pktBulkData = (u8 *)CsrPmemAlloc(pktBulkDataLength); |
1213 | CsrMemSet(pktBulkData, 0, pktBulkDataLength); | 1213 | memset(pktBulkData, 0, pktBulkDataLength); |
1214 | } else { | 1214 | } else { |
1215 | unifi_error(priv, "uf_send_pkt_to_encrypt() : invalid buffer\n"); | 1215 | unifi_error(priv, "uf_send_pkt_to_encrypt() : invalid buffer\n"); |
1216 | return; | 1216 | return; |