Browse Source

qcacld-3.0: 4.8 Kernel Migration - Update calls to abs()

As of the Linux kernel 4.5, the abs() macro has changed so the results
are no longer promoted to long. Fix related issues.

Change-Id: Ic1e71327427df5fe2b47587f4dc164cbd50b86ee
CRs-Fixed: 1079308
(cherry picked from commit c980b6d8cf8f9a8beeebd702b2fc98e6b8ffc948)
Dustin Brown 8 years ago
parent
commit
53c3aa6a24
2 changed files with 6 additions and 4 deletions
  1. 4 2
      core/sap/dfs/src/dfs_phyerr_tlv.c
  2. 2 2
      core/sme/src/csr/csr_host_scan_roam.c

+ 4 - 2
core/sap/dfs/src/dfs_phyerr_tlv.c

@@ -754,13 +754,15 @@ tlv_calc_event_freq_chirp(struct ath_dfs *dfs, struct rx_radar_status *rs,
 
 	DFS_DPRINTK(dfs, ATH_DEBUG_DFS_PHYERR | ATH_DEBUG_DFS_PHYERR_SUM,
 		    "%s: delta_peak=%d, pulse_duration=%d, bin_resolution=%d.%dKHz, "
-		    "radar_fft_long_period=%d, total_bw=%d.%ldKHz",
+		    "radar_fft_long_period=%d, total_bw=%d.%dKHz",
 		    __func__,
 		    delta_peak,
 		    pulse_duration,
 		    bin_resolution / 1000,
 		    bin_resolution % 1000,
-		    radar_fft_long_period, total_bw / 100, abs(total_bw % 100));
+		    radar_fft_long_period,
+		    total_bw / 100,
+		    (int)abs(total_bw % 100));
 
 	total_bw /= 100;        /* back to KHz */
 

+ 2 - 2
core/sme/src/csr/csr_host_scan_roam.c

@@ -185,9 +185,9 @@ void csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx,
 			descr = &scan_result->BssDescriptor;
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 				  FL("Scan result: BSSID " MAC_ADDRESS_STR
-				     " (Rssi %ld, Ch:%d)"),
+				     " (Rssi %d, Ch:%d)"),
 				  MAC_ADDR_ARRAY(descr->bssId),
-				  abs(descr->rssi), descr->channelId);
+				  (int)abs(descr->rssi), descr->channelId);
 
 			if (!qdf_mem_cmp(descr->bssId,
 					n_roam_info->currAPbssid.bytes,