adin.c (446279168e030fd0ed68e2bba336bef8bb3da352) adin.c (fb3ceec187e8bca474340e361a18163a2e79c0a2)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Driver for Analog Devices Industrial Ethernet PHYs
4 *
5 * Copyright 2019 Analog Devices Inc.
6 */
7#include <linux/kernel.h>
8#include <linux/bitfield.h>

--- 735 unchanged lines hidden (view full) ---

744 return ARRAY_SIZE(adin_hw_stats);
745}
746
747static void adin_get_strings(struct phy_device *phydev, u8 *data)
748{
749 int i;
750
751 for (i = 0; i < ARRAY_SIZE(adin_hw_stats); i++) {
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Driver for Analog Devices Industrial Ethernet PHYs
4 *
5 * Copyright 2019 Analog Devices Inc.
6 */
7#include <linux/kernel.h>
8#include <linux/bitfield.h>

--- 735 unchanged lines hidden (view full) ---

744 return ARRAY_SIZE(adin_hw_stats);
745}
746
747static void adin_get_strings(struct phy_device *phydev, u8 *data)
748{
749 int i;
750
751 for (i = 0; i < ARRAY_SIZE(adin_hw_stats); i++) {
752 strlcpy(&data[i * ETH_GSTRING_LEN],
752 strscpy(&data[i * ETH_GSTRING_LEN],
753 adin_hw_stats[i].string, ETH_GSTRING_LEN);
754 }
755}
756
757static int adin_read_mmd_stat_regs(struct phy_device *phydev,
758 const struct adin_hw_stat *stat,
759 u32 *val)
760{

--- 238 unchanged lines hidden ---
753 adin_hw_stats[i].string, ETH_GSTRING_LEN);
754 }
755}
756
757static int adin_read_mmd_stat_regs(struct phy_device *phydev,
758 const struct adin_hw_stat *stat,
759 u32 *val)
760{

--- 238 unchanged lines hidden ---