From 8bd4f992f999c6cfed9f66c36e423c50cb749ff1 Mon Sep 17 00:00:00 2001 From: Krishna Rao Date: Tue, 13 Nov 2018 16:32:14 +0530 Subject: [PATCH] qcacmn: Remove temp_samp_msg_len and unnecessary updates to it Remove unused variable temp_samp_msg_len from target_if_spectral_create_samp_msg(). This variable does get updated, but is ultimately unused. By removing it, we save processor cycles which would otherwise be wasted on the update operations occurring for each Spectral sample. Change-Id: Ib5ca5598d5bee6cc15ca72e9e002239d2e76fd6c CRs-Fixed: 2349113 --- target_if/spectral/target_if_spectral_netlink.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/target_if/spectral/target_if_spectral_netlink.c b/target_if/spectral/target_if_spectral_netlink.c index 68f3157df0d0..4e5d742796ae 100644 --- a/target_if/spectral/target_if_spectral_netlink.c +++ b/target_if/spectral/target_if_spectral_netlink.c @@ -36,8 +36,6 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral, * operation on multi-processor system */ - int temp_samp_msg_len = 0; - struct spectral_samp_msg *spec_samp_msg = NULL; uint8_t *bin_pwr_data = NULL; @@ -61,12 +59,6 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral, if (spectral->spectral_gen == SPECTRAL_GEN3) save_spectral_report_skb(spectral, spec_samp_msg); p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral); - temp_samp_msg_len = sizeof(struct spectral_samp_msg) - - (MAX_NUM_BINS * sizeof(uint8_t)); - temp_samp_msg_len += (params->pwr_count * sizeof(uint8_t)); - if (spectral->ch_width == CH_WIDTH_160MHZ) - temp_samp_msg_len += - (params->pwr_count_sec80 * sizeof(uint8_t)); bin_pwr_data = params->bin_pwr_data; spec_samp_msg->signature = SPECTRAL_SIGNATURE;