public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 04/13] [blackfin] changed ioctls to unlocked
@ 2009-03-24 21:12 stoyboyker
  2009-03-25  2:07 ` [Uclinux-dist-devel] " gyang
  2009-03-25  2:31 ` Mike Frysinger
  0 siblings, 2 replies; 3+ messages in thread
From: stoyboyker @ 2009-03-24 21:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: Stoyan Gaydarov, cooloney, uclinux-dist-devel

From: Stoyan Gaydarov <stoyboyker@gmail.com>

Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
---
 arch/blackfin/mach-bf561/coreb.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
index 8598098..9ad89af 100644
--- a/arch/blackfin/mach-bf561/coreb.c
+++ b/arch/blackfin/mach-bf561/coreb.c
@@ -220,9 +220,10 @@ static int coreb_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static int coreb_ioctl(struct inode *inode, struct file *file,
-		       unsigned int cmd, unsigned long arg)
+static long coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
+	lock_kernel();
+
 	int retval = 0;
 	int coreb_index = 0;
 
@@ -289,6 +290,7 @@ static int coreb_ioctl(struct inode *inode, struct file *file,
 #endif
 	}
 
+	unlock_kernel();
 	return retval;
 }
 
@@ -297,7 +299,7 @@ static struct file_operations coreb_fops = {
 	.llseek = coreb_lseek,
 	.read = coreb_read,
 	.write = coreb_write,
-	.ioctl = coreb_ioctl,
+	.unlocked_ioctl = coreb_ioctl,
 	.open = coreb_open,
 	.release = coreb_release
 };
-- 
1.6.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Uclinux-dist-devel] [PATCH 04/13] [blackfin] changed ioctls to unlocked
  2009-03-24 21:12 [PATCH 04/13] [blackfin] changed ioctls to unlocked stoyboyker
@ 2009-03-25  2:07 ` gyang
  2009-03-25  2:31 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: gyang @ 2009-03-25  2:07 UTC (permalink / raw)
  To: stoyboyker; +Cc: linux-kernel, uclinux-dist-devel

Could you add some comment for this patch?

On Tue, 2009-03-24 at 16:12 -0500, stoyboyker@gmail.com wrote:
> From: Stoyan Gaydarov <stoyboyker@gmail.com>
> 
> Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
> ---
>  arch/blackfin/mach-bf561/coreb.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
> index 8598098..9ad89af 100644
> --- a/arch/blackfin/mach-bf561/coreb.c
> +++ b/arch/blackfin/mach-bf561/coreb.c
> @@ -220,9 +220,10 @@ static int coreb_release(struct inode *inode, struct file *file)
>  	return 0;
>  }
>  
> -static int coreb_ioctl(struct inode *inode, struct file *file,
> -		       unsigned int cmd, unsigned long arg)
> +static long coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  {
> +	lock_kernel();
> +
>  	int retval = 0;
>  	int coreb_index = 0;
>  
> @@ -289,6 +290,7 @@ static int coreb_ioctl(struct inode *inode, struct file *file,
>  #endif
>  	}
>  
> +	unlock_kernel();
>  	return retval;
>  }
>  
> @@ -297,7 +299,7 @@ static struct file_operations coreb_fops = {
>  	.llseek = coreb_lseek,
>  	.read = coreb_read,
>  	.write = coreb_write,
> -	.ioctl = coreb_ioctl,
> +	.unlocked_ioctl = coreb_ioctl,
>  	.open = coreb_open,
>  	.release = coreb_release
>  };

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 04/13] [blackfin] changed ioctls to unlocked
  2009-03-24 21:12 [PATCH 04/13] [blackfin] changed ioctls to unlocked stoyboyker
  2009-03-25  2:07 ` [Uclinux-dist-devel] " gyang
@ 2009-03-25  2:31 ` Mike Frysinger
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2009-03-25  2:31 UTC (permalink / raw)
  To: stoyboyker; +Cc: linux-kernel, cooloney, uclinux-dist-devel

On Tue, Mar 24, 2009 at 17:12,  <stoyboyker@gmail.com> wrote:
> --- a/arch/blackfin/mach-bf561/coreb.c
> +++ b/arch/blackfin/mach-bf561/coreb.c
> @@ -220,9 +220,10 @@ static int coreb_release(struct inode *inode, struct file *file)
>        return 0;
>  }
>
> -static int coreb_ioctl(struct inode *inode, struct file *file,
> -                      unsigned int cmd, unsigned long arg)
> +static long coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  {
> +       lock_kernel();
> +
>        int retval = 0;
>        int coreb_index = 0;
>
> @@ -289,6 +290,7 @@ static int coreb_ioctl(struct inode *inode, struct file *file,
>  #endif
>        }
>
> +       unlock_kernel();
>        return retval;
>  }

there is no need to lock the kernel in here.  people have asked in the
past and we've told them that it's pointless.  simply change it to use
unlocked_ioctl.
-mike

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-25  2:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 21:12 [PATCH 04/13] [blackfin] changed ioctls to unlocked stoyboyker
2009-03-25  2:07 ` [Uclinux-dist-devel] " gyang
2009-03-25  2:31 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox