perf hisi-ptt: Fix spelling and abbreviation errors

Fix spelling and abbreviation errors in the PTT packet decoder:
- HISI_PTT_FIELD_LENTH -> HISI_PTT_FIELD_LENGTH
- hisi_ptt_8dw_kpt_desc -> hisi_ptt_8dw_pkt_desc
- hisi_ptt_4dw_kpt_desc -> hisi_ptt_4dw_pkt_desc

Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Sizhe Liu <liusizhe5@huawei.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
Sizhe Liu
2026-07-30 14:27:09 +08:00
committed by Namhyung Kim
parent d5f9d46232
commit bec06676f4
3 changed files with 12 additions and 12 deletions

View File

@@ -85,7 +85,7 @@ static void hisi_ptt_print_pkt(const unsigned char *buf, int pos, const char *de
dw = get_unaligned_le32(buf + pos);
printf(".");
color_fprintf(stdout, color, " %08x: ", pos);
for (i = 0; i < HISI_PTT_FIELD_LENTH; i++) {
for (i = 0; i < HISI_PTT_FIELD_LENGTH; i++) {
byte = (dw >> (24 - i * 8)) & 0xFF;
color_fprintf(stdout, color, "%02x ", byte);
}
@@ -94,19 +94,19 @@ static void hisi_ptt_print_pkt(const unsigned char *buf, int pos, const char *de
color_fprintf(stdout, color, " %s\n", desc);
}
static int hisi_ptt_8dw_kpt_desc(const unsigned char *buf, int pos)
static int hisi_ptt_8dw_pkt_desc(const unsigned char *buf, int pos)
{
int i;
for (i = 0; i < HISI_PTT_8DW_TYPE_MAX; i++) {
/* Do not show 8DW check field and reserved fields */
if (i == HISI_PTT_8DW_CHK_AND_RSV0 || i == HISI_PTT_8DW_RSV1) {
pos += HISI_PTT_FIELD_LENTH;
pos += HISI_PTT_FIELD_LENGTH;
continue;
}
hisi_ptt_print_pkt(buf, pos, hisi_ptt_8dw_pkt_field_name[i]);
pos += HISI_PTT_FIELD_LENTH;
pos += HISI_PTT_FIELD_LENGTH;
}
return hisi_ptt_pkt_size[HISI_PTT_8DW_PKT];
@@ -122,7 +122,7 @@ static void hisi_ptt_4dw_print_dw0(const unsigned char *buf, int pos)
dw = get_unaligned_le32(buf + pos);
printf(".");
color_fprintf(stdout, color, " %08x: ", pos);
for (i = 0; i < HISI_PTT_FIELD_LENTH; i++) {
for (i = 0; i < HISI_PTT_FIELD_LENGTH; i++) {
byte = (dw >> (24 - i * 8)) & 0xFF;
color_fprintf(stdout, color, "%02x ", byte);
}
@@ -141,16 +141,16 @@ static void hisi_ptt_4dw_print_dw0(const unsigned char *buf, int pos)
"Time", FIELD_GET(HISI_PTT_HEAD0_4DW_TIME, dw));
}
static int hisi_ptt_4dw_kpt_desc(const unsigned char *buf, int pos)
static int hisi_ptt_4dw_pkt_desc(const unsigned char *buf, int pos)
{
int i;
hisi_ptt_4dw_print_dw0(buf, pos);
pos += HISI_PTT_FIELD_LENTH;
pos += HISI_PTT_FIELD_LENGTH;
for (i = 0; i < HISI_PTT_4DW_TYPE_MAX; i++) {
hisi_ptt_print_pkt(buf, pos, hisi_ptt_4dw_pkt_field_name[i]);
pos += HISI_PTT_FIELD_LENTH;
pos += HISI_PTT_FIELD_LENGTH;
}
return hisi_ptt_pkt_size[HISI_PTT_4DW_PKT];
@@ -159,7 +159,7 @@ static int hisi_ptt_4dw_kpt_desc(const unsigned char *buf, int pos)
int hisi_ptt_pkt_desc(const unsigned char *buf, int pos, enum hisi_ptt_pkt_type type)
{
if (type == HISI_PTT_8DW_PKT)
return hisi_ptt_8dw_kpt_desc(buf, pos);
return hisi_ptt_8dw_pkt_desc(buf, pos);
return hisi_ptt_4dw_kpt_desc(buf, pos);
return hisi_ptt_4dw_pkt_desc(buf, pos);
}

View File

@@ -15,7 +15,7 @@
#define HISI_PTT_8DW_CHECK_MASK GENMASK(31, 11)
#define HISI_PTT_IS_8DW_PKT GENMASK(31, 11)
#define HISI_PTT_MAX_SPACE_LEN 10
#define HISI_PTT_FIELD_LENTH 4
#define HISI_PTT_FIELD_LENGTH 4
/* Header DW0 fields for 4DW format */
#define HISI_PTT_HEAD0_4DW_TIME GENMASK_U32(10, 0)

View File

@@ -42,7 +42,7 @@ static enum hisi_ptt_pkt_type hisi_ptt_check_packet_type(unsigned char *buf,
{
uint32_t head;
if (len < HISI_PTT_FIELD_LENTH)
if (len < HISI_PTT_FIELD_LENGTH)
return HISI_PTT_4DW_PKT;
head = get_unaligned_le32(buf);