mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
[platform]as5916-26xb/as7316-26xb: take fan speed value to be unsigned to get correct RPM.
Signed-off-by: roy_lee <roy_lee@accton.com>
This commit is contained in:
4
packages/platforms/accton/x86-64/x86-64-accton-as5916-26xb/modules/builds/x86-64-accton-as5916-26xb-psu.c
Normal file → Executable file
4
packages/platforms/accton/x86-64/x86-64-accton-as5916-26xb/modules/builds/x86-64-accton-as5916-26xb-psu.c
Normal file → Executable file
@@ -425,8 +425,8 @@ static ssize_t show_psu(struct device *dev, struct device_attribute *da, char *b
|
||||
case PSU1_FAN_INPUT:
|
||||
case PSU2_FAN_INPUT:
|
||||
VALIDATE_PRESENT_RETURN(pid);
|
||||
value = ((int)data->ipmi_resp[pid].status[PSU_FAN0] |
|
||||
(int)data->ipmi_resp[pid].status[PSU_FAN1] << 8);
|
||||
value = (((unsigned char)data->ipmi_resp[pid].status[PSU_FAN0]) |
|
||||
((unsigned char)data->ipmi_resp[pid].status[PSU_FAN1]) << 8);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
@@ -425,8 +425,8 @@ static ssize_t show_psu(struct device *dev, struct device_attribute *da, char *b
|
||||
case PSU1_FAN_INPUT:
|
||||
case PSU2_FAN_INPUT:
|
||||
VALIDATE_PRESENT_RETURN(pid);
|
||||
value = ((int)data->ipmi_resp[pid].status[PSU_FAN0] |
|
||||
(int)data->ipmi_resp[pid].status[PSU_FAN1] << 8);
|
||||
value = (((unsigned char)data->ipmi_resp[pid].status[PSU_FAN0]) |
|
||||
((unsigned char)data->ipmi_resp[pid].status[PSU_FAN1]) << 8);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user