public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Pavel Machek <pavel@ucw.cz>
Cc: Andrew Morton <akpm@zip.com.au>,
	kernel list <linux-kernel@vger.kernel.org>
Subject: Re: More cleanups for swsusp
Date: Wed, 21 Jan 2004 16:14:21 +1100	[thread overview]
Message-ID: <20040121051855.B0C282C0A7@lists.samba.org> (raw)
In-Reply-To: Your message of "Tue, 20 Jan 2004 23:52:19 BST." <20040120225219.GA19190@elf.ucw.cz>

In message <20040120225219.GA19190@elf.ucw.cz> you write:
> -	if (fill_suspend_header(&cur->sh))
> -		panic("\nOut of memory while writing header");
> +	BUG_ON (fill_suspend_header(&cur->sh));

1) fill_suspend_header never fails, perhaps make it return void.

2) If fill_suspend_header could fail, you should indicate why it won't
   fail here, and

3) BUG_ON(complex condition expression) is much less clear than:

	if (complex condition expression)
		BUG();

Cheers,
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  parent reply	other threads:[~2004-01-21  5:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-20 22:52 More cleanups for swsusp Pavel Machek
2004-01-20 23:13 ` Andrew Morton
2004-01-20 23:25   ` Pavel Machek
2004-01-21  5:10   ` Rusty Russell
2004-01-22  0:17     ` Pavel Machek
2004-01-21  5:14 ` Rusty Russell [this message]
2004-01-21  5:30   ` Andrew Morton
2004-01-21 18:39     ` Matt Mackall
2004-01-22  2:03       ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040121051855.B0C282C0A7@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox