Re: [Linuxptp-devel] [PATCH 1/7] Introduce error codes for the run_pmc method.

2020-11-14 Thread Vladimir Oltean
On Tue, Nov 10, 2020 at 02:21:36PM -0800, Richard Cochran wrote: > The run_pmc function is used by several of the PMC agent methods, but it > breaks the pattern of returning zero on success. However, the user facing > PMC agent methods will need to conform to the return code convention used > thro

Re: [Linuxptp-devel] [PATCH 1/7] Introduce error codes for the run_pmc method.

2020-11-11 Thread Jacob Keller
On 11/11/2020 10:50 AM, Richard Cochran wrote: > On Wed, Nov 11, 2020 at 10:35:20AM -0800, Jacob Keller wrote: >> Thoughts on making this an enum instead so that it's even more clear >> from the function signatures that this is not an integer return code? >> The run_pmc function is static so it

Re: [Linuxptp-devel] [PATCH 1/7] Introduce error codes for the run_pmc method.

2020-11-11 Thread Richard Cochran
On Wed, Nov 11, 2020 at 10:35:20AM -0800, Jacob Keller wrote: > Thoughts on making this an enum instead so that it's even more clear > from the function signatures that this is not an integer return code? > The run_pmc function is static so it would only affect callers in this file. I considered a

Re: [Linuxptp-devel] [PATCH 1/7] Introduce error codes for the run_pmc method.

2020-11-11 Thread Jacob Keller
On 11/10/2020 2:21 PM, Richard Cochran wrote: > The run_pmc function is used by several of the PMC agent methods, but it > breaks the pattern of returning zero on success. However, the user facing > PMC agent methods will need to conform to the return code convention used > throughout the stack

[Linuxptp-devel] [PATCH 1/7] Introduce error codes for the run_pmc method.

2020-11-10 Thread Richard Cochran
The run_pmc function is used by several of the PMC agent methods, but it breaks the pattern of returning zero on success. However, the user facing PMC agent methods will need to conform to the return code convention used throughout the stack. In order to migrate to proper return codes, this patch