Re: [PATCH v2 net] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-24 Thread Richard Cochran
On Tue, Nov 24, 2020 at 11:01:26AM -0500, min.li...@renesas.com wrote: > From: Min Li > > Feed kstrtou8 with NULL terminated string. > > Changes since v1: > -Use sscanf to get rid of adhoc string parse. This is much nicer. Small issue remains... > + u8 ver1[3], ver2[3]; > + int i; > +

Re: [PATCH v2 net] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-23 Thread Richard Cochran
On Mon, Nov 23, 2020 at 03:20:06PM -0500, min.li...@renesas.com wrote: > From: Min Li > > Feed kstrtou8 with NULL terminated string. > > Changes since v1: > -Use strscpy instead of strncpy for safety. > > Signed-off-by: Min Li > --- > drivers/ptp/ptp_clockmatrix.c | 60 >

Re: [PATCH v2 net] ptp: clockmatrix: bug fix for idtcm_strverscmp

2020-11-21 Thread Jakub Kicinski
On Wed, 18 Nov 2020 22:50:24 -0500 min.li...@renesas.com wrote: > From: Min Li > > Feed kstrtou8 with NULL terminated string. > > Changes since v1: > -Only strcpy 15 characters to leave 1 space for '\0' > > Signed-off-by: Min Li > -static int idtcm_strverscmp(const char *ver1, const char *ver