Since v2, v3 changed:

list.h - remove unused macros
atomic.h, rwlock.h - revise documentations
module.h/module.c
- revise various comments and descriptions
- add prefix ODP_ to all external macros/APIs
- replace SUBSYSTEM() to SUBSYSTEM_DECLARE()/_DEFINE()
- change the way user defines derived data structure from odp_module_base_t
- revise SUBSYSTEM_INITTERM_TEMPLATE() to SUBSYSTEM_FOREACH_TEMPLATE()
- SUBSYSTEM_FOREACH_TEMPLATE(): allow caller to control continue or stop loop 
on errors
- fixed several checkpatch problems, left 5 below, to see if we can accept them:

WARNING: Macros with flow control statements should be avoided
#326: FILE: frameworks/modular/module.c:27:
+#define REGISTRATION_SANITY_CHECK(subsystem, module)           \
+do {                                                           \
+       if (subsystem == NULL || module == NULL)                \
+               return -ENOENT;                                 \
+                                                               \
+       if (!list_node_detached(&module->list)) {               \
+               printf("module %s was already registered.\n",   \
+                       module->name);                          \
+               return -EAGAIN;                                 \
+       }                                                       \
+} while (0)
+

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#552: FILE: frameworks/modular/module.h:83:
+#define ODP_SUBSYSTEM_API(name, _return, api, ...)             \
+       extern _return __odp_api(name, api)(__VA_ARGS__);       \
+       typedef _return (*odp_api_proto(name, api))(__VA_ARGS__)

WARNING: space prohibited between function name and open parenthesis '('
#554: FILE: frameworks/modular/module.h:85:
+       typedef _return (*odp_api_proto(name, api))(__VA_ARGS__)

ERROR: Macros with complex values should be enclosed in parentheses
#557: FILE: frameworks/modular/module.h:88:
+#define ODP_SUBSYSTEM_API_STUB(name, api)                      \
+       __attribute__((weak)) __odp_api(name, api)

ERROR: Macros with complex values should be enclosed in parentheses
#564: FILE: frameworks/modular/module.h:95:
+#define ODP_SUBSYSTEM_API_OVERRIDE(name, api, _alias)          \
+       __attribute__((alias(#_alias))) __odp_api(name, api)
Since RFC, what changed:


Split the work: this comes the 1st part: odp: add modular framework
only intro the modular programming framework into odp cloud-dev
lately will submit the 2nd part: apply the modular framework to pktio ops 
subsystem


Minor changes:
example: ddf_app: add .gitignore
validation: pktio: disable socket mmsg pktio


Fix doxgen and checkpatch.pl errors and warnings
Fixed most but checkpatch.pl still reports 4 errors, 3 warnings on module.h 
which seems inevitable, I'll go through these in the call to reach consensus 
and schedule future improvement.


Signed-off-by: Yi He yi...@linaro.org

----------------github------------------------
/** Email created from pull request 65 (heyi-linaro:modular-framework)
 ** https://github.com/Linaro/odp/pull/65
 ** Patch: https://github.com/Linaro/odp/pull/65.patch
 ** Base sha: 1ba26aa5650c05718c177842178de6d0f70b7fc1
 ** Merge commit sha: bf1d072772b57f96a842e5d2b57e3f9f9eed0107
 **/
----------------/github------------------------

----------------checkpatch.pl------------------------
total: 0 errors, 0 warnings, 0 checks, 1 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 9 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
CHECK: extern prototypes should be avoided in .h files
#562: FILE: frameworks/modular/odp_module.h:64:
+       extern odp_subsystem_t __subsystem(name)

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#581: FILE: frameworks/modular/odp_module.h:83:
+#define ODP_SUBSYSTEM_API(name, _return, api, ...)             \
+       extern _return __odp_api(name, api)(__VA_ARGS__);       \
+       typedef _return (*odp_api_proto(name, api))(__VA_ARGS__)

WARNING: space prohibited between function name and open parenthesis '('
#583: FILE: frameworks/modular/odp_module.h:85:
+       typedef _return (*odp_api_proto(name, api))(__VA_ARGS__)

ERROR: Macros with complex values should be enclosed in parentheses
#586: FILE: frameworks/modular/odp_module.h:88:
+#define ODP_SUBSYSTEM_API_STUB(name, api)                      \
+       __attribute__((weak)) __odp_api(name, api)

ERROR: Macros with complex values should be enclosed in parentheses
#593: FILE: frameworks/modular/odp_module.h:95:
+#define ODP_SUBSYSTEM_API_OVERRIDE(name, api, _alias)          \
+       __attribute__((alias(#_alias))) __odp_api(name, api)

total: 3 errors, 1 warnings, 1 checks, 805 lines checked


to_send-p-002.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
----------------/checkpatch.pl------------------------

Reply via email to