This patch updates the iteration logic for the non-standard
error decoding functions.
Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
.sec_type = "fbc2d923ea7a453dab132949f5af9e53",
.decode = decode_hip07_hns_error,
},
+ { /* sentinel */ }
};
__attribute__((constructor))
static void hip07_init(void)
{
- hisi_ns_dec_tab[0].len = ARRAY_SIZE(hisi_ns_dec_tab);
register_ns_dec_tab(hisi_ns_dec_tab);
}
for (count = 0; count < dec_tab_count && !dec_done; count++) {
dec_tab = ns_dec_tab[count];
- for (i = 0; i < dec_tab[0].len; i++) {
+ for (i = 0; dec_tab[i].decode; i++) {
if (uuid_le_cmp(ev.sec_type,
dec_tab[i].sec_type) == 0) {
dec_tab[i].decode(s, ev.error);
typedef struct ras_ns_dec_tab {
const char *sec_type;
int (*decode)(struct trace_seq *s, const void *err);
- size_t len;
} *p_ns_dec_tab;
int ras_non_standard_event_handler(struct trace_seq *s,