Skip to content

Commit fb931e8

Browse files
LeoCX-TsaiJohnAZoidberg
authored andcommitted
fix error and type
Signed-off-by: LeoCX_Tsai <LeoCX_Tsai@compal.com>
1 parent b6780b4 commit fb931e8

5 files changed

Lines changed: 13 additions & 9 deletions

File tree

baseboard/fwk/thermal.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ int fan_percent_to_rpm(int fan_index, int temp_ratio)
6666
int max = fans[fan_index].rpm->rpm_max;
6767
int min = fans[fan_index].rpm->rpm_min;
6868

69-
if (temp_ratio <= 0) {
69+
if (temp_ratio <= 0)
7070
rpm = 0;
71-
} else {
71+
else
7272
rpm = ((temp_ratio - 1) * max + (100 - temp_ratio) * min) / 99;
73-
}
7473

7574
return rpm;
7675
}
@@ -96,7 +95,7 @@ void board_override_fan_control(int fan, int *temp)
9695

9796
/*
9897
* CPRINTS("fan: %d, is_thermal_control_enabled: %d", fan, is_thermal_control_enabled(fan));
99-
* */
98+
*/
10099
if (!is_thermal_control_enabled(fan))
101100
return;
102101

@@ -106,9 +105,9 @@ void board_override_fan_control(int fan, int *temp)
106105
*/
107106
if (chipset_in_state(CHIPSET_STATE_ON)) {
108107

109-
if (fan == 0) {
108+
if (fan == 0)
110109
thermal_filter_update(&apu_filtered, temp[TEMP_APU]);
111-
}
110+
112111
/*f75303_get_val_mk(TEMP_CPU_F, &apu_temp_mk); */
113112

114113
apu_filtered_temp = thermal_filter_get(&apu_filtered);

board/hx20/board.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,11 @@
452452

453453
#define CONFIG_WP_ACTIVE_HIGH
454454

455+
/*
456+
* fixed hx20 build error reason: undefined reference to `round_divide'
457+
*/
458+
#define CONFIG_MATH_UTIL
459+
455460
/* LED signals */
456461
/*
457462
#define GPIO_BAT_LED_RED GPIO_BATT_LOW_LED_L

board/hx30/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363
#define EC_MEMMAP_ER1_BATT_MANUF_DAY 0x44 /* Manufacturer date - day */
364364
#define EC_MEMMAP_ER1_BATT_MANUF_MONTH 0x45 /* Manufacturer date - month */
365365
#define EC_MEMMAP_ER1_BATT_MANUF_YEAR 0x46 /* Manufacturer date - year */
366-
#define EC_CUSTOMIZED_MEMMAP_DTT_TEMP 0x60
366+
#define EC_CUSTOMIZED_MEMMAP_DTT_TEMP 0x60
367367

368368

369369
#define EC_BATT_FLAG_FULL BIT(0) /* Full Charged */

common/temp_sensor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void update_mapped_memory(void)
5353
*mptr = t - EC_TEMP_SENSOR_OFFSET;
5454
#ifdef CONFIG_CUSTOMIZED_DESIGN
5555
board_update_temperature_mk(i);
56-
#endif
56+
#endif
5757
break;
5858
default:
5959
*mptr = EC_TEMP_SENSOR_ERROR;

driver/temp_sensor/f75303.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static int get_temp(const int offset, int *temp)
5454
return EC_SUCCESS;
5555
}
5656
#else
57-
static int get_temp( const int offset, int *temp)
57+
static int get_temp(const int offset, int *temp)
5858
{
5959
int rv;
6060
int data = 0;

0 commit comments

Comments
 (0)