Re: [Linuxptp-devel] [PATCH] sk.c: Unreachable switch case TS_SOFTWARE

2022-09-26 Thread Keller, Jacob E
> -Original Message- > From: Michael Galassi > Sent: Sunday, September 25, 2022 11:38 AM > To: Richard Cochran > Cc: linuxptp-devel@lists.sourceforge.net > Subject: Re: [Linuxptp-devel] [PATCH] sk.c: Unreachable switch case > TS_SOFTWARE > > On Sun, Sep 2

Re: [Linuxptp-devel] [PATCH] sk.c: Unreachable switch case TS_SOFTWARE

2022-09-25 Thread Michael Galassi
On Sun, Sep 25, 2022 at 11:23 AM Richard Cochran wrote: > > On Thu, Jul 21, 2022 at 03:10:40PM +0530, Siddharth Vadapalli via > Linuxptp-devel wrote: > > Remove the unreachable switch case TS_SOFTWARE. > > > > Signed-off-by: Siddharth Vadapalli > > --- > > sk.c | 3 --- > > 1 file changed, 3 de

Re: [Linuxptp-devel] [PATCH] sk.c: Unreachable switch case TS_SOFTWARE

2022-09-25 Thread Richard Cochran
On Sun, Sep 25, 2022 at 11:37:31AM -0700, Michael Galassi wrote: > I've developed the habit of closing all non-exhaustive switches where > no sensible default exists with a default which asserts with a > meaningful diagnostic. Doing so has helped me find a number of my own > mistaken assumptions.

Re: [Linuxptp-devel] [PATCH] sk.c: Unreachable switch case TS_SOFTWARE

2022-09-25 Thread Richard Cochran
On Thu, Jul 21, 2022 at 01:20:47PM +, Geva, Erez wrote: > Hi, > > I think the "if (type != TS_SOFTWARE" is wrong. > The "type" only refer to TX. No, "type" is an enumerated value, timestamp_type, and it describes the flavor of time stamping in use. > But hwts_init() also set the RX. > So no

Re: [Linuxptp-devel] [PATCH] sk.c: Unreachable switch case TS_SOFTWARE

2022-09-25 Thread Richard Cochran
On Thu, Jul 21, 2022 at 03:10:40PM +0530, Siddharth Vadapalli via Linuxptp-devel wrote: > Remove the unreachable switch case TS_SOFTWARE. > > Signed-off-by: Siddharth Vadapalli > --- > sk.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/sk.c b/sk.c > index b55d6b5..a49bcf4 100644 >

Re: [Linuxptp-devel] [PATCH] sk.c: Unreachable switch case TS_SOFTWARE

2022-07-21 Thread Geva, Erez
k work-around? Erez -Original Message- From: Siddharth Vadapalli via Linuxptp-devel Sent: Thursday, 21 July 2022 11:41 To: linuxptp-devel@lists.sourceforge.net Subject: [Linuxptp-devel] [PATCH] sk.c: Unreachable switch case TS_SOFTWARE Remove the unreachable switch case TS_SOFT

[Linuxptp-devel] [PATCH] sk.c: Unreachable switch case TS_SOFTWARE

2022-07-21 Thread Siddharth Vadapalli via Linuxptp-devel
Remove the unreachable switch case TS_SOFTWARE. Signed-off-by: Siddharth Vadapalli --- sk.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sk.c b/sk.c index b55d6b5..a49bcf4 100644 --- a/sk.c +++ b/sk.c @@ -477,9 +477,6 @@ int sk_timestamping_init(int fd, const char *device, enum timesta