From 67ebc3de24c34a5658bdc3901df7611c5bf036aa Mon Sep 17 00:00:00 2001 From: hangtian Date: Wed, 16 Jan 2019 17:36:51 +0800 Subject: [PATCH] qcacmn: Use qdf_mem_zero for zero initialization, qdf part Use qdf_mem_zero for zero initialization, qdf part. Change-Id: I9c8980c2d2355e315f13541db65c4b11b12c5124 CRs-Fixed: 2378005 --- qdf/linux/src/qdf_crypto.c | 2 +- qdf/linux/src/qdf_trace.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/qdf/linux/src/qdf_crypto.c b/qdf/linux/src/qdf_crypto.c index c8b080347f80..cdbc0f714435 100644 --- a/qdf/linux/src/qdf_crypto.c +++ b/qdf/linux/src/qdf_crypto.c @@ -210,7 +210,7 @@ int qdf_aes_s2v(const uint8_t *key, unsigned int key_len, const uint8_t *s[], /* len(Sn) < 128 */ /* T = qdf_update_dbl(D) xor pad(Sn) */ qdf_update_dbl(d); - qdf_mem_set(buf, AES_BLOCK_SIZE, 0); + qdf_mem_zero(buf, AES_BLOCK_SIZE); qdf_mem_copy(buf, s[i], s_len[i]); buf[s_len[i]] = 0x80; xor(d, s[i], AES_BLOCK_SIZE); diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index 42410fdf31af..e5312c175382 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -1121,7 +1121,7 @@ dump_dp_hex_trace(char *prepend_str, uint8_t *inbuf, uint8_t inbuf_len) char *outbuf_ptr = outbuf; int outbytes_written = 0; - qdf_mem_set(outbuf, 0, sizeof(outbuf)); + qdf_mem_zero(outbuf, sizeof(outbuf)); do { outbytes_written += scnprintf(outbuf_ptr, BUFFER_SIZE - outbytes_written, @@ -1424,7 +1424,7 @@ static void qdf_dp_fill_record_data uint8_t *rec_data = rec->data; uint8_t data_to_copy = 0; - qdf_mem_set(rec_data, QDF_DP_TRACE_RECORD_SIZE, 0); + qdf_mem_zero(rec_data, QDF_DP_TRACE_RECORD_SIZE); /* copy meta data */ if (meta_data) { @@ -1846,7 +1846,7 @@ void qdf_dp_display_mgmt_pkt(struct qdf_dp_trace_record_s *record, struct qdf_dp_trace_mgmt_buf *buf = (struct qdf_dp_trace_mgmt_buf *)record->data; - qdf_mem_set(prepend_str, 0, sizeof(prepend_str)); + qdf_mem_zero(prepend_str, sizeof(prepend_str)); loc = qdf_dp_trace_fill_meta_str(prepend_str, sizeof(prepend_str), index, info, record); @@ -1887,7 +1887,7 @@ void qdf_dp_display_event_record(struct qdf_dp_trace_record_s *record, struct qdf_dp_trace_event_buf *buf = (struct qdf_dp_trace_event_buf *)record->data; - qdf_mem_set(prepend_str, 0, sizeof(prepend_str)); + qdf_mem_zero(prepend_str, sizeof(prepend_str)); qdf_dp_trace_fill_meta_str(prepend_str, sizeof(prepend_str), index, info, record); @@ -1939,7 +1939,7 @@ void qdf_dp_display_proto_pkt(struct qdf_dp_trace_record_s *record, struct qdf_dp_trace_proto_buf *buf = (struct qdf_dp_trace_proto_buf *)record->data; - qdf_mem_set(prepend_str, 0, sizeof(prepend_str)); + qdf_mem_zero(prepend_str, sizeof(prepend_str)); loc = qdf_dp_trace_fill_meta_str(prepend_str, sizeof(prepend_str), index, info, record); DPTRACE_PRINT("%s [%d] [%s] SA: " @@ -1992,7 +1992,7 @@ void qdf_dp_display_ptr_record(struct qdf_dp_trace_record_s *record, (record->code == QDF_DP_TRACE_LI_DP_FREE_PACKET_PTR_RECORD)) is_free_pkt_ptr_record = true; - qdf_mem_set(prepend_str, 0, sizeof(prepend_str)); + qdf_mem_zero(prepend_str, sizeof(prepend_str)); loc = qdf_dp_trace_fill_meta_str(prepend_str, sizeof(prepend_str), index, info, record); @@ -2074,7 +2074,7 @@ void qdf_dp_display_record(struct qdf_dp_trace_record_s *record, pdev_id == record->pdev_id)) return; - qdf_mem_set(prepend_str, 0, sizeof(prepend_str)); + qdf_mem_zero(prepend_str, sizeof(prepend_str)); loc = qdf_dp_trace_fill_meta_str(prepend_str, sizeof(prepend_str), index, info, record); @@ -2106,7 +2106,7 @@ qdf_dp_display_data_pkt_record(struct qdf_dp_trace_record_s *record, struct qdf_dp_trace_data_buf *buf = (struct qdf_dp_trace_data_buf *)record->data; - qdf_mem_set(prepend_str, 0, sizeof(prepend_str)); + qdf_mem_zero(prepend_str, sizeof(prepend_str)); loc = qdf_dp_trace_fill_meta_str(prepend_str, sizeof(prepend_str), rec_index, info, record);