summaryrefslogtreecommitdiffstats
path: root/drivers/char/nvram.c
Commit message (Collapse)AuthorAgeFilesLines
* nvram: Fix write beyond end condition; prove to gcc copy is safeH. Peter Anvin2009-12-111-4/+10
| | | | | | | | | | | | | | | | | | | | In nvram_write, first of all, correctly handle the case where the file pointer is already beyond the end; we should return EOF in that case. Second, make the logic a bit more explicit so that gcc can statically prove that the copy_from_user() is safe. Once the condition of the beyond-end filepointer is eliminated, the copy is safe but gcc can't prove it, causing build failures for i386 allyesconfig. Third, eliminate the entirely superfluous variable "len", and just use the passed-in variable "count" instead. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <tip-*@git.kernel.org>
* nvram: Fix missing smp_lock.h in nvramFrederic Weisbecker2009-12-091-0/+1
| | | | | | | | | | | | | | | | | | | The bkl has been removed from nvram_llseek() and smp_lock.h was removed because another patch in the same tree zapped the remaining usage of bkl in the same file. But this patch must have been excluded later, then we still need the smp_lock.h headers for the bkl use in nvram_open(). This fixes the following build error: drivers/char/nvram.c: In function ‘nvram_open’: drivers/char/nvram.c:332: erreur: implicit declaration of function ‘lock_kernel’ drivers/char/nvram.c:339: erreur: implicit declaration of function ‘unlock_kernel’ make[2]: *** [drivers/char/nvram.o] Erreur 1 make[1]: *** [drivers/char] Erreur 2 make: *** [drivers] Erreur 2 Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* nvram: Drop the bkl from non-generic nvram_llseek()Frederic Weisbecker2009-10-141-3/+1
| | | | | | | | | Drop the bkl from nvram_llseek() as it obviously protects nothing. The file offset is safe in essence. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1255116426-7270-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] nvram - convert PRINT_PROC to seq_fileWim Van Sebroeck2008-11-111-78/+82
| | | | | | | Convert the /proc/drivers/nvram file from the old PRINT_PROC macro to the new seq_file filesystem. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [PATCH] nvram - CodingStyleWim Van Sebroeck2008-11-111-74/+52
| | | | | | Bring drivers/char/nvram.c in line with the Coding Style. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
* [PATCH] introduce fmode_t, do annotationsAl Viro2008-10-211-3/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* drivers/char/nvram.c: Removed duplicated includeHuang Weiyi2008-07-231-1/+0
| | | | | | | | Removed duplicated include file <linux/smp_lock.h> in drivers/char/nvram.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* m68k: Return -ENODEV if no device is foundGeert Uytterhoeven2008-07-201-1/+1
| | | | | | | | According to the tests in do_initcalls(), the proper error code in case no device is found is -ENODEV, not -ENXIO or -EIO. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* nvram: BKL pushdownArnd Bergmann2008-07-021-0/+4
| | | | Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* COBALT: remove all references to Cobalt NVRAMRobert P. J. Day2007-07-161-191/+1
| | | | | | | | | | Remove not only the references to Cobalt NVRAM, but the header file as well. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Tim Hockin <thockin@hockin.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] remove many unneeded #includes of sched.hTim Schmielau2007-02-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] make more file_operation structs staticArjan van de Ven2006-07-031-1/+1
| | | | | | | | | | | | Mark the static struct file_operations in drivers/char as const. Making them const prevents accidental bugs, and moves them to the .rodata section so that they no longer do any false sharing; in addition with the proper debug option they are then protected against corruption.. [akpm@osdl.org: build fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-301-1/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] drivers/char: Use ARRAY_SIZE macroTobias Klauser2006-01-101-7/+5
| | | | | | | | | Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of ARRAY_SIZE. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] ARM: Reverted 2921/1: Support for the RTC / nvram on the Comdial MP1000Russell King2005-11-041-109/+1
| | | | No longer maintained
* [ARM] 2921/1: Support for the RTC / nvram on the Comdial MP1000Jon Ringle2005-10-281-1/+109
| | | | | | | | | Patch from Jon Ringle This adds support for the RTC and nvram on the Comdial MP1000 Signed-off-by: Jon Ringle Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [PATCH] drivers/char/nvram.c: possible cleanupsAdrian Bunk2005-06-251-3/+3
| | | | | | | | | | | This patch contains the following possible cleanups: - make the needlessly global function __nvram_set_checksum static - #if 0 the unused global function nvram_set_checksum - remove the EXPORT_SYMBOL's for both functions Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+926
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud