[PATCH 1/4] [v1,1/4] zsda: Introduce zsda device drivers

Stephen Hemminger stephen at networkplumber.org
Thu Aug 8 17:23:45 CEST 2024


On Thu,  8 Aug 2024 16:50:11 +0800
Hanxiao Li <li.hanxiao at zte.com.cn> wrote:

> +static uint8_t
> +zsda_crc8(uint8_t *message, int length)
> +{
> +	uint8_t crc = 0;
> +	int i;
> +
> +	for (i = 0; i < length; i++)
> +		crc = crc8_table[crc ^ message[i]];
> +	return crc;
> +}

The code in this driver could start using const many places
to clarify what is input and what is result.


More information about the dev mailing list