lkml.org 
[lkml]   [2022]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v3 1/5] net: ipqess: introduce the Qualcomm IPQESS driver
> +static void ipqess_get_strings(struct net_device *netdev, u32 stringset,
> + u8 *data)
> +{
> + u8 *p = data;
> + u32 i;
> +
> + switch (stringset) {
> + case ETH_SS_STATS:
> + for (i = 0; i < ARRAY_SIZE(ipqess_stats); i++) {
> + memcpy(p, ipqess_stats[i].string,
> + min((size_t)ETH_GSTRING_LEN,
> + strlen(ipqess_stats[i].string) + 1));

That looks pretty similar to strlcpy().

> +static int ipqess_get_settings(struct net_device *netdev,
> + struct ethtool_link_ksettings *cmd)

It would be traditional to have the k in the name.

> +{
> + struct ipqess *ess = netdev_priv(netdev);
> +
> + return phylink_ethtool_ksettings_get(ess->phylink, cmd);
> +}
> +
> +static int ipqess_set_settings(struct net_device *netdev,
> + const struct ethtool_link_ksettings *cmd)
> +{

Here too.

Andrew

\
 
 \ /
  Last update: 2022-08-27 21:29    [W:1.576 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site