From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vps0.lunn.ch ([185.16.172.187]:42763 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163412AbeCBDK5 (ORCPT ); Thu, 1 Mar 2018 22:10:57 -0500 Date: Fri, 2 Mar 2018 04:10:53 +0100 From: Andrew Lunn To: David Miller Cc: netdev , Vivien Didelot , Florian Fainelli Subject: Re: [PATCH v2 net-next 5/5] net: dsa: mv88e6xxx: Get mv88e6352 SERDES statistics Message-ID: <20180302031053.GC12656@lunn.ch> References: <1519866151-13419-1-git-send-email-andrew@lunn.ch> <1519866151-13419-6-git-send-email-andrew@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1519866151-13419-6-git-send-email-andrew@lunn.ch> Sender: netdev-owner@vger.kernel.org List-ID: > +void mv88e6352_serdes_get_strings(struct mv88e6xxx_chip *chip, > + int port, uint8_t *data) > +{ > + struct mv88e6352_serdes_hw_stat *stat; > + int i; > + > + if (!mv88e6352_port_has_serdes(chip, port)) > + return; > + > + for (i = 0; i < ARRAY_SIZE(mv88e6352_serdes_hw_stats); i++) { > + stat = &mv88e6352_serdes_hw_stats[i]; > + memcpy(data + i * ETH_GSTRING_LEN, stat->string, > + ETH_GSTRING_LEN); This has the same problem as Florain just fixed, using memcpy instead of strcnpy. I will spin a new version with this fixed. Andrew