msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
`pldm_msgbuf_extract_sensor_value()` extracts the sensor value from
the pldm_msgbuf. The type of the `tag` should be the sensor data type
but not the effecter data type.
Change the input `tag` parameter type from `pldm_effecter_data_size`
to `pldm_sensor_readings_data_type`.
Fixes: 840b140a92aa ("platform: pldm_msgbuf for decode_get_sensor_reading_resp()")
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I3e7da13c2d3260026bb15c7127c08087ea46593f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6954de0..1bd4dc5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -40,6 +40,7 @@
1. libpldm: Rationalise the local and installed path of pldm.h
2. pdr: Assign record_handle in entity_association_pdr_add_children()
+3. msgbuf: Require sensor data enum in pldm_msgbuf_extract_sensor_value()
## [0.7.0] - 2023-08-29
diff --git a/src/msgbuf/platform.h b/src/msgbuf/platform.h
index 3fbe077..217962e 100644
--- a/src/msgbuf/platform.h
+++ b/src/msgbuf/platform.h
@@ -56,7 +56,8 @@
*/
__attribute__((always_inline)) static inline int
pldm_msgbuf_extract_sensor_value(struct pldm_msgbuf *ctx,
- enum pldm_effecter_data_size tag, uint8_t *val)
+ enum pldm_sensor_readings_data_type tag,
+ uint8_t *val)
{
switch (tag) {
case PLDM_SENSOR_DATA_SIZE_UINT8: