mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: pavel@ucw.cz, len.brown@intel.com, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH] PM, kernel/power/user.c: Replace unintuitive 'if' condition with 'else'
Date: Sat, 3 Dec 2011 00:31:27 +0100	[thread overview]
Message-ID: <201112030031.27965.rjw@sisk.pl> (raw)
In-Reply-To: <20111202180645.15985.26730.stgit@srivatsabhat.in.ibm.com>

On Friday, December 02, 2011, Srivatsa S. Bhat wrote:
> In the snapshot_ioctl() function, under SNAPSHOT_FREEZE, the code below
> freeze_processes() is a bit unintuitive. Improve it by replacing the
> second 'if' condition with an 'else' clause.
> 
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>

Applied to linux-pm/linux-next.

Thanks,
Rafael


> ---
> 
>  kernel/power/user.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/power/user.c b/kernel/power/user.c
> index 7cc3f5b..8c64d1c 100644
> --- a/kernel/power/user.c
> +++ b/kernel/power/user.c
> @@ -259,7 +259,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
>  		error = freeze_processes();
>  		if (error)
>  			usermodehelper_enable();
> -		if (!error)
> +		else
>  			data->frozen = 1;
>  		break;
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 


      reply	other threads:[~2011-12-02 23:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02 18:06 Srivatsa S. Bhat
2011-12-02 23:31 ` Rafael J. Wysocki [this message]

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=201112030031.27965.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    /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

all inboxes | Powered by JetHome®