main_v2 - Optimize Crater Lake - Fix Warnings#224
Conversation
|
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
|
||
| int bat_3v_set_gpio(uint8_t sensor_num, void *arg) | ||
| { | ||
| SET_GPIO_VALUE_CFG *cfg = arg; |
There was a problem hiding this comment.
Check to make sure arg != NULL
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
| *reading = (float)val * cfg->arg0 / cfg->arg1 / 1000; | ||
| cfg->cache = *reading; |
There was a problem hiding this comment.
check reading != NULL before use
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
| printf("Sensor number %x read fail\n", sensor_num); | ||
| return false; | ||
| } | ||
| *reading = val; |
There was a problem hiding this comment.
Check reading != NULL before use.
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
| return GUID_OUT_OF_RANGE; | ||
| } | ||
|
|
||
| memcpy(&entry->config, &guid_config[entry->config.dev_id], sizeof(EEPROM_CFG)); |
There was a problem hiding this comment.
We should check that entry != NULL when passed in
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
There was a problem hiding this comment.
Hi @GoldenBug
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
|
|
||
| struct isl69260_page_data isl69260_page_data_args[] = { [0] = { 0x0, 0x0 }, [1] = { 0x0, 0x1 } }; | ||
|
|
||
| int isl69260_switch_page(uint8_t sensor_num, void *args) |
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
| } else { | ||
| // energy / unit time | ||
| *reading = ((float)diff_energy / (float)diff_time * 0.06103515625); | ||
| free(read_buf); |
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
| } | ||
| } | ||
|
|
||
| bool peci_sensor_read(uint8_t sensor_num, float *reading) |
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
| *reading = (float)val; | ||
| cfg->cache = *reading; | ||
| cfg->cache_status = SENSOR_READ_SUCCESS; | ||
| free(read_buf); |
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
|
|
||
| #define RETRY 5 | ||
|
|
||
| bool tmp75_read(uint8_t sensor_num, float *reading) |
There was a problem hiding this comment.
The optimization code is based on v2022.07.01. After that, the main branch has been phased in some
commits related to sensor monitoring. Those changes will be phased in main_v2 in the other PRs. This
problem will be solved in those PRs.
Please check #223 .
| ipmi_message.InF_source = source_inft; | ||
| ipmi_message.InF_target = target_inft; | ||
| ipmi_message.data_len = data_len; | ||
| if (data_len != 0) { |
There was a problem hiding this comment.
We have fixed this and do the forced update.
Please review it. Thanks.
There was a problem hiding this comment.
We have fixed this and do the forced update.
Please review it. Thanks.
|
@DelphineChiu has updated the pull request. You must reimport the pull request before landing. |
|
@DelphineChiu has updated the pull request. You must reimport the pull request before landing. |
|
Dependency: #214 |
|
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
| gpio_num = (group * GPIO_GROUP_SIZE) + pins; | ||
|
|
||
| if (gpio_cfg[gpio_num].int_cb == NULL) { | ||
| printk("CB func pointer NULL for gpio num %d\n", gpio_num); |
There was a problem hiding this comment.
Hi @GoldenBug
We have fixed this and done the forced update.
Please review it. Thanks.
| if (me_msg == NULL) { | ||
| printf("[%s] Failed to allocate memory\n", __func__); | ||
| if ((me_fw_mode != ME_FW_RECOVERY) && (me_fw_mode != ME_FW_RESTORE)) { | ||
| printf("Not support the ME frimware mode 0x%x setting", me_fw_mode); |
There was a problem hiding this comment.
"Unsupported ME firmware mode 0x%x setting"
There was a problem hiding this comment.
We have fixed this and done the forced update.
Please review it. Thanks.
| data_len, data); | ||
| ret = ipmb_read(me_msg, IPMB_inf_index_map[me_msg->InF_target]); | ||
| if (ret != IPMB_ERROR_SUCCESS) { | ||
| printf("Failed to set ME frimware mode to 0x%x, ret: 0x%x\n", me_fw_mode, |
There was a problem hiding this comment.
We have fixed this and done the forced update.
Please review it. Thanks.
| } | ||
| } | ||
| if (i == retry) { | ||
| printf("Failed to set ME frimware mode to 0x%x, retry time: %d\n", me_fw_mode, |
There was a problem hiding this comment.
We have fixed this and done the forced update.
Please review it. Thanks.
| { | ||
| uint8_t proj_stage = (FIRMWARE_REVISION_1 & 0xf0) >> 4; | ||
| printk("Hello, wellcome to yv35 craterlake %x%x.%x.%x\n", BIC_FW_YEAR_MSB, BIC_FW_YEAR_LSB, | ||
| printf("Hello, wellcome to yv35 craterlake %x%x.%x.%x\n", BIC_FW_YEAR_MSB, BIC_FW_YEAR_LSB, |
There was a problem hiding this comment.
We have fixed this and done the forced update.
Please review it. Thanks.
Summary:
- Fix all warnings in CL layer and common layer.
- Refactor ME portion APIs
cd5a7bc to
e0c347f
Compare
|
@DelphineChiu has updated the pull request. You must reimport the pull request before landing. |
|
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Summary: - Fix all warnings in CL layer and common layer. - Refactor ME portion APIs Pull Request resolved: #224 Reviewed By: garnermic Differential Revision: D35319956 Pulled By: GoldenBug fbshipit-source-id: c5ec0e0806bd40c5a92ac1c9c8792446dd4cd88d
Summary: - Fix all warnings in CL layer and common layer. - Refactor ME portion APIs Pull Request resolved: #224 Reviewed By: garnermic Differential Revision: D35941608 Pulled By: GoldenBug fbshipit-source-id: 5537e193e18801062cd0acc728bd1c6466aeebbb
Summary: