From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 01/17] ixgbe: use the right debug macro Date: Tue, 02 Sep 2014 16:21:18 +0200 Message-ID: <3333103.135tnuTvaT@xps13> References: <1409567080-27083-1-git-send-email-david.marchand@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Jay Rolette Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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