1From e0b2be7a1fce0fed63bac8c350b711b69edfe30e Mon Sep 17 00:00:00 2001 2From: "yanjun.zhu" <yanjun.zhu@windriver.com> 3Date: Tue, 30 Apr 2019 10:04:58 +0800 4Subject: [PATCH] openhpid/safhpi.c: fix function saHpiSensorThresholdsSet 5 6In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if 7TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not 8SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will 9be set even if TH.IsSupported == SAHPI_FALSE. 10 11Upstream-Status: Submitted 12[https://github.com/open-hpi/openhpi/pull/2744/commits/77a78bb1ada56e55c5ba6d7a5987c214705bf035] 13 14Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> 15Signed-off-by: Yi Zhao <yi.zhao@windriver.com> 16--- 17 openhpid/safhpi.c | 2 +- 18 1 file changed, 1 insertion(+), 1 deletion(-) 19 20diff --git a/openhpid/safhpi.c b/openhpid/safhpi.c 21index 28a2632..61b7f03 100644 22--- a/openhpid/safhpi.c 23+++ b/openhpid/safhpi.c 24@@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholdsSet ( 25 oh_release_domain(d); /* Unlock domain */ 26 27 OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv, 28- ResourceId, SensorNum, SensorThresholds); 29+ ResourceId, SensorNum, &tmp); 30 oh_release_handler(h); 31 32 return rv; 33-- 342.7.4 35 36