Subject: Re: [net-next v3 2/3] net: wwan: t7xx: Add sysfs attribute for device state machine

From: Sergey Ryazanov <[email-masked]>
Date: Mon, 8 Jan 2024 23:37:52 +0200

On 28.12.2023 11:44, Jinjian Song wrote:

[skipped]

> +	switch (mode) {
> +	case T7XX_READY:
> +		return sprintf(buf, "T7XX_MODEM_READY\n");
> +	case T7XX_RESET:
> +		return sprintf(buf, "T7XX_MODEM_RESET\n");
> +	case T7XX_FASTBOOT_DL_SWITCHING:
> +		return sprintf(buf, "T7XX_MODEM_FASTBOOT_DL_SWITCHING\n");
> +	case T7XX_FASTBOOT_DL_MODE:
> +		return sprintf(buf, "T7XX_MODEM_FASTBOOT_DL_MODE\n");
> +	case T7XX_FASTBOOT_DUMP_MODE:
> +		return sprintf(buf, "T7XX_MODEM_FASTBOOT_DUMP_MODE\n");
> +	default:
> +		return sprintf(buf, "T7XX_UNKNOWN\n");

Out of curiosity, what the purpose of this common prefix "T7XX_MODEM_"? 
Do you have a plan to support more then T7xx modems?

And BTW, can we use a lighter method of string copying like strncpy()?

--
Sergey