Subject: Re: [PATCH net-next 1/3] net: libwx: support hardware statistics

From: Stephen Hemminger <[email-masked]>
Date: Mon, 18 Sep 2023 08:23:09 -0700

On Mon, 18 Sep 2023 15:21:06 +0800
Jiawen Wu <[email-masked]> wrote:

> +
> +struct wx_stats {
> +	char stat_string[ETH_GSTRING_LEN];
> +	int type;
> +	int sizeof_stat;
> +	int stat_offset;
> +};

Type here is an enum. Therefore for type safety you should use that
enum for the type field rather than int.

Since offset and size can never be negative, why not use offset_t and size_t instead.