Skip to content

Commit

Permalink
Fix warnings in newer GCC versions
Browse files Browse the repository at this point in the history
Change-Id: If0a730a7539aa5a4dcc43725a3c4fbda570cfa46
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38411
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
  • Loading branch information
wilbryan committed Mar 27, 2017
1 parent aa17c1c commit e1889e5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/occ_405/amec/amec_slave_smh.c
Expand Up @@ -236,7 +236,7 @@ void amec_slv_check_apss_fail(void)
Pstate l_pstate = 0;
static bool L_lower_pmax_rail = FALSE;
static bool L_raise_pmax_rail = TRUE;
int rc = 0;

/*------------------------------------------------------------------------*/
/* Code */
/*------------------------------------------------------------------------*/
Expand Down Expand Up @@ -264,7 +264,7 @@ void amec_slv_check_apss_fail(void)
// There is no Pmax "rail" in P9, just set clips via PGPE
l_pstate = proc_freq2pstate(l_pmax_rail_freq);
TRAC_INFO("amec_slv_check_apss_fail: attempting to lower Pstate to nominal");
rc = pgpe_set_clip_ranges(l_pstate);
pgpe_set_clip_ranges(l_pstate);
}

L_lower_pmax_rail = TRUE;
Expand All @@ -285,7 +285,7 @@ void amec_slv_check_apss_fail(void)
// Set the Pmax clip via PGPE
l_pstate = proc_freq2pstate(l_pmax_rail_freq);
TRAC_INFO("amec_slv_check_apss_fail: attempting to raise Pstate to fmax");
rc = pgpe_set_clip_ranges(l_pstate);
pgpe_set_clip_ranges(l_pstate);
}

L_lower_pmax_rail = FALSE;
Expand Down
25 changes: 15 additions & 10 deletions src/occ_405/pss/avsbus.c
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -237,29 +237,34 @@ void avsbus_read_start(const avsbus_type_e i_type,
avsbusData_t l_data;

// Create error array for each type (Vdd/Vdn) and command (Voltage/Current)
if (AVSBUS_VDD == i_type)
{
l_data = G_sysConfigData.avsbus_vdd;
}
else
{
l_data = G_sysConfigData.avsbus_vdn;
}

#ifdef AVSDEBUG
uint8_t l_cmd_index = 0;
char l_trace_cmd = 'V';
char l_trace_type = 'd';

if (i_cmdtype == AVSBUS_CURRENT)
{
l_cmd_index = 1;
l_trace_cmd = 'C';
}

char l_trace_type = 'd';
if (AVSBUS_VDD == i_type)
if (AVSBUS_VDD != i_type)
{
l_data = G_sysConfigData.avsbus_vdd;
}
else
{
l_data = G_sysConfigData.avsbus_vdn;
l_trace_type = 'n';
}

#ifdef AVSDEBUG
static uint32_t L_trace_count[ERRORCOUNT_MAXTYPES][ERRORCOUNT_MAXCMDS] = {{0}};
uint32_t * l_trace_count = &L_trace_count[i_type][l_cmd_index];
uint32_t DEBUG_TRACE_MAX = 2;

if (*l_trace_count < DEBUG_TRACE_MAX)
{
TRAC_INFO("avsbus_read_start: Vd%c %c - bus[%d] rail[%d]",
Expand Down
4 changes: 2 additions & 2 deletions src/occ_405/state.c
Expand Up @@ -373,7 +373,7 @@ errlHndl_t SMGR_all_to_standby()

} while (0);

if(l_errlHndl)
if(l_errlHndl && !l_error_logged)
{
l_error_logged = TRUE;
TRAC_ERR("SMGR: Transition to Standby Failed");
Expand Down Expand Up @@ -448,7 +448,7 @@ errlHndl_t SMGR_characterization_to_observation()
}
} while (0);

if(rc)
if(rc && !l_error_logged)
{
l_error_logged = TRUE;
TRAC_ERR("SMGR: Characterization to Observation Transition Failed");
Expand Down

0 comments on commit e1889e5

Please sign in to comment.