Commit ca943d09 authored by Nishanth Menon's avatar Nishanth Menon

[COMMON] fix up build warnings

Fix up build warnings in common directory
Signed-off-by: default avatarNishanth Menon <nm@ti.com>
parent 727b8e6b
......@@ -85,49 +85,49 @@
*//*------------------------------------------------------------------------ */
int audit_performances(FILE *stream, unsigned int duration, unsigned int delay)
{
int ret;
unsigned short skip_proc_stats_audit;
unsigned int cpu_cores_cnt, cpu_online_cores_cnt;
unsigned short *cpu_online;
unsigned int *idle_t0, *iowait_t0, *sum_t0;
unsigned int *idle_t1, *iowait_t1, *sum_t1;
unsigned int *idle_cnt, *iowait_cnt, *sum_cnt;
double *load, load_total;
unsigned int cstates_nbr;
uint64_t cstates_usage[MAX_CSTATE][3];
uint64_t cstates_time[MAX_CSTATE][3];
unsigned short emif;
unsigned int emif_busy_cycles[2];
unsigned int emif_cycles[2];
unsigned int emif_delta_cycles,
emif_delta_busy_cycles;
double emif_load;
int ret = 0;
unsigned short skip_proc_stats_audit = 0;
unsigned int cpu_cores_cnt = 0, cpu_online_cores_cnt = 0;
unsigned short *cpu_online = NULL;
unsigned int *idle_t0 = NULL, *iowait_t0 = NULL, *sum_t0 = NULL;
unsigned int *idle_t1 = NULL, *iowait_t1 = NULL, *sum_t1 = NULL;
unsigned int *idle_cnt = NULL, *iowait_cnt = NULL, *sum_cnt = NULL;
double *load = NULL, load_total = 0;
unsigned int cstates_nbr = 0;
uint64_t cstates_usage[MAX_CSTATE][3] = { {0} };
uint64_t cstates_time[MAX_CSTATE][3] = { {0} };
unsigned short emif = 0;
unsigned int emif_busy_cycles[2] = { 0 };
unsigned int emif_cycles[2] = { 0 };
unsigned int emif_delta_cycles = 0,
emif_delta_busy_cycles = 0;
double emif_load = 0;
uint64_t *time_in_opp_t0 = NULL;
uint64_t *time_in_opp_t1 = NULL;
uint64_t *time_in_opp_cnt = NULL;
uint64_t total_trans_t0, total_trans_t1, total_trans_cnt;
unsigned int i;
uint64_t sec, msec, usec, active_c0_time;
double pct;
uint64_t total_trans_t0 = 0, total_trans_t1 = 0, total_trans_cnt = 0;
unsigned int i = 0;
uint64_t sec = 0, msec = 0, usec = 0, active_c0_time = 0;
double pct = 0;
char table[TABLE_MAX_ROW][TABLE_MAX_COL][TABLE_MAX_ELT_LEN];
unsigned int row = 0;
char name[16];
char name[16] = { 0 };
FILE *fp = NULL;
char perf_summary_file[64];
FILE *fp_irq_1, *fp_irq_2, *fp_timerstats;
unsigned int irq_total_count, occurred_irq_count, timer_count;
FILE *fp_irq_1 = NULL, *fp_irq_2 = NULL, *fp_timerstats = NULL;
unsigned int irq_total_count = 0, occurred_irq_count = 0, timer_count = 0;
genlist occurred_irq_list, timerstats_list;
irq_info irq_inf;
timerstat_info timer_inf;
char irq_snap_file1[32];
char irq_snap_file2[32];
char timerstats_file[32];
char timerstats_summary[256];
unsigned int skip_irq_audit, skip_cstate_audit;
int skip_timerstats_audit;
char *workdir;
unsigned short skip_cpufreq_audit;
unsigned int opp_cnt;
irq_info irq_inf = { 0 };
timerstat_info timer_inf = { 0 };
char irq_snap_file1[32] = { 0 };
char irq_snap_file2[32] = { 0 };
char timerstats_file[32] = { 0 };
char timerstats_summary[256] = { 0 };
unsigned int skip_irq_audit = 0, skip_cstate_audit = 0;
int skip_timerstats_audit = 0;
char *workdir = NULL;
unsigned short skip_cpufreq_audit = 0;
unsigned int opp_cnt = 0;
if (duration == 0) {
......
......@@ -112,9 +112,9 @@ int autoadjust_table_generic_fprint(FILE *stream,
{
unsigned int total_dash_nbr = 0;
unsigned int total_width = 0;
char *dash_line;
char *line;
char *title;
char *dash_line = NULL;
char *line = NULL;
char *title = NULL;
unsigned int col, row;
unsigned int tmp;
unsigned int max_elt_size[TABLE_MAX_COL];
......
......@@ -483,7 +483,7 @@ int genlist_removehead(genlist *list)
*//*------------------------------------------------------------------------ */
int genlist_removetail(genlist *list)
{
genlist_elt *elt, *elt2;
genlist_elt *elt = NULL, *elt2 = NULL;
unsigned int i;
/* Check args */
......@@ -538,7 +538,7 @@ int genlist_removetail(genlist *list)
*//*------------------------------------------------------------------------ */
int genlist_remove(genlist *list, unsigned int pos)
{
genlist_elt *elt, *elt2;
genlist_elt *elt, *elt2 = NULL;
unsigned int i;
/* Check args */
......
......@@ -547,33 +547,33 @@ static void print_rate(char table[TABLE_MAX_ROW][TABLE_MAX_COL][TABLE_MAX_ELT_LE
*//*------------------------------------------------------------------------ */
int opp_show(FILE *stream)
{
int start, end;
int volt, volt2;
char *mod_name;
const char *opp_s, *opp_s2;
int temp;
int rate_mpu, rate_mpu_por;
int rate_dsp, rate_eve, rate_iva, rate_gpu;
int rate_dsp_por, rate_eve_por, rate_iva_por, rate_gpu_por;
int rate_l3, rate_l3_por;
int rate_l4, rate_emif, rate_lpddr2, rate_aess, rate_aess_por, rate_iss,
rate_fdif, rate_dss, rate_bb2d, rate_hsi;
int start = 0, end = 0;
int volt = 0, volt2 = 0;
char *mod_name = NULL;
const char *opp_s = NULL, *opp_s2 = NULL;
int temp = 0;
int rate_mpu = 0, rate_mpu_por = 0;
int rate_dsp = 0, rate_eve = 0, rate_iva = 0, rate_gpu = 0;
int rate_dsp_por = 0, rate_eve_por = 0, rate_iva_por = 0, rate_gpu_por = 0;
int rate_l3 = 0, rate_l3_por = 0;
int rate_l4 = 0, rate_emif = 0, rate_lpddr2 = 0, rate_aess = 0, rate_aess_por = 0, rate_iss = 0,
rate_fdif = 0, rate_dss = 0, rate_bb2d = 0, rate_hsi = 0;
/* modules only for dra7 */
int rate_dsp2, rate_eve2, rate_dmm, rate_emif2, rate_ipu2;
int rate_dsp2 = 0, rate_eve2 = 0, rate_dmm = 0, rate_emif2 = 0, rate_ipu2 = 0;
/* modules for am335x */
int rate_l3f, rate_l3f_por, rate_l4_fast;
int rate_l3f = 0, rate_l3f_por = 0, rate_l4_fast = 0;
int rate_cal, rate_ipu, rate_c2c;
int rate_cal = 0, rate_ipu = 0, rate_c2c = 0;
char table[TABLE_MAX_ROW][TABLE_MAX_COL][TABLE_MAX_ELT_LEN];
unsigned int row = 0;
unsigned int retry_cnt = 0;
unsigned int found = 0;
const genlist *voltdm_list;
voltdm_info voltdm;
int i, vdd_count;
char prev_gov[CPUFREQ_GOV_MAX_NAME_LENGTH],
prev_gov2[CPUFREQ_GOV_MAX_NAME_LENGTH];
const char *temp_sensor;
const genlist *voltdm_list = NULL;
voltdm_info voltdm = {0};
int i = 0, vdd_count = 0;
char prev_gov[CPUFREQ_GOV_MAX_NAME_LENGTH] = {0},
prev_gov2[CPUFREQ_GOV_MAX_NAME_LENGTH] = {0};
const char *temp_sensor = NULL;
/* Switch to userspace governor temporarily,
* so that OPP cannot change during audit and does not false it.
......
......@@ -1513,7 +1513,7 @@ int trace_perf_capture(const char *cfgfile, const char *prefix,
char *geninput_units[TRACE_MAX_GENINPUTS];
int geninput_accumulating[TRACE_MAX_GENINPUTS];
int geninput_flags[TRACE_MAX_GENINPUTS];
int geninput_num, geninput_first, geninput_last;
int geninput_num, geninput_first = 0, geninput_last = 0;
uint64_t *geninput_data[TRACE_MAX_GENINPUTS];
uint64_t geninput_delta;
uint64_t geninput_min[TRACE_MAX_GENINPUTS];
......
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