All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Cc: John Kacur <jkacur@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Christoph Hellwig <hch@lst.de>,
	devel@driverdev.osuosl.org, Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 07/18] staging: use llseek in all file operations
Date: Wed,  7 Jul 2010 23:40:09 +0200	[thread overview]
Message-ID: <1278538820-1392-8-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1278538820-1392-1-git-send-email-arnd@arndb.de>

These could not be detected by the semantic patch.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: devel@driverdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/msm/mdp4_debugfs.c |   10 ++--------
 drivers/staging/panel/panel.c      |    3 ++-
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/msm/mdp4_debugfs.c b/drivers/staging/msm/mdp4_debugfs.c
index 844d467..36954e8 100644
--- a/drivers/staging/msm/mdp4_debugfs.c
+++ b/drivers/staging/msm/mdp4_debugfs.c
@@ -63,13 +63,6 @@ DEFINE_SIMPLE_ATTRIBUTE(
 			"%llx\n");
 
 
-static int mdp4_debugfs_open(struct inode *inode, struct file *file)
-{
-	/* non-seekable */
-	file->f_mode &= ~(FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE);
-	return 0;
-}
-
 static int mdp4_debugfs_release(struct inode *inode, struct file *file)
 {
 	return 0;
@@ -144,10 +137,11 @@ static ssize_t mdp4_debugfs_read(
 }
 
 static const struct file_operations mdp4_debugfs_fops = {
-	.open = mdp4_debugfs_open,
+	.open = nonseekable_open,
 	.release = mdp4_debugfs_release,
 	.read = mdp4_debugfs_read,
 	.write = mdp4_debugfs_write,
+	.llseek = no_llseek,
 };
 
 int mdp4_debugfs_init(void)
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index 9ca0e9e..be05b98 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -1295,7 +1295,7 @@ static int lcd_open(struct inode *inode, struct file *file)
 		lcd_must_clear = 0;
 	}
 	lcd_open_cnt++;
-	return 0;
+	return nonseekable_open(inode, file);
 }
 
 static int lcd_release(struct inode *inode, struct file *file)
@@ -1308,6 +1308,7 @@ static struct file_operations lcd_fops = {
 	.write   = lcd_write,
 	.open    = lcd_open,
 	.release = lcd_release,
+	.llseek  = no_llseek,
 };
 
 static struct miscdevice lcd_dev = {
-- 
1.7.1


  parent reply	other threads:[~2010-07-07 21:43 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07 21:40 [PATCH 00/18] VFS: turn no_llseek into the default Arnd Bergmann
2010-07-07 21:40 ` [PATCH 01/18] drm: use noop_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 02/18] net/wireless: use generic_file_llseek in debugfs Arnd Bergmann
2010-07-07 21:40 ` [PATCH 03/18] lkdtm: " Arnd Bergmann
2010-07-22  0:06   ` Frederic Weisbecker
     [not found] ` <1278538820-1392-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2010-07-07 21:40   ` [PATCH 04/18] ib/qib: use generic_file_llseek Arnd Bergmann
2010-07-07 21:40     ` Arnd Bergmann
     [not found]     ` <1278538820-1392-5-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2010-07-21 18:40       ` Roland Dreier
2010-07-21 18:40         ` Roland Dreier
2010-07-07 21:40 ` [PATCH 05/18] arm/omap: use generic_file_llseek in iommu_debug Arnd Bergmann
2010-07-07 21:40 ` [PATCH 06/18] spufs: use llseek in all file operations Arnd Bergmann
2010-07-07 21:40   ` Arnd Bergmann
2010-07-08  1:15   ` Jeremy Kerr
2010-07-08  1:15     ` Jeremy Kerr
2010-07-08 13:02     ` Arnd Bergmann
2010-07-08 13:02       ` Arnd Bergmann
2010-07-08 13:29       ` [PATCH v2] " Arnd Bergmann
2010-07-08 13:29         ` Arnd Bergmann
2010-07-07 21:40 ` Arnd Bergmann [this message]
2010-07-07 21:40 ` [PATCH 08/18] selinux: use generic_file_llseek Arnd Bergmann
2010-07-08 14:52   ` Eric Paris
2010-07-11 23:44   ` James Morris
2010-07-07 21:40 ` [PATCH 09/18] tracing: use generic_file_llseek for debugfs Arnd Bergmann
2010-07-07 21:58   ` Frederic Weisbecker
2010-07-21 20:52   ` [tip:perf/core] tracing: Use " tip-bot for Arnd Bergmann
2010-07-07 21:40 ` [PATCH 10/18] ibmasmfs: use generic_file_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 11/18] oprofile: make event buffer nonseekable Arnd Bergmann
2010-07-09  7:51   ` Robert Richter
2010-07-26  9:06   ` Robert Richter
2010-07-07 21:40 ` [PATCH 12/18] raw: use explicit llseek file operations Arnd Bergmann
2010-07-21 23:50   ` Frederic Weisbecker
2010-07-07 21:40 ` [PATCH 13/18] ima: use generic_file_llseek for securityfs Arnd Bergmann
2010-07-08 12:50   ` Mimi Zohar
2010-07-08 13:00     ` Arnd Bergmann
2010-07-08 13:18       ` Mimi Zohar
2010-07-08 22:52         ` James Morris
2010-07-09 13:00           ` Arnd Bergmann
2010-07-11 23:45   ` James Morris
2010-07-07 21:40 ` [PATCH 14/18] irda/irnet: use noop_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 15/18] viotape: " Arnd Bergmann
2010-07-21 23:59   ` Frederic Weisbecker
2010-07-07 21:40 ` [PATCH 16/18] llseek: automatically add .llseek fop Arnd Bergmann
2010-07-07 21:55   ` Mike Frysinger
2010-07-07 22:10     ` Arnd Bergmann
2010-07-08 12:17   ` Boaz Harrosh
2010-07-08 12:23     ` Arnd Bergmann
2010-07-08 12:32       ` Boaz Harrosh
2010-07-07 21:40 ` [PATCH 17/18] vfs: don't use BKL in default_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 18/18] vfs: make no_llseek the default Arnd Bergmann
2010-07-08 11:25   ` Tetsuo Handa
2010-07-08 12:08     ` Arnd Bergmann
2010-07-08 12:57       ` Tetsuo Handa
2010-07-08 13:18         ` Arnd Bergmann
2010-07-08 22:55         ` James Morris

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=1278538820-1392-8-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=fweisbec@gmail.com \
    --cc=gregkh@suse.de \
    --cc=hch@lst.de \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.