lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ