2014-09-02 16:16, David Marchand: > >> /* Macros to check for invlaid function pointers. */
Invlaid is an invalid word ;) > >> -#define FUNC_PTR_OR_ERR_RET(func, retval) do { \ > >> - if ((func) == NULL) { \ > >> - DEBUGOUT("%s:%d function not supported\n", \ > >> - __func__, __LINE__); \ > >> - return (retval); \ > >> - } \ > >> +#define FUNC_PTR_OR_ERR_RET(func, retval) do { \ > >> + if ((func) == NULL) { \ > >> + PMD_DRV_LOG("%s:%d function not supported", \ > >> + __func__, __LINE__); \ > >> + return retval; \ > >> > > Need to keep the parens around retval in your macro > > Actually, checkpatch complained about this. > So I can keep the parenthesis, but then I don't want Thomas to tell me my > patch does not pass checkpatch :-) You're right, I care about checkpatch :) I don't see a case where parens are needed with return. Please give an example. -- Thomas