Fix accessors for temperature field when it is negative
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 5 repliesIn review
- v1 posting 2/22 patches 5 repliesSuperseded
- v1 posting 1/22 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- Rebase on the latest pending branch
- Remove dbg() messages in libcxl accessors (Vishal)
- Make signed value accessors to return INT_MAX when error occurs and set errno as proper errno codes (Vishal)
- Use proper value for checking "life_used" and "device_temperature" fields are implemented
- Link to v1: https://lore.kernel.org/r/[email protected]/
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | libcxl: Update a revision by CXL 3.0 specificationcxl/ | +1 | 3 replies | |
| 2/3 | libcxl: Fix accessors for temperature field to support negative valuecxl/ | +21 | 2 replies | |
| 3/3 | cxl: Fix the checking value when listing device's health infocxl/ | +5 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Jonathan Cameron | Davidlohr Bueso |
|---|---|---|
| 1/3 | R-b | R-b |
| 2/3 | ||
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [ndctl PATCH v2 0/3] Fix accessors for temperature field when it is negative
In CXL 3.0 SPEC, 8.2.9.8.3.1 and 8.2.9.8.3.2 define temperature fields as a 2's complement value. However, they are retrieved by the same accessor for unsigned value. This causes inaccuracy when the value is negative.
The first patch updates the pre-defined value for temperature field of the Get Health Info command when it is not implemented by complying CXL 3.0 specification. (CXL 3.0 8.2.9.8.3.1)
The second patch fixes accessors for temperature fields.
Add a new payload accessor for a signed value, then use it for retrieving temperature properly. INT_MAX is used to indicate errors because negative errno codes are not distinguishable from the retrieved values when they are negative. Caller should check errno to know what kind of error occurs.
The third patch fixes the checking value when listing device's health info.
Changes in v2:
- Rebase on the latest pending branch
- Remove dbg() messages in libcxl accessors (Vishal)
- Make signed value accessors to return INT_MAX when error occurs and set errno as proper errno codes (Vishal)
- Use proper value for checking "life_used" and "device_temperature" fields are implemented
- Link to v1: https://lore.kernel.org/r/[email protected]/
Jehoon Park (3):
libcxl: Update a revision by CXL 3.0 specification
libcxl: Fix accessors for temperature field to support negative value
cxl: Fix the checking value when listing device's health info
cxl/json.c | 9 +++++---- cxl/lib/libcxl.c | 32 +++++++++++++++++++++----------- cxl/lib/private.h | 2 +- 3 files changed, 27 insertions(+), 16 deletions(-)
base-commit: a871e6153b11fe63780b37cdcb1eb347b296095c
Signature · 1 line
2.17.1