clang-tidy: Fix readability-identifier-naming diagnostic
For example:
```
/usr/bin/clang-tidy -checks=-*, readability-identifier-naming -export-fixes /tmp/tmpsjbxtnss/tmpbj5pbywt.yaml -p=build /mnt/host/andrew/src/openbmc/libpldm/src/platform.c
/mnt/host/andrew/src/openbmc/libpldm/build/../include/libpldm/pdr.h:166:6: error: invalid case style for function 'pldm_pdr_update_TL_pdr' [readability-identifier-naming,-warnings-as-errors]
void pldm_pdr_update_TL_pdr(const pldm_pdr *repo, uint16_t terminusHandle,
^~~~~~~~~~~~~~~~~~~~~~
pldm_pdr_update_tl_pdr
/mnt/host/andrew/src/openbmc/libpldm/build/../include/libpldm/pdr.h:166:60: error: invalid case style for parameter 'terminusHandle' [readability-identifier-naming,-warnings-as-errors]
void pldm_pdr_update_TL_pdr(const pldm_pdr *repo, uint16_t terminusHandle,
^~~~~~~~~~~~~~
terminus_handle
/mnt/host/andrew/src/openbmc/libpldm/build/../include/libpldm/pdr.h:167:29: error: invalid case style for parameter 'tlEid' [readability-identifier-naming,-warnings-as-errors]
uint8_t tid, uint8_t tlEid, bool valid);
^~~~~
tl_eid
```
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I6419dade685ee656fe773451148f15aefb20becd
diff --git a/src/pdr.c b/src/pdr.c
index b53f491..2fe9e7b 100644
--- a/src/pdr.c
+++ b/src/pdr.c
@@ -320,30 +320,31 @@
return NULL;
}
-void pldm_pdr_update_TL_pdr(const pldm_pdr *repo, uint16_t terminusHandle,
- uint8_t tid, uint8_t tlEid, bool validBit)
+/* NOLINTNEXTLINE(readability-identifier-naming) */
+void pldm_pdr_update_TL_pdr(const pldm_pdr *repo, uint16_t terminus_handle,
+ uint8_t tid, uint8_t tl_eid, bool valid_bit)
{
- uint8_t *outData = NULL;
+ uint8_t *out_data = NULL;
uint32_t size = 0;
const pldm_pdr_record *record;
record = pldm_pdr_find_record_by_type(repo, PLDM_TERMINUS_LOCATOR_PDR,
- NULL, &outData, &size);
+ NULL, &out_data, &size);
do {
if (record != NULL) {
struct pldm_terminus_locator_pdr *pdr =
- (struct pldm_terminus_locator_pdr *)outData;
+ (struct pldm_terminus_locator_pdr *)out_data;
struct pldm_terminus_locator_type_mctp_eid *value =
(struct pldm_terminus_locator_type_mctp_eid *)
pdr->terminus_locator_value;
- if (pdr->terminus_handle == terminusHandle &&
- pdr->tid == tid && value->eid == tlEid) {
- pdr->validity = validBit;
+ if (pdr->terminus_handle == terminus_handle &&
+ pdr->tid == tid && value->eid == tl_eid) {
+ pdr->validity = valid_bit;
break;
}
}
record = pldm_pdr_find_record_by_type(
- repo, PLDM_TERMINUS_LOCATOR_PDR, record, &outData, &size);
+ repo, PLDM_TERMINUS_LOCATOR_PDR, record, &out_data, &size);
} while (record);
}