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; >

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

2020-11-24 Thread min.li.xe
From: Min Li Feed kstrtou8 with NULL terminated string. Changes since v1: -Use sscanf to get rid of adhoc string parse. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 53 +++ 1 file changed, 18 insertions(+), 35 deletions(-) diff --git

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 >

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

2020-11-23 Thread min.li.xe
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 ++- tools/bpf/example | 12 + tools/bpf/novlan

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

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

2020-11-18 Thread min.li.xe
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 --- drivers/ptp/ptp_clockmatrix.c | 52 +++ 1 file changed, 38 insertions(+), 14 deletions(-) diff