[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200808211124.22485.david-b@pacbell.net>
Date: Thu, 21 Aug 2008 11:24:22 -0700
From: David Brownell <david-b@...bell.net>
To: Greg Kroah-Hartman <gregkh@...e.de>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/15] driver model: anti-oopsing medicine
On Thursday 21 August 2008, Greg Kroah-Hartman wrote:
> + if (!class->p) {
> + WARN(1, "%s called for class '%s' before it was initialized",
> + __func__, class->name);
> + return -EINVAL;
> + }
Or -- for future reference -- using WARN() with non-constant
initial parameter:
if (WARN(!class-p, "%s called ...\n" ...))
return -EINVAL;
Some of those macros now have return values, supportin C code
that looks a bit more compact.
- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists