mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Max Asbock <masbock@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Driver for IBM RSA service processor (2/2)
Date: Mon, 2 Feb 2004 23:15:42 +0100	[thread overview]
Message-ID: <20040202231542.B18524@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <200402021129.56837.masbock@us.ibm.com>; from masbock@us.ibm.com on Mon, Feb 02, 2004 at 11:29:56AM -0800

Max Asbock <masbock@us.ibm.com> :
[...]
> diff -urN linux-2.6.1/drivers/misc/ibmasm/ibmasmfs.c linux-2.6.1-ibmasm/drivers/misc/ibmasm/ibmasmfs.c
> --- linux-2.6.1/drivers/misc/ibmasm/ibmasmfs.c	1969-12-31 16:00:00.000000000 -0800
> +++ linux-2.6.1-ibmasm/drivers/misc/ibmasm/ibmasmfs.c	2004-01-23 15:39:00.000000000 -0800
[...]
> +static int command_file_ioctl(struct inode *inode, struct file *file, unsigned int ioctl_cmd, unsigned long arg)
> +{
> +	struct ibmasmfs_command_data *command_data = file->private_data;
> +	struct command *cmd;
> +	unsigned long flags;
> +
> +	if (ioctl_cmd != IBMASM_IO_CANCEL)
> +		return -ENOTTY;
> +
> +	spin_lock_irqsave(&command_data->sp->lock, flags);
        ^^^^^^^^^^^^^^^^^
> +	cmd = command_data->command;
> +	if (cmd == NULL) {
> +		spin_unlock_irqrestore(&command_data->sp->lock, flags);
> +		return 0;
> +	}
> +	wake_up_interruptible(&cmd->wait);
> +	spin_lock_irqsave(&command_data->sp->lock, flags);
        ^^^^^^^^^^^^^^^^^
> +	return 0;

-> Typo ? What about:
   [...]
	spin_lock_irqsave(&command_data->sp->lock, flags);
	cmd = command_data->command;
	if (cmd == NULL)
		goto out_unlock;
	wake_up_interruptible(&cmd->wait);
out_unlock:
	spin_unlock_irqrestore(&command_data->sp->lock, flags);
	return 0;
}

--
Ueimor

      reply	other threads:[~2004-02-02 22:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-02 19:29 Max Asbock
2004-02-02 22:15 ` Francois Romieu [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=20040202231542.B18524@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masbock@us.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®