Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757343Ab2KCQfN (ORCPT ); Sat, 3 Nov 2012 12:35:13 -0400 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:12895 "EHLO mail4-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756721Ab2KCQfK (ORCPT ); Sat, 3 Nov 2012 12:35:10 -0400 X-IronPort-AV: E=Sophos;i="4.80,705,1344204000"; d="scan'208";a="161258256" Date: Sat, 3 Nov 2012 17:35:07 +0100 (CET) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: walter harms cc: Julia Lawall , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/16] drivers/net/ethernet/ibm/emac/mal.c: use WARN In-Reply-To: <509545C0.5050000@bfs.de> Message-ID: References: <1351940317-14812-1-git-send-email-Julia.Lawall@lip6.fr> <1351940317-14812-11-git-send-email-Julia.Lawall@lip6.fr> <50950055.8040307@bfs.de> <509545C0.5050000@bfs.de> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 788 Lines: 21 > While looking i have noticed that a lot of drivers define there private "assert" macro. > It is very similar to warn. > > (e.g.) > #define RTL819x_DEBUG > #ifdef RTL819x_DEBUG > #define assert(expr) \ > if (!(expr)) { \ > printk( "Assertion failed! %s,%s,%s,line=%d\n", \ > #expr,__FILE__,__FUNCTION__,__LINE__); \ > } WARN is more complicated. At least with the right debugging options turned on, it dumps the stack, via warn_slowpath_common. julia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/