Messages in this thread | | | Date | Tue, 25 Jul 2023 18:07:18 +0200 | From | Simon Horman <> | Subject | Re: [PATCH net-next v4 03/11] net: phy: nxp-c45-tja11xx: prepare the ground for TJA1120 |
| |
On Mon, Jul 24, 2023 at 05:12:24PM +0300, Radu Pirea (NXP OSS) wrote:
...
> static void nxp_c45_get_strings(struct phy_device *phydev, u8 *data) > { > + const struct nxp_c45_phy_data *phy_data = nxp_c45_get_data(phydev); > + size_t count = nxp_c45_get_sset_count(phydev); > + size_t idx; > size_t i; > > - for (i = 0; i < ARRAY_SIZE(nxp_c45_hw_stats); i++) { > + for (i = 0; i < count; i++) { > + if (i < ARRAY_SIZE(common_hw_stats)) { > + strncpy(data + i * ETH_GSTRING_LEN, > + common_hw_stats[i].name, ETH_GSTRING_LEN);
Hi Radu,
Checkpatch suggests using strscpy() here.
Link: https://github.com/KSPP/linux/issues/90:0
...
| |