lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <875ef470-4cc0-4b68-bdcd-ea54e2ef5271@gmail.com>
Date: Mon, 8 Jan 2024 23:37:52 +0200
From: Sergey Ryazanov <ryazanov.s.a@...il.com>
To: Jinjian Song <songjinjian@...mail.com>
Cc: netdev@...r.kernel.org, chandrashekar.devegowda@...el.com,
 chiranjeevi.rapolu@...ux.intel.com, haijun.liu@...iatek.com,
 m.chetan.kumar@...ux.intel.com, ricardo.martinez@...ux.intel.com,
 loic.poulain@...aro.org, johannes@...solutions.net, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
 linux-kernel@...r.kernel.com, vsankar@...ovo.com, danielwinkler@...gle.com,
 nmarupaka@...gle.com, joey.zhao@...ocom.com, liuqf@...ocom.com,
 felix.yan@...ocom.com, Jinjian Song <jinjian.song@...ocom.com>
Subject: Re: [net-next v3 2/3] net: wwan: t7xx: Add sysfs attribute for device
 state machine

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ