aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-08-15 12:52:59 -0400
committerArnd Bergmann <arnd@arndb.de>2010-10-15 09:53:27 -0400
commit6038f373a3dc1f1c26496e60b6c40b164716f07e (patch)
treea0d3bbd026eea41b9fc36b8c722cbaf56cd9f825 /arch
parent1ec5584e3edf9c4bf2c88c846534d19cf986ba11 (diff)
llseek: automatically add .llseek fop
All file_operations should get a .llseek operation so we can make nonseekable_open the default for future file operations without a .llseek pointer. The three cases that we can automatically detect are no_llseek, seq_lseek and default_llseek. For cases where we can we can automatically prove that the file offset is always ignored, we use noop_llseek, which maintains the current behavior of not returning an error from a seek. New drivers should normally not use noop_llseek but instead use no_llseek and call nonseekable_open at open time. Existing drivers can be converted to do the same when the maintainer knows for certain that no user code relies on calling seek on the device file. The generated code is often incorrectly indented and right now contains comments that clarify for each added line why a specific variant was chosen. In the version that gets submitted upstream, the comments will be gone and I will manually fix the indentation, because there does not seem to be a way to do that using coccinelle. Some amount of new code is currently sitting in linux-next that should get the same modifications, which I will do at the end of the merge window. Many thanks to Julia Lawall for helping me learn to write a semantic patch that does all this. ===== begin semantic patch ===== // This adds an llseek= method to all file operations, // as a preparation for making no_llseek the default. // // The rules are // - use no_llseek explicitly if we do nonseekable_open // - use seq_lseek for sequential files // - use default_llseek if we know we access f_pos // - use noop_llseek if we know we don't access f_pos, // but we still want to allow users to call lseek // @ open1 exists @ identifier nested_open; @@ nested_open(...) { <+... nonseekable_open(...) ...+> } @ open exists@ identifier open_f; identifier i, f; identifier open1.nested_open; @@ int open_f(struct inode *i, struct file *f) { <+... ( nonseekable_open(...) | nested_open(...) ) ...+> } @ read disable optional_qualifier exists @ identifier read_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; expression E; identifier func; @@ ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off) { <+... ( *off = E | *off += E | func(..., off, ...) | E = *off ) ...+> } @ read_no_fpos disable optional_qualifier exists @ identifier read_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; @@ ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off) { ... when != off } @ write @ identifier write_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; expression E; identifier func; @@ ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off) { <+... ( *off = E | *off += E | func(..., off, ...) | E = *off ) ...+> } @ write_no_fpos @ identifier write_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; @@ ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off) { ... when != off } @ fops0 @ identifier fops; @@ struct file_operations fops = { ... }; @ has_llseek depends on fops0 @ identifier fops0.fops; identifier llseek_f; @@ struct file_operations fops = { ... .llseek = llseek_f, ... }; @ has_read depends on fops0 @ identifier fops0.fops; identifier read_f; @@ struct file_operations fops = { ... .read = read_f, ... }; @ has_write depends on fops0 @ identifier fops0.fops; identifier write_f; @@ struct file_operations fops = { ... .write = write_f, ... }; @ has_open depends on fops0 @ identifier fops0.fops; identifier open_f; @@ struct file_operations fops = { ... .open = open_f, ... }; // use no_llseek if we call nonseekable_open //////////////////////////////////////////// @ nonseekable1 depends on !has_llseek && has_open @ identifier fops0.fops; identifier nso ~= "nonseekable_open"; @@ struct file_operations fops = { ... .open = nso, ... +.llseek = no_llseek, /* nonseekable */ }; @ nonseekable2 depends on !has_llseek @ identifier fops0.fops; identifier open.open_f; @@ struct file_operations fops = { ... .open = open_f, ... +.llseek = no_llseek, /* open uses nonseekable */ }; // use seq_lseek for sequential files ///////////////////////////////////// @ seq depends on !has_llseek @ identifier fops0.fops; identifier sr ~= "seq_read"; @@ struct file_operations fops = { ... .read = sr, ... +.llseek = seq_lseek, /* we have seq_read */ }; // use default_llseek if there is a readdir /////////////////////////////////////////// @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier readdir_e; @@ // any other fop is used that changes pos struct file_operations fops = { ... .readdir = readdir_e, ... +.llseek = default_llseek, /* readdir is present */ }; // use default_llseek if at least one of read/write touches f_pos ///////////////////////////////////////////////////////////////// @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read.read_f; @@ // read fops use offset struct file_operations fops = { ... .read = read_f, ... +.llseek = default_llseek, /* read accesses f_pos */ }; @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier write.write_f; @@ // write fops use offset struct file_operations fops = { ... .write = write_f, ... + .llseek = default_llseek, /* write accesses f_pos */ }; // Use noop_llseek if neither read nor write accesses f_pos /////////////////////////////////////////////////////////// @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read_no_fpos.read_f; identifier write_no_fpos.write_f; @@ // write fops use offset struct file_operations fops = { ... .write = write_f, .read = read_f, ... +.llseek = noop_llseek, /* read and write both use no f_pos */ }; @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier write_no_fpos.write_f; @@ struct file_operations fops = { ... .write = write_f, ... +.llseek = noop_llseek, /* write uses no f_pos */ }; @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read_no_fpos.read_f; @@ struct file_operations fops = { ... .read = read_f, ... +.llseek = noop_llseek, /* read uses no f_pos */ }; @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; @@ struct file_operations fops = { ... +.llseek = noop_llseek, /* no read or write fn */ }; ===== End semantic patch ===== Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Julia Lawall <julia@diku.dk> Cc: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/etm.c1
-rw-r--r--arch/arm/mach-msm/last_radio_log.c3
-rw-r--r--arch/arm/mach-msm/smd_debug.c1
-rw-r--r--arch/arm/plat-mxc/audmux-v2.c1
-rw-r--r--arch/avr32/boards/mimc200/fram.c1
-rw-r--r--arch/blackfin/kernel/kgdb_test.c1
-rw-r--r--arch/blackfin/mach-bf561/coreb.c1
-rw-r--r--arch/cris/arch-v10/drivers/ds1302.c1
-rw-r--r--arch/cris/arch-v10/drivers/gpio.c1
-rw-r--r--arch/cris/arch-v10/drivers/i2c.c1
-rw-r--r--arch/cris/arch-v10/drivers/pcf8563.c1
-rw-r--r--arch/cris/arch-v10/drivers/sync_serial.c3
-rw-r--r--arch/cris/arch-v32/drivers/cryptocop.c3
-rw-r--r--arch/cris/arch-v32/drivers/i2c.c1
-rw-r--r--arch/cris/arch-v32/drivers/mach-a3/gpio.c1
-rw-r--r--arch/cris/arch-v32/drivers/mach-fs/gpio.c1
-rw-r--r--arch/cris/arch-v32/drivers/pcf8563.c1
-rw-r--r--arch/cris/arch-v32/drivers/sync_serial.c3
-rw-r--r--arch/cris/kernel/profile.c1
-rw-r--r--arch/ia64/kernel/salinfo.c2
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c1
-rw-r--r--arch/m68k/bvme6000/rtc.c1
-rw-r--r--arch/m68k/mvme16x/rtc.c1
-rw-r--r--arch/mips/kernel/rtlx.c3
-rw-r--r--arch/mips/kernel/vpe.c3
-rw-r--r--arch/mips/sibyte/common/sb_tbprof.c1
-rw-r--r--arch/powerpc/kernel/lparcfg.c1
-rw-r--r--arch/powerpc/kernel/rtas_flash.c3
-rw-r--r--arch/powerpc/kernel/rtasd.c1
-rw-r--r--arch/powerpc/platforms/iseries/mf.c1
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c3
-rw-r--r--arch/powerpc/platforms/pseries/scanlog.c1
-rw-r--r--arch/s390/crypto/prng.c1
-rw-r--r--arch/s390/hypfs/hypfs_diag.c1
-rw-r--r--arch/s390/hypfs/hypfs_vm.c1
-rw-r--r--arch/s390/hypfs/inode.c1
-rw-r--r--arch/s390/kernel/debug.c1
-rw-r--r--arch/sh/boards/mach-landisk/gio.c1
-rw-r--r--arch/sparc/kernel/apc.c1
-rw-r--r--arch/sparc/kernel/mdesc.c1
-rw-r--r--arch/tile/kernel/hardwall.c1
-rw-r--r--arch/um/drivers/harddog_kern.c1
-rw-r--r--arch/um/drivers/mconsole_kern.c1
-rw-r--r--arch/um/drivers/mmapper_kern.c1
-rw-r--r--arch/um/drivers/random.c1
-rw-r--r--arch/x86/kernel/apm_32.c1
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce-severity.c1
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c1
-rw-r--r--arch/x86/kernel/kdebugfs.c1
-rw-r--r--arch/x86/kernel/microcode_core.c1
-rw-r--r--arch/x86/kernel/tlb_uv.c1
-rw-r--r--arch/x86/xen/debugfs.c1
52 files changed, 62 insertions, 7 deletions
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c
index 33c7077174db..30b8878f1202 100644
--- a/arch/arm/kernel/etm.c
+++ b/arch/arm/kernel/etm.c
@@ -314,6 +314,7 @@ static const struct file_operations etb_fops = {
314 .read = etb_read, 314 .read = etb_read,
315 .open = etb_open, 315 .open = etb_open,
316 .release = etb_release, 316 .release = etb_release,
317 .llseek = no_llseek,
317}; 318};
318 319
319static struct miscdevice etb_miscdev = { 320static struct miscdevice etb_miscdev = {
diff --git a/arch/arm/mach-msm/last_radio_log.c b/arch/arm/mach-msm/last_radio_log.c
index b64ba5a98686..1e243f46a969 100644
--- a/arch/arm/mach-msm/last_radio_log.c
+++ b/arch/arm/mach-msm/last_radio_log.c
@@ -48,7 +48,8 @@ static ssize_t last_radio_log_read(struct file *file, char __user *buf,
48} 48}
49 49
50static struct file_operations last_radio_log_fops = { 50static struct file_operations last_radio_log_fops = {
51 .read = last_radio_log_read 51 .read = last_radio_log_read,
52 .llseek = default_llseek,
52}; 53};
53 54
54void msm_init_last_radio_log(struct module *owner) 55void msm_init_last_radio_log(struct module *owner)
diff --git a/arch/arm/mach-msm/smd_debug.c b/arch/arm/mach-msm/smd_debug.c
index 3b2dd717b788..f91c3b7bc655 100644
--- a/arch/arm/mach-msm/smd_debug.c
+++ b/arch/arm/mach-msm/smd_debug.c
@@ -212,6 +212,7 @@ static int debug_open(struct inode *inode, struct file *file)
212static const struct file_operations debug_ops = { 212static const struct file_operations debug_ops = {
213 .read = debug_read, 213 .read = debug_read,
214 .open = debug_open, 214 .open = debug_open,
215 .llseek = default_llseek,
215}; 216};
216 217
217static void debug_create(const char *name, mode_t mode, 218static void debug_create(const char *name, mode_t mode,
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c
index f9e7cdbd0005..25ad95ba92a4 100644
--- a/arch/arm/plat-mxc/audmux-v2.c
+++ b/arch/arm/plat-mxc/audmux-v2.c
@@ -137,6 +137,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
137static const struct file_operations audmux_debugfs_fops = { 137static const struct file_operations audmux_debugfs_fops = {
138 .open = audmux_open_file, 138 .open = audmux_open_file,
139 .read = audmux_read_file, 139 .read = audmux_read_file,
140 .llseek = default_llseek,
140}; 141};
141 142
142static void audmux_debugfs_init(void) 143static void audmux_debugfs_init(void)
diff --git a/arch/avr32/boards/mimc200/fram.c b/arch/avr32/boards/mimc200/fram.c
index 54fbd95cee9b..9764a1a1073e 100644
--- a/arch/avr32/boards/mimc200/fram.c
+++ b/arch/avr32/boards/mimc200/fram.c
@@ -41,6 +41,7 @@ static int fram_mmap(struct file *filp, struct vm_area_struct *vma)
41static const struct file_operations fram_fops = { 41static const struct file_operations fram_fops = {
42 .owner = THIS_MODULE, 42 .owner = THIS_MODULE,
43 .mmap = fram_mmap, 43 .mmap = fram_mmap,
44 .llseek = noop_llseek,
44}; 45};
45 46
46#define FRAM_MINOR 0 47#define FRAM_MINOR 0
diff --git a/arch/blackfin/kernel/kgdb_test.c b/arch/blackfin/kernel/kgdb_test.c
index 9a4b07594389..08c0236acf3c 100644
--- a/arch/blackfin/kernel/kgdb_test.c
+++ b/arch/blackfin/kernel/kgdb_test.c
@@ -88,6 +88,7 @@ static const struct file_operations kgdb_test_proc_fops = {
88 .owner = THIS_MODULE, 88 .owner = THIS_MODULE,
89 .read = kgdb_test_proc_read, 89 .read = kgdb_test_proc_read,
90 .write = kgdb_test_proc_write, 90 .write = kgdb_test_proc_write,
91 .llseek = noop_llseek,
91}; 92};
92 93
93static int __init kgdbtest_init(void) 94static int __init kgdbtest_init(void)
diff --git a/arch/blackfin/mach-bf561/coreb.c b/arch/blackfin/mach-bf561/coreb.c
index deb2271d09a3..c6a4c8f2d37b 100644
--- a/arch/blackfin/mach-bf561/coreb.c
+++ b/arch/blackfin/mach-bf561/coreb.c
@@ -51,6 +51,7 @@ coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
51static const struct file_operations coreb_fops = { 51static const struct file_operations coreb_fops = {
52 .owner = THIS_MODULE, 52 .owner = THIS_MODULE,
53 .unlocked_ioctl = coreb_ioctl, 53 .unlocked_ioctl = coreb_ioctl,
54 .llseek = noop_llseek,
54}; 55};
55 56
56static struct miscdevice coreb_dev = { 57static struct miscdevice coreb_dev = {
diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c
index 884275629ef7..95aadb4a8cf1 100644
--- a/arch/cris/arch-v10/drivers/ds1302.c
+++ b/arch/cris/arch-v10/drivers/ds1302.c
@@ -387,6 +387,7 @@ print_rtc_status(void)
387static const struct file_operations rtc_fops = { 387static const struct file_operations rtc_fops = {
388 .owner = THIS_MODULE, 388 .owner = THIS_MODULE,
389 .unlocked_ioctl = rtc_unlocked_ioctl, 389 .unlocked_ioctl = rtc_unlocked_ioctl,
390 .llseek = noop_llseek,
390}; 391};
391 392
392/* Probe for the chip by writing something to its RAM and try reading it back. */ 393/* Probe for the chip by writing something to its RAM and try reading it back. */
diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c
index a07b6d25b0c7..a276f0811731 100644
--- a/arch/cris/arch-v10/drivers/gpio.c
+++ b/arch/cris/arch-v10/drivers/gpio.c
@@ -745,6 +745,7 @@ static const struct file_operations gpio_fops = {
745 .write = gpio_write, 745 .write = gpio_write,
746 .open = gpio_open, 746 .open = gpio_open,
747 .release = gpio_release, 747 .release = gpio_release,
748 .llseek = noop_llseek,
748}; 749};
749 750
750static void ioif_watcher(const unsigned int gpio_in_available, 751static void ioif_watcher(const unsigned int gpio_in_available,
diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c
index 77a941813819..c413539d4205 100644
--- a/arch/cris/arch-v10/drivers/i2c.c
+++ b/arch/cris/arch-v10/drivers/i2c.c
@@ -617,6 +617,7 @@ static const struct file_operations i2c_fops = {
617 .unlocked_ioctl = i2c_ioctl, 617 .unlocked_ioctl = i2c_ioctl,
618 .open = i2c_open, 618 .open = i2c_open,
619 .release = i2c_release, 619 .release = i2c_release,
620 .llseek = noop_llseek,
620}; 621};
621 622
622int __init 623int __init
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c
index 7dcb1f85f42b..7aa6ff00a117 100644
--- a/arch/cris/arch-v10/drivers/pcf8563.c
+++ b/arch/cris/arch-v10/drivers/pcf8563.c
@@ -64,6 +64,7 @@ static int voltage_low;
64static const struct file_operations pcf8563_fops = { 64static const struct file_operations pcf8563_fops = {
65 .owner = THIS_MODULE, 65 .owner = THIS_MODULE,
66 .unlocked_ioctl = pcf8563_unlocked_ioctl, 66 .unlocked_ioctl = pcf8563_unlocked_ioctl,
67 .llseek = noop_llseek,
67}; 68};
68 69
69unsigned char 70unsigned char
diff --git a/arch/cris/arch-v10/drivers/sync_serial.c b/arch/cris/arch-v10/drivers/sync_serial.c
index ee2dd4323daf..e501632fa8c2 100644
--- a/arch/cris/arch-v10/drivers/sync_serial.c
+++ b/arch/cris/arch-v10/drivers/sync_serial.c
@@ -250,7 +250,8 @@ static const struct file_operations sync_serial_fops = {
250 .poll = sync_serial_poll, 250 .poll = sync_serial_poll,
251 .unlocked_ioctl = sync_serial_ioctl, 251 .unlocked_ioctl = sync_serial_ioctl,
252 .open = sync_serial_open, 252 .open = sync_serial_open,
253 .release = sync_serial_release 253 .release = sync_serial_release,
254 .llseek = noop_llseek,
254}; 255};
255 256
256static int __init etrax_sync_serial_init(void) 257static int __init etrax_sync_serial_init(void)
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index b07646a30509..dcb43fddfb99 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -281,7 +281,8 @@ const struct file_operations cryptocop_fops = {
281 .owner = THIS_MODULE, 281 .owner = THIS_MODULE,
282 .open = cryptocop_open, 282 .open = cryptocop_open,
283 .release = cryptocop_release, 283 .release = cryptocop_release,
284 .unlocked_ioctl = cryptocop_ioctl 284 .unlocked_ioctl = cryptocop_ioctl,
285 .llseek = noop_llseek,
285}; 286};
286 287
287 288
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c
index 5a3e900c9a78..ddb23996f11a 100644
--- a/arch/cris/arch-v32/drivers/i2c.c
+++ b/arch/cris/arch-v32/drivers/i2c.c
@@ -698,6 +698,7 @@ static const struct file_operations i2c_fops = {
698 .unlocked_ioctl = i2c_ioctl, 698 .unlocked_ioctl = i2c_ioctl,
699 .open = i2c_open, 699 .open = i2c_open,
700 .release = i2c_release, 700 .release = i2c_release,
701 .llseek = noop_llseek,
701}; 702};
702 703
703static int __init i2c_init(void) 704static int __init i2c_init(void)
diff --git a/arch/cris/arch-v32/drivers/mach-a3/gpio.c b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
index 2dcd27adbad4..06b24ebda410 100644
--- a/arch/cris/arch-v32/drivers/mach-a3/gpio.c
+++ b/arch/cris/arch-v32/drivers/mach-a3/gpio.c
@@ -893,6 +893,7 @@ static const struct file_operations gpio_fops = {
893 .write = gpio_write, 893 .write = gpio_write,
894 .open = gpio_open, 894 .open = gpio_open,
895 .release = gpio_release, 895 .release = gpio_release,
896 .llseek = noop_llseek,
896}; 897};
897 898
898#ifdef CONFIG_ETRAX_VIRTUAL_GPIO 899#ifdef CONFIG_ETRAX_VIRTUAL_GPIO
diff --git a/arch/cris/arch-v32/drivers/mach-fs/gpio.c b/arch/cris/arch-v32/drivers/mach-fs/gpio.c
index 5ec8a7d4e7d7..0649c8bea676 100644
--- a/arch/cris/arch-v32/drivers/mach-fs/gpio.c
+++ b/arch/cris/arch-v32/drivers/mach-fs/gpio.c
@@ -870,6 +870,7 @@ static const struct file_operations gpio_fops = {
870 .write = gpio_write, 870 .write = gpio_write,
871 .open = gpio_open, 871 .open = gpio_open,
872 .release = gpio_release, 872 .release = gpio_release,
873 .llseek = noop_llseek,
873}; 874};
874 875
875#ifdef CONFIG_ETRAX_VIRTUAL_GPIO 876#ifdef CONFIG_ETRAX_VIRTUAL_GPIO
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c
index bef6eb53b153..0f7b101ee5ee 100644
--- a/arch/cris/arch-v32/drivers/pcf8563.c
+++ b/arch/cris/arch-v32/drivers/pcf8563.c
@@ -60,6 +60,7 @@ static int voltage_low;
60static const struct file_operations pcf8563_fops = { 60static const struct file_operations pcf8563_fops = {
61 .owner = THIS_MODULE, 61 .owner = THIS_MODULE,
62 .unlocked_ioctl = pcf8563_unlocked_ioctl, 62 .unlocked_ioctl = pcf8563_unlocked_ioctl,
63 .llseek = noop_llseek,
63}; 64};
64 65
65unsigned char 66unsigned char
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c
index ca248f3adb80..a2e8a8c39856 100644
--- a/arch/cris/arch-v32/drivers/sync_serial.c
+++ b/arch/cris/arch-v32/drivers/sync_serial.c
@@ -247,7 +247,8 @@ static const struct file_operations sync_serial_fops = {
247 .poll = sync_serial_poll, 247 .poll = sync_serial_poll,
248 .unlocked_ioctl = sync_serial_ioctl, 248 .unlocked_ioctl = sync_serial_ioctl,
249 .open = sync_serial_open, 249 .open = sync_serial_open,
250 .release = sync_serial_release 250 .release = sync_serial_release,
251 .llseek = noop_llseek,
251}; 252};
252 253
253static int __init etrax_sync_serial_init(void) 254static int __init etrax_sync_serial_init(void)
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c
index 195ec5fa0dd2..b82e08615d1b 100644
--- a/arch/cris/kernel/profile.c
+++ b/arch/cris/kernel/profile.c
@@ -59,6 +59,7 @@ write_cris_profile(struct file *file, const char __user *buf,
59static const struct file_operations cris_proc_profile_operations = { 59static const struct file_operations cris_proc_profile_operations = {
60 .read = read_cris_profile, 60 .read = read_cris_profile,
61 .write = write_cris_profile, 61 .write = write_cris_profile,
62 .llseek = default_llseek,
62}; 63};
63 64
64static int __init init_cris_profile(void) 65static int __init init_cris_profile(void)
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c
index aa8b5fa1a8de..6f22c4041630 100644
--- a/arch/ia64/kernel/salinfo.c
+++ b/arch/ia64/kernel/salinfo.c
@@ -354,6 +354,7 @@ retry:
354static const struct file_operations salinfo_event_fops = { 354static const struct file_operations salinfo_event_fops = {
355 .open = salinfo_event_open, 355 .open = salinfo_event_open,
356 .read = salinfo_event_read, 356 .read = salinfo_event_read,
357 .llseek = noop_llseek,
357}; 358};
358 359
359static int 360static int
@@ -571,6 +572,7 @@ static const struct file_operations salinfo_data_fops = {
571 .release = salinfo_log_release, 572 .release = salinfo_log_release,
572 .read = salinfo_log_read, 573 .read = salinfo_log_read,
573 .write = salinfo_log_write, 574 .write = salinfo_log_write,
575 .llseek = default_llseek,
574}; 576};
575 577
576static int __cpuinit 578static int __cpuinit
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index fa1eceed0d23..30862c0358cd 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -860,6 +860,7 @@ error:
860 860
861static const struct file_operations sn_hwperf_fops = { 861static const struct file_operations sn_hwperf_fops = {
862 .unlocked_ioctl = sn_hwperf_ioctl, 862 .unlocked_ioctl = sn_hwperf_ioctl,
863 .llseek = noop_llseek,
863}; 864};
864 865
865static struct miscdevice sn_hwperf_dev = { 866static struct miscdevice sn_hwperf_dev = {
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c
index cb8617bb194b..1c4d4c7bf4d4 100644
--- a/arch/m68k/bvme6000/rtc.c
+++ b/arch/m68k/bvme6000/rtc.c
@@ -155,6 +155,7 @@ static const struct file_operations rtc_fops = {
155 .unlocked_ioctl = rtc_ioctl, 155 .unlocked_ioctl = rtc_ioctl,
156 .open = rtc_open, 156 .open = rtc_open,
157 .release = rtc_release, 157 .release = rtc_release,
158 .llseek = noop_llseek,
158}; 159};
159 160
160static struct miscdevice rtc_dev = { 161static struct miscdevice rtc_dev = {
diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c
index 11ac6f63967a..39c79ebcd18a 100644
--- a/arch/m68k/mvme16x/rtc.c
+++ b/arch/m68k/mvme16x/rtc.c
@@ -144,6 +144,7 @@ static const struct file_operations rtc_fops = {
144 .unlocked_ioctl = rtc_ioctl, 144 .unlocked_ioctl = rtc_ioctl,
145 .open = rtc_open, 145 .open = rtc_open,
146 .release = rtc_release, 146 .release = rtc_release,
147 .llseek = noop_llseek,
147}; 148};
148 149
149static struct miscdevice rtc_dev= 150static struct miscdevice rtc_dev=
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index 26f9b9ab19cc..557ef72472e0 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -468,7 +468,8 @@ static const struct file_operations rtlx_fops = {
468 .release = file_release, 468 .release = file_release,
469 .write = file_write, 469 .write = file_write,
470 .read = file_read, 470 .read = file_read,
471 .poll = file_poll 471 .poll = file_poll,
472 .llseek = noop_llseek,
472}; 473};
473 474
474static struct irqaction rtlx_irq = { 475static struct irqaction rtlx_irq = {
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 2bd2151c586a..3eb3cde2f661 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -1192,7 +1192,8 @@ static const struct file_operations vpe_fops = {
1192 .owner = THIS_MODULE, 1192 .owner = THIS_MODULE,
1193 .open = vpe_open, 1193 .open = vpe_open,
1194 .release = vpe_release, 1194 .release = vpe_release,
1195 .write = vpe_write 1195 .write = vpe_write,
1196 .llseek = noop_llseek,
1196}; 1197};
1197 1198
1198/* module wrapper entry points */ 1199/* module wrapper entry points */
diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c
index d4ed7a9156f5..ca35b730d189 100644
--- a/arch/mips/sibyte/common/sb_tbprof.c
+++ b/arch/mips/sibyte/common/sb_tbprof.c
@@ -545,6 +545,7 @@ static const struct file_operations sbprof_tb_fops = {
545 .unlocked_ioctl = sbprof_tb_ioctl, 545 .unlocked_ioctl = sbprof_tb_ioctl,
546 .compat_ioctl = sbprof_tb_ioctl, 546 .compat_ioctl = sbprof_tb_ioctl,
547 .mmap = NULL, 547 .mmap = NULL,
548 .llseek = default_llseek,
548}; 549};
549 550
550static struct class *tb_class; 551static struct class *tb_class;
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 50362b6ef6e9..b1dd962e247e 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -780,6 +780,7 @@ static const struct file_operations lparcfg_fops = {
780 .write = lparcfg_write, 780 .write = lparcfg_write,
781 .open = lparcfg_open, 781 .open = lparcfg_open,
782 .release = single_release, 782 .release = single_release,
783 .llseek = seq_lseek,
783}; 784};
784 785
785static int __init lparcfg_init(void) 786static int __init lparcfg_init(void)
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 67a84d8f118d..2b442e6c21e6 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -716,6 +716,7 @@ static const struct file_operations rtas_flash_operations = {
716 .write = rtas_flash_write, 716 .write = rtas_flash_write,
717 .open = rtas_excl_open, 717 .open = rtas_excl_open,
718 .release = rtas_flash_release, 718 .release = rtas_flash_release,
719 .llseek = default_llseek,
719}; 720};
720 721
721static const struct file_operations manage_flash_operations = { 722static const struct file_operations manage_flash_operations = {
@@ -724,6 +725,7 @@ static const struct file_operations manage_flash_operations = {
724 .write = manage_flash_write, 725 .write = manage_flash_write,
725 .open = rtas_excl_open, 726 .open = rtas_excl_open,
726 .release = rtas_excl_release, 727 .release = rtas_excl_release,
728 .llseek = default_llseek,
727}; 729};
728 730
729static const struct file_operations validate_flash_operations = { 731static const struct file_operations validate_flash_operations = {
@@ -732,6 +734,7 @@ static const struct file_operations validate_flash_operations = {
732 .write = validate_flash_write, 734 .write = validate_flash_write,
733 .open = rtas_excl_open, 735 .open = rtas_excl_open,
734 .release = validate_flash_release, 736 .release = validate_flash_release,
737 .llseek = default_llseek,
735}; 738};
736 739
737static int __init rtas_flash_init(void) 740static int __init rtas_flash_init(void)
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c
index 638883e23e3a..0438f819fe6b 100644
--- a/arch/powerpc/kernel/rtasd.c
+++ b/arch/powerpc/kernel/rtasd.c
@@ -354,6 +354,7 @@ static const struct file_operations proc_rtas_log_operations = {
354 .poll = rtas_log_poll, 354 .poll = rtas_log_poll,
355 .open = rtas_log_open, 355 .open = rtas_log_open,
356 .release = rtas_log_release, 356 .release = rtas_log_release,
357 .llseek = noop_llseek,
357}; 358};
358 359
359static int enable_surveillance(int timeout) 360static int enable_surveillance(int timeout)
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index 33e5fc7334fc..42d0a886de05 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -1249,6 +1249,7 @@ out:
1249 1249
1250static const struct file_operations proc_vmlinux_operations = { 1250static const struct file_operations proc_vmlinux_operations = {
1251 .write = proc_mf_change_vmlinux, 1251 .write = proc_mf_change_vmlinux,
1252 .llseek = default_llseek,
1252}; 1253};
1253 1254
1254static int __init mf_proc_init(void) 1255static int __init mf_proc_init(void)
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 57ddbb43b33a..1de2cbb92303 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -539,7 +539,8 @@ out:
539} 539}
540 540
541static const struct file_operations ofdt_fops = { 541static const struct file_operations ofdt_fops = {
542 .write = ofdt_write 542 .write = ofdt_write,
543 .llseek = noop_llseek,
543}; 544};
544 545
545/* create /proc/powerpc/ofdt write-only by root */ 546/* create /proc/powerpc/ofdt write-only by root */
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index 80e9e7652a4d..554457294a2b 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -170,6 +170,7 @@ const struct file_operations scanlog_fops = {
170 .write = scanlog_write, 170 .write = scanlog_write,
171 .open = scanlog_open, 171 .open = scanlog_open,
172 .release = scanlog_release, 172 .release = scanlog_release,
173 .llseek = noop_llseek,
173}; 174};
174 175
175static int __init scanlog_init(void) 176static int __init scanlog_init(void)
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c
index aa819dac2360..975e3ab13cb5 100644
--- a/arch/s390/crypto/prng.c
+++ b/arch/s390/crypto/prng.c
@@ -152,6 +152,7 @@ static const struct file_operations prng_fops = {
152 .open = &prng_open, 152 .open = &prng_open,
153 .release = NULL, 153 .release = NULL,
154 .read = &prng_read, 154 .read = &prng_read,
155 .llseek = noop_llseek,
155}; 156};
156 157
157static struct miscdevice prng_dev = { 158static struct miscdevice prng_dev = {
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index 1211bb1d2f24..020e51c063d2 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -618,6 +618,7 @@ static const struct file_operations dbfs_d204_ops = {
618 .open = dbfs_d204_open, 618 .open = dbfs_d204_open,
619 .read = dbfs_d204_read, 619 .read = dbfs_d204_read,
620 .release = dbfs_d204_release, 620 .release = dbfs_d204_release,
621 .llseek = no_llseek,
621}; 622};
622 623
623static int hypfs_dbfs_init(void) 624static int hypfs_dbfs_init(void)
diff --git a/arch/s390/hypfs/hypfs_vm.c b/arch/s390/hypfs/hypfs_vm.c
index ee5ab1a578e7..26cf177f6a3a 100644
--- a/arch/s390/hypfs/hypfs_vm.c
+++ b/arch/s390/hypfs/hypfs_vm.c
@@ -275,6 +275,7 @@ static const struct file_operations dbfs_d2fc_ops = {
275 .open = dbfs_d2fc_open, 275 .open = dbfs_d2fc_open,
276 .read = dbfs_d2fc_read, 276 .read = dbfs_d2fc_read,
277 .release = dbfs_d2fc_release, 277 .release = dbfs_d2fc_release,
278 .llseek = no_llseek,
278}; 279};
279 280
280int hypfs_vm_init(void) 281int hypfs_vm_init(void)
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 98a4a4c267a7..74d98670be27 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -449,6 +449,7 @@ static const struct file_operations hypfs_file_ops = {
449 .write = do_sync_write, 449 .write = do_sync_write,
450 .aio_read = hypfs_aio_read, 450 .aio_read = hypfs_aio_read,
451 .aio_write = hypfs_aio_write, 451 .aio_write = hypfs_aio_write,
452 .llseek = no_llseek,
452}; 453};
453 454
454static struct file_system_type hypfs_type = { 455static struct file_system_type hypfs_type = {
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 98192261491d..5ad6bc078bfd 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -174,6 +174,7 @@ static const struct file_operations debug_file_ops = {
174 .write = debug_input, 174 .write = debug_input,
175 .open = debug_open, 175 .open = debug_open,
176 .release = debug_close, 176 .release = debug_close,
177 .llseek = no_llseek,
177}; 178};
178 179
179static struct dentry *debug_debugfs_root_entry; 180static struct dentry *debug_debugfs_root_entry;
diff --git a/arch/sh/boards/mach-landisk/gio.c b/arch/sh/boards/mach-landisk/gio.c
index 01e6abb769b9..8132dff078fb 100644
--- a/arch/sh/boards/mach-landisk/gio.c
+++ b/arch/sh/boards/mach-landisk/gio.c
@@ -128,6 +128,7 @@ static const struct file_operations gio_fops = {
128 .open = gio_open, /* open */ 128 .open = gio_open, /* open */
129 .release = gio_close, /* release */ 129 .release = gio_close, /* release */
130 .unlocked_ioctl = gio_ioctl, 130 .unlocked_ioctl = gio_ioctl,
131 .llseek = noop_llseek,
131}; 132};
132 133
133static int __init gio_init(void) 134static int __init gio_init(void)
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c
index 2c0046ecc715..52de4a9424e8 100644
--- a/arch/sparc/kernel/apc.c
+++ b/arch/sparc/kernel/apc.c
@@ -132,6 +132,7 @@ static const struct file_operations apc_fops = {
132 .unlocked_ioctl = apc_ioctl, 132 .unlocked_ioctl = apc_ioctl,
133 .open = apc_open, 133 .open = apc_open,
134 .release = apc_release, 134 .release = apc_release,
135 .llseek = noop_llseek,
135}; 136};
136 137
137static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; 138static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops };
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
index 83e85c2e802a..6addb914fcc8 100644
--- a/arch/sparc/kernel/mdesc.c
+++ b/arch/sparc/kernel/mdesc.c
@@ -890,6 +890,7 @@ static ssize_t mdesc_read(struct file *file, char __user *buf,
890static const struct file_operations mdesc_fops = { 890static const struct file_operations mdesc_fops = {
891 .read = mdesc_read, 891 .read = mdesc_read,
892 .owner = THIS_MODULE, 892 .owner = THIS_MODULE,
893 .llseek = noop_llseek,
893}; 894};
894 895
895static struct miscdevice mdesc_misc = { 896static struct miscdevice mdesc_misc = {
diff --git a/arch/tile/kernel/hardwall.c b/arch/tile/kernel/hardwall.c
index 584b965dc824..1e54a7843410 100644
--- a/arch/tile/kernel/hardwall.c
+++ b/arch/tile/kernel/hardwall.c
@@ -774,6 +774,7 @@ static const struct file_operations dev_hardwall_fops = {
774#endif 774#endif
775 .flush = hardwall_flush, 775 .flush = hardwall_flush,
776 .release = hardwall_release, 776 .release = hardwall_release,
777 .llseek = noop_llseek,
777}; 778};
778 779
779static struct cdev hardwall_dev; 780static struct cdev hardwall_dev;
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c
index cfcac1ff4cf2..dd1e6f871fe4 100644
--- a/arch/um/drivers/harddog_kern.c
+++ b/arch/um/drivers/harddog_kern.c
@@ -166,6 +166,7 @@ static const struct file_operations harddog_fops = {
166 .unlocked_ioctl = harddog_ioctl, 166 .unlocked_ioctl = harddog_ioctl,
167 .open = harddog_open, 167 .open = harddog_open,
168 .release = harddog_release, 168 .release = harddog_release,
169 .llseek = no_llseek,
169}; 170};
170 171
171static struct miscdevice harddog_miscdev = { 172static struct miscdevice harddog_miscdev = {
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index ebc680717e59..975613b23dcf 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -843,6 +843,7 @@ static ssize_t mconsole_proc_write(struct file *file,
843static const struct file_operations mconsole_proc_fops = { 843static const struct file_operations mconsole_proc_fops = {
844 .owner = THIS_MODULE, 844 .owner = THIS_MODULE,
845 .write = mconsole_proc_write, 845 .write = mconsole_proc_write,
846 .llseek = noop_llseek,
846}; 847};
847 848
848static int create_proc_mconsole(void) 849static int create_proc_mconsole(void)
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
index 7158393b6793..8501e7d0015c 100644
--- a/arch/um/drivers/mmapper_kern.c
+++ b/arch/um/drivers/mmapper_kern.c
@@ -93,6 +93,7 @@ static const struct file_operations mmapper_fops = {
93 .mmap = mmapper_mmap, 93 .mmap = mmapper_mmap,
94 .open = mmapper_open, 94 .open = mmapper_open,
95 .release = mmapper_release, 95 .release = mmapper_release,
96 .llseek = default_llseek,
96}; 97};
97 98
98/* 99/*
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index 4949044773ba..981085a93f30 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -100,6 +100,7 @@ static const struct file_operations rng_chrdev_ops = {
100 .owner = THIS_MODULE, 100 .owner = THIS_MODULE,
101 .open = rng_dev_open, 101 .open = rng_dev_open,
102 .read = rng_dev_read, 102 .read = rng_dev_read,
103 .llseek = noop_llseek,
103}; 104};
104 105
105/* rng_init shouldn't be called more than once at boot time */ 106/* rng_init shouldn't be called more than once at boot time */
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 4c9c67bf09b7..fbbc4dadecc4 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -1926,6 +1926,7 @@ static const struct file_operations apm_bios_fops = {
1926 .unlocked_ioctl = do_ioctl, 1926 .unlocked_ioctl = do_ioctl,
1927 .open = do_open, 1927 .open = do_open,
1928 .release = do_release, 1928 .release = do_release,
1929 .llseek = noop_llseek,
1929}; 1930};
1930 1931
1931static struct miscdevice apm_device = { 1932static struct miscdevice apm_device = {
diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c
index 8a85dd1b1aa1..1e8d66c1336a 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c
@@ -192,6 +192,7 @@ static const struct file_operations severities_coverage_fops = {
192 .release = seq_release, 192 .release = seq_release,
193 .read = seq_read, 193 .read = seq_read,
194 .write = severities_coverage_write, 194 .write = severities_coverage_write,
195 .llseek = seq_lseek,
195}; 196};
196 197
197static int __init severities_debugfs_init(void) 198static int __init severities_debugfs_init(void)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index ed41562909fe..7a35b72d7c03 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1665,6 +1665,7 @@ struct file_operations mce_chrdev_ops = {
1665 .read = mce_read, 1665 .read = mce_read,
1666 .poll = mce_poll, 1666 .poll = mce_poll,
1667 .unlocked_ioctl = mce_ioctl, 1667 .unlocked_ioctl = mce_ioctl,
1668 .llseek = no_llseek,
1668}; 1669};
1669EXPORT_SYMBOL_GPL(mce_chrdev_ops); 1670EXPORT_SYMBOL_GPL(mce_chrdev_ops);
1670 1671
diff --git a/arch/x86/kernel/kdebugfs.c b/arch/x86/kernel/kdebugfs.c
index 8afd9f321f10..90fcf62854bb 100644
--- a/arch/x86/kernel/kdebugfs.c
+++ b/arch/x86/kernel/kdebugfs.c
@@ -78,6 +78,7 @@ static int setup_data_open(struct inode *inode, struct file *file)
78static const struct file_operations fops_setup_data = { 78static const struct file_operations fops_setup_data = {
79 .read = setup_data_read, 79 .read = setup_data_read,
80 .open = setup_data_open, 80 .open = setup_data_open,
81 .llseek = default_llseek,
81}; 82};
82 83
83static int __init 84static int __init
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index fa6551d36c10..0b3d37e83606 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -232,6 +232,7 @@ static const struct file_operations microcode_fops = {
232 .owner = THIS_MODULE, 232 .owner = THIS_MODULE,
233 .write = microcode_write, 233 .write = microcode_write,
234 .open = microcode_open, 234 .open = microcode_open,
235 .llseek = no_llseek,
235}; 236};
236 237
237static struct miscdevice microcode_dev = { 238static struct miscdevice microcode_dev = {
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index 312ef0292815..50ac949c7f1c 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -1285,6 +1285,7 @@ static const struct file_operations tunables_fops = {
1285 .open = tunables_open, 1285 .open = tunables_open,
1286 .read = tunables_read, 1286 .read = tunables_read,
1287 .write = tunables_write, 1287 .write = tunables_write,
1288 .llseek = default_llseek,
1288}; 1289};
1289 1290
1290static int __init uv_ptc_init(void) 1291static int __init uv_ptc_init(void)
diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c
index 1304bcec8ee5..7c0fedd98ea0 100644
--- a/arch/x86/xen/debugfs.c
+++ b/arch/x86/xen/debugfs.c
@@ -106,6 +106,7 @@ static const struct file_operations u32_array_fops = {
106 .open = u32_array_open, 106 .open = u32_array_open,
107 .release= xen_array_release, 107 .release= xen_array_release,
108 .read = u32_array_read, 108 .read = u32_array_read,
109 .llseek = no_llseek,
109}; 110};
110 111
111struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode, 112struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode,