From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0137.outbound.protection.outlook.com [207.46.100.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 046761A0429 for ; Sat, 11 Jul 2015 07:12:51 +1000 (AEST) Message-ID: <1436562732.2658.177.camel@freescale.com> Subject: Re: [PATCH 02/11] soc/fsl: Introduce DPAA BMan device management driver From: Scott Wood To: Pledge Roy-R01356 CC: Paul Bolle , "linuxppc-dev@lists.ozlabs.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Fri, 10 Jul 2015 16:12:12 -0500 In-Reply-To: References: <1436473322-21247-1-git-send-email-Roy.Pledge@freescale.com> <1436473322-21247-3-git-send-email-Roy.Pledge@freescale.com> <1436528160.20619.159.camel@tiscali.nl> <1436549595.2658.159.camel@freescale.com> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2015-07-10 at 15:57 -0500, Pledge Roy-R01356 wrote: > > > > On Fri, 2015-07-10 at 13:36 +0200, Paul Bolle wrote: > > > On do, 2015-07-09 at 16:21 -0400, Roy Pledge wrote: > > > > +#ifdef CONFIG_FSL_DPA_CHECKING > > > > +#define DPA_ASSERT(x) \ > > > > + do { \ > > > > + if (!(x)) { \ > > > > + pr_crit("ASSERT: (%s:%d) %s\n", __FILE__, > > > > __LINE__, \ > > > > + __stringify_1(x)); \ > > > > + dump_stack(); \ > > > > + panic("assertion failure"); \ > > > > > > Not my call, but why panic() here? > > > > I'm pretty sure I've complained about this before (as well as all the > > BUG_ONs). > > > Is the concern here just the call to panic()? I'm happy to change what > happens when an issue is detected but the DPA_ASSERT() calls are very > useful when testing changes to the driver and when bringing up the drivers > on new silicon variants. Use WARN_ON() or a variant thereof. -Scott