pandora-kernel.git
13 years agoGPIO_RDC321X: select MFD_SUPPORT to squelch kconfig warning
Randy Dunlap [Thu, 13 Jan 2011 01:00:21 +0000 (17:00 -0800)]
GPIO_RDC321X: select MFD_SUPPORT to squelch kconfig warning

Fix kconfig dependency warning to satisfy dependencies:

warning: (GPIO_RDC321X && PCI && GPIOLIB) selects MFD_RDC321X which has unmet direct dependencies (MFD_SUPPORT && PCI)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: vr41xx_giu: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:20 +0000 (17:00 -0800)]
gpio: vr41xx_giu: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Cc: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: timbgpio: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:19 +0000 (17:00 -0800)]
gpio: timbgpio: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Cc: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: tc35892-gpio: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:19 +0000 (17:00 -0800)]
gpio: tc35892-gpio: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: sx150x: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:18 +0000 (17:00 -0800)]
gpio: sx150x: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Cc: Gregory Bean <gbean@codeaurora.org>
Tested-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: stmpe-gpio: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:17 +0000 (17:00 -0800)]
gpio: stmpe-gpio: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: Luotao Fu <l.fu@pengutronix.de>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: pl061: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:16 +0000 (17:00 -0800)]
gpio: pl061: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: pca953x: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:15 +0000 (17:00 -0800)]
gpio: pca953x: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Cc: Alek Du <alek.du@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: max732x: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:14 +0000 (17:00 -0800)]
gpio: max732x: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Marc Zyngier <maz@misterjones.org>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: langwell_gpio: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:13 +0000 (17:00 -0800)]
gpio: langwell_gpio: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Yin Kangkai <kangkai.yin@intel.com>
Cc: Alek Du <alek.du@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agogpio: adp5588-gpio: irq_data conversion
Lennert Buytenhek [Thu, 13 Jan 2011 01:00:12 +0000 (17:00 -0800)]
gpio: adp5588-gpio: irq_data conversion

Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: "Hennerich, Michael" <Michael.Hennerich@analog.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocs5535: deprecate older cs5535_gpio driver
Andres Salomon [Thu, 13 Jan 2011 01:00:12 +0000 (17:00 -0800)]
cs5535: deprecate older cs5535_gpio driver

The newer drivers/gpio/cs5535-gpio.c replaces drivers/misc/cs5535_gpio.c.
The new driver has been in the tree for a little while, and has received
some testing; it's time to mark the old one as deprecated.  I'm thinking
removal around 2.6.40 would be good, provided we're not missing critical
functionality in the newer driver.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: Daniel Drake <dsd@laptop.org>
Acked-by: Ben Gardner <bgardner@wabtec.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/staging/olpc_dcon: convert to new cs5535 gpio API
Andres Salomon [Thu, 13 Jan 2011 01:00:11 +0000 (17:00 -0800)]
drivers/staging/olpc_dcon: convert to new cs5535 gpio API

Drop the old geode_gpio crud, as well as the raw outl() calls; instead,
use the Linux GPIO API where possible, and the cs5535_gpio API in other
places.

Note that we don't actually clean up the driver properly yet (once loaded,
it always remains loaded).  That'll come later..

This patch is necessary for building the driver.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/gpio/cs5535-gpio.c: add some additional cs5535-specific GPIO functionality
Andres Salomon [Thu, 13 Jan 2011 01:00:10 +0000 (17:00 -0800)]
drivers/gpio/cs5535-gpio.c: add some additional cs5535-specific GPIO functionality

This adds (well, re-adds actually) handling for events/IRQs through cs5535
GPIOs.  In the wild and wooly world of CS5535, setup_event() is for
assigning an IRQ to a GPIO filter/event pair, and set_irq() sets up the
pair to trigger IRQs.

These should really only be used in highly platform-specific drivers (such
as OLPC's DCON driver).  Sadly, because set_irq() uses MSRs, this causes
the driver to become X86-specific.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Daniel Drake <dsd@laptop.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agortc: rtc-max6902 - set driver data in max6902_probe()
Axel Lin [Thu, 13 Jan 2011 01:00:09 +0000 (17:00 -0800)]
rtc: rtc-max6902 - set driver data in max6902_probe()

Current implementation does not set driver data in max6902_probe(), thus
calling platform_get_drvdata(spi) in max6902_remove() returns NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agortc: delete legacy MAINTAINERS entry
Paul Gortmaker [Thu, 13 Jan 2011 01:00:08 +0000 (17:00 -0800)]
rtc: delete legacy MAINTAINERS entry

People stumble across the entry for the legacy PC specific RTC driver
entry in MAINTAINERS when they really want the multi-arch, multi-driver
RTC subsystem.  So just delete the old entry that is causing the
confusion.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agortc-cmos: fix suspend/resume
Paul Fox [Thu, 13 Jan 2011 01:00:07 +0000 (17:00 -0800)]
rtc-cmos: fix suspend/resume

rtc-cmos was setting suspend/resume hooks at the device_driver level.
However, the platform bus code (drivers/base/platform.c) only looks for
resume hooks at the dev_pm_ops level, or within the platform_driver.

Switch rtc_cmos to use dev_pm_ops so that suspend/resume code is executed
again.

Paul said:

: The user visible symptom in our (XO laptop) case was that rtcwake would
: fail to wake the laptop.  The RTC alarm would expire, but the wakeup
: wasn't unmasked.
:
: As for severity, the impact may have been reduced because if I recall
: correctly, the bug only affected platforms with CONFIG_PNP disabled.

Signed-off-by: Paul Fox <pgf@laptop.org>
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: <stable@kernel.org> [2.6.37.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/rtc/rtc-omap.c: fix a memory leak
Axel Lin [Thu, 13 Jan 2011 01:00:05 +0000 (17:00 -0800)]
drivers/rtc/rtc-omap.c: fix a memory leak

request_mem_region() will call kzalloc to allocate memory for struct
resource.  release_resource() unregisters the resource but does not free
the allocated memory, thus use release_mem_region() instead to fix the
memory leak.

Also add a missing iounmap() in omap_rtc_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tony Lindgren <tony@atomide.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agovgacon: check for efi machine
Yannick Heneault [Thu, 13 Jan 2011 01:00:04 +0000 (17:00 -0800)]
vgacon: check for efi machine

It seems there is a small problem of VGA palette corruption on EFI
machine.  When the kernel initializes the architecture, it checks if the
machine is a EFI machine and assumes that a VGA console can exist.

When it initializes the console in vgacon_startup it checks if it can
really use the VGA console.  I think this is where a check is missing.
Currently, the function can fail if a VESA boot mode is detected but not if
a EFI boot mode was used.

Thus vgacon_startup() doesn't fail and initialize the video card for a real
VGA mode.  This function changes the first 16entries of the VGA palette.

When the efifb driver kicks in, the palette is not restored to default
ramp value, thus the 16 first entry remain in a modified state.  The
following patch prevent this corruption.

Signed-off-by: Yannick Heneault <yheneaul@matrox.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agobinfmt_elf: cleanups
Mikael Pettersson [Thu, 13 Jan 2011 01:00:02 +0000 (17:00 -0800)]
binfmt_elf: cleanups

This cleans up a few bits in binfmt_elf.c and binfmts.h:

- the hasvdso field in struct linux_binfmt is unused, so remove it and
  the only initialization of it

- the elf_map CPP symbol is not defined anywhere in the kernel, so
  remove an unnecessary #ifndef elf_map

- reduce excessive indentation in elf_format's initializer

- add missing spaces, remove extraneous spaces

No functional changes, but tested on x86 (32 and 64 bit), powerpc (32 and
64 bit), sparc64, arm, and alpha.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoepoll: convert max_user_watches to long
Robin Holt [Thu, 13 Jan 2011 01:00:01 +0000 (17:00 -0800)]
epoll: convert max_user_watches to long

On a 16TB machine, max_user_watches has an integer overflow.  Convert it
to use a long and handle the associated fallout.

Signed-off-by: Robin Holt <holt@sgi.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofs/select.c: fix information leak to userspace
Vasiliy Kulikov [Thu, 13 Jan 2011 01:00:00 +0000 (17:00 -0800)]
fs/select.c: fix information leak to userspace

On some architectures __kernel_suseconds_t is int.  On these archs struct
timeval has padding bytes at the end.  This struct is copied to userspace
with these padding bytes uninitialized.  This leads to leaking of contents
of kernel stack memory.

This bug was added with v2.6.27-rc5-286-gb773ad4.

[akpm@linux-foundation.org: avoid the memset on architectures which don't need it]
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocheckpatch.pl: add "prefer __packed" check
Joe Perches [Thu, 13 Jan 2011 01:00:00 +0000 (17:00 -0800)]
checkpatch.pl: add "prefer __packed" check

There's a __packed #define for __attribute__((packed)).  Add a checkpatch
to tell people about it.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocheckpatch: check for world-writeable sysfs/debugfs files
Dave Jones [Thu, 13 Jan 2011 00:59:59 +0000 (16:59 -0800)]
checkpatch: check for world-writeable sysfs/debugfs files

Exporting world writable sysfs/debugfs files is usually a bad thing.  Warn
about it.

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocheckpatch.pl: fix CAST detection
Florian Mickler [Thu, 13 Jan 2011 00:59:58 +0000 (16:59 -0800)]
checkpatch.pl: fix CAST detection

We should only claim that something is a cast if we did not encouter a
token before, that did set av_pending.

This fixes the operator * in the line below to be detected as binary (vs
unary).

kmalloc(sizeof(struct alphatrack_ocmd) * true_size, GFP_KERNEL);

Reported-by: Audun Hoem <audun.hoem@gmail.com>
Signed-off-by: Florian Mickler <florian@mickler.org>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoscripts/checkpatch.pl: add check for multiple terminating semicolons and casts of...
Joe Perches [Thu, 13 Jan 2011 00:59:56 +0000 (16:59 -0800)]
scripts/checkpatch.pl: add check for multiple terminating semicolons and casts of vmalloc

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoflex_array: export symbols to modules
David Rientjes [Thu, 13 Jan 2011 00:59:55 +0000 (16:59 -0800)]
flex_array: export symbols to modules

Alex said:

  I want to use flex_array to store a sparse array of ATM cell
  re-assembly buffers for my ATM over Ethernet driver.  Using the per-vcc
  user_back structure causes problems when stacked with things like
  br2684.

Add EXPORT_SYMBOL() for all publically accessible flex array functions
and move to obj-y so that modules may use this library.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Reported-by: Alex Bennee <kernel-hacker@bennee.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: remove Stelian from the AMS driver record
Stelian Pop [Thu, 13 Jan 2011 00:59:54 +0000 (16:59 -0800)]
MAINTAINERS: remove Stelian from the AMS driver record

This driver is PPC only, and I am no longer able to test it.

Signed-off-by: Stelian Pop <stelian@popies.net>
Cc: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: orphan the meye driver
Stelian Pop [Thu, 13 Jan 2011 00:59:53 +0000 (16:59 -0800)]
MAINTAINERS: orphan the meye driver

I don't even remember when it was that I sold this laptop, but
it has been a few years...

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoCREDITS: update Stelian's entry
Stelian Pop [Thu, 13 Jan 2011 00:59:52 +0000 (16:59 -0800)]
CREDITS: update Stelian's entry

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: openwrt-devel@ is subscribers-only
Lennert Buytenhek [Thu, 13 Jan 2011 00:59:51 +0000 (16:59 -0800)]
MAINTAINERS: openwrt-devel@ is subscribers-only

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoscripts/get_maintainer.pl: use --git-fallback more often
Joe Perches [Thu, 13 Jan 2011 00:59:50 +0000 (16:59 -0800)]
scripts/get_maintainer.pl: use --git-fallback more often

On Fri, 2010-11-05 at 13:50 -0700, Andrew Morton wrote:
> z:/usr/src/git26> perl scripts/get_maintainer.pl -file mm/mempolicy.c
> linux-mm@kvack.org
> linux-kernel@vger.kernel.org

Turns out this is an arguable defect in the script.

The MAINTAINERS entry for mm is:

MEMORY MANAGEMENT
L: linux-mm@kvack.org
W: http://www.linux-mm.org
S: Maintained
F: include/linux/mm.h
F: mm/

There's a maintainer entry, but no named individual, so the script doesn't
use git history via --git-fallback.

This is also a defect for MAINTAINERS with status entries marked "Orphan"
or "Odd fixes".

The script now checks a section for any "M:" entry and that an "S:" entry
is supported or maintained.  If both those conditions are not satisified,
use --git-fallback as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoscripts/get_maintainer.pl: make --rolestats the default
Joe Perches [Thu, 13 Jan 2011 00:59:49 +0000 (16:59 -0800)]
scripts/get_maintainer.pl: make --rolestats the default

This script now requires a user to add --norolestats to the command line
so it's harder to feed the output of this script to programs that send
mass emails.

Update --help to correct command line defaults.

Change version to 0.26.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agolib/vsprintf.c: fix vscnprintf() if @size is == 0
Anton Arapov [Thu, 13 Jan 2011 00:59:49 +0000 (16:59 -0800)]
lib/vsprintf.c: fix vscnprintf() if @size is == 0

vscnprintf() should return 0 if @size is == 0.  Update the comment for it,
as @size is unsigned.

This change based on the code of commit
b903c0b8899b46829a9b80ba55b61079b35940ec ("lib: fix scnprintf() if @size
is == 0") moves the real fix into vscnprinf() from scnprintf() and makes
scnprintf() call vscnprintf(), thus avoid code duplication.

Signed-off-by: Anton Arapov <aarapov@redhat.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/printk.h: use tab not spaces for indent
Joe Perches [Thu, 13 Jan 2011 00:59:48 +0000 (16:59 -0800)]
include/linux/printk.h: use tab not spaces for indent

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/printk.h: organize printk_ratelimited macros
Joe Perches [Thu, 13 Jan 2011 00:59:47 +0000 (16:59 -0800)]
include/linux/printk.h: organize printk_ratelimited macros

- Use no_printk for !CONFIG_PRINTK printk_ratelimited.

- Whitespace cleanup.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/printk.h lib/hexdump.c: neatening and add CONFIG_PRINTK guard
Joe Perches [Thu, 13 Jan 2011 00:59:47 +0000 (16:59 -0800)]
include/linux/printk.h lib/hexdump.c: neatening and add CONFIG_PRINTK guard

- Move prototypes and align arguments.

- Add CONFIG_PRINTK guard for print_hex functions

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/printk.h: add pr_<level>_once macros
Joe Perches [Thu, 13 Jan 2011 00:59:46 +0000 (16:59 -0800)]
include/linux/printk.h: add pr_<level>_once macros

- Move printk_once definitions and add an #ifdef CONFIG_PRINTK

- Add pr_<level>_once so printks can use pr_fmt

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/printk.h: use and neaten no_printk
Joe Perches [Thu, 13 Jan 2011 00:59:45 +0000 (16:59 -0800)]
include/linux/printk.h: use and neaten no_printk

- Move no_printk above first CONFIG_PRINTK block so it can be used by
  printk_once.

- Convert statement expression if (0) printk macros to no_printk.

- Convert printk_once(x...) to more normally used (fmt, ...) fmt,
  ##__VA_ARGS__.

- Standardize __attribute__ use.

- Expand single line inline functions.

- Remove space before pointer.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/printk.h: use space after #define
Joe Perches [Thu, 13 Jan 2011 00:59:45 +0000 (16:59 -0800)]
include/linux/printk.h: use space after #define

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/printk.h: move console functions and variables together
Joe Perches [Thu, 13 Jan 2011 00:59:43 +0000 (16:59 -0800)]
include/linux/printk.h: move console functions and variables together

There are many uses of printk_once(KERN_<level>, so add pr_<level>_once
macros to avoid printk_once(KERN_<level> pr_fmt(fmt).

Add an #ifdef CONFIG_PRINTK for print_hex_dump and static inline void
functions for the #else cases to reduce embedded code size.  Neaten and
organize the rest of the code.

This patch:

Move console functions and variables together.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoprintk: use RCU to prevent potential lock contention in kmsg_dump
Huang Ying [Thu, 13 Jan 2011 00:59:43 +0000 (16:59 -0800)]
printk: use RCU to prevent potential lock contention in kmsg_dump

dump_list_lock is used to protect dump_list in kmsg_dumper implementation,
kmsg_dump() uses it to traverse dump_list too.  But if there is contention
on the lock, kmsg_dump() will fail, and the valuable kernel message may be
lost.

This patch solves this issue with RCU.  Because kmsg_dump() only read the
list, no lock is needed in kmsg_dump().  So that kmsg_dump() will never
fail because of lock contention.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodca: remove unneeded NULL check
Dan Carpenter [Thu, 13 Jan 2011 00:59:42 +0000 (16:59 -0800)]
dca: remove unneeded NULL check

The return here doesn't release the locks or re-enable IRQs.  But as
Andrew Morton points out, domain is never NULL.  list_first_entry()
essentially never returns NULL and also we already verified that the list
is not empty.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokptr_restrict for hiding kernel pointers from unprivileged users
Dan Rosenberg [Thu, 13 Jan 2011 00:59:41 +0000 (16:59 -0800)]
kptr_restrict for hiding kernel pointers from unprivileged users

Add the %pK printk format specifier and the /proc/sys/kernel/kptr_restrict
sysctl.

The %pK format specifier is designed to hide exposed kernel pointers,
specifically via /proc interfaces.  Exposing these pointers provides an
easy target for kernel write vulnerabilities, since they reveal the
locations of writable structures containing easily triggerable function
pointers.  The behavior of %pK depends on the kptr_restrict sysctl.

If kptr_restrict is set to 0, no deviation from the standard %p behavior
occurs.  If kptr_restrict is set to 1, the default, if the current user
(intended to be a reader via seq_printf(), etc.) does not have CAP_SYSLOG
(currently in the LSM tree), kernel pointers using %pK are printed as 0's.
 If kptr_restrict is set to 2, kernel pointers using %pK are printed as
0's regardless of privileges.  Replacing with 0's was chosen over the
default "(null)", which cannot be parsed by userland %p, which expects
"(nil)".

[akpm@linux-foundation.org: check for IRQ context when !kptr_restrict, save an indent level, s/WARN/WARN_ONCE/]
[akpm@linux-foundation.org: coding-style fixup]
[randy.dunlap@oracle.com: fix kernel/sysctl.c warning]
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: James Morris <jmorris@namei.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Thomas Graf <tgraf@infradead.org>
Cc: Eugene Teo <eugeneteo@kernel.org>
Cc: Kees Cook <kees.cook@canonical.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David S. Miller <davem@davemloft.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Eric Paris <eparis@parisplace.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokernel: clean up USE_GENERIC_SMP_HELPERS
Amerigo Wang [Thu, 13 Jan 2011 00:59:39 +0000 (16:59 -0800)]
kernel: clean up USE_GENERIC_SMP_HELPERS

For arch which needs USE_GENERIC_SMP_HELPERS, it has to select
USE_GENERIC_SMP_HELPERS, rather than leaving a choice to user, since they
don't provide their own implementions.

Also, move on_each_cpu() to kernel/smp.c, it is strange to put it in
kernel/softirq.c.

For arch which doesn't use USE_GENERIC_SMP_HELPERS, e.g.  blackfin, only
on_each_cpu() is compiled.

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoihex: fix unused return value compiler warning
Chris Ruffin [Thu, 13 Jan 2011 00:59:38 +0000 (16:59 -0800)]
ihex: fix unused return value compiler warning

Fix unusued return value compiler warnings due to unchecked write() calls.

[akpm@linux-foundation.org: correctly handle short writes]
Signed-off-by: Chris Ruffin <cmruffin@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/asm-generic/vmlinux.lds.h: make readmostly section correctly align
Shaohua Li [Thu, 13 Jan 2011 00:59:38 +0000 (16:59 -0800)]
include/asm-generic/vmlinux.lds.h: make readmostly section correctly align

The readmostly section should end at a cacheline aligned address,
otherwise the last several data might share cachline with other data and
make the readmostly data still have cache bounce.

For example, in ia64, secpath_cachep is the last readmostly data, and it
shares cacheline with init_uts_ns.

a000000100e80480 d secpath_cachep
a000000100e80488 D init_uts_ns

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/unaligned/packed_struct.h: use __packed
Andrew Morton [Thu, 13 Jan 2011 00:59:37 +0000 (16:59 -0800)]
include/linux/unaligned/packed_struct.h: use __packed

Cc: Will Newton <will.newton@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agotoshiba.h: hide a function prototypes behind __KERNEL__ macro
Alexander Shishkin [Thu, 13 Jan 2011 00:59:35 +0000 (16:59 -0800)]
toshiba.h: hide a function prototypes behind __KERNEL__ macro

Currently, tosh_smm() prototype is present in a header file exported to
userland.  This patch fixes it.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Cc: Jonathan Buzzard <jonathan@buzzard.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/kernel.h: abs(): fix handling of 32-bit unsigneds on 64-bit
Andrew Morton [Thu, 13 Jan 2011 00:59:35 +0000 (16:59 -0800)]
include/linux/kernel.h: abs(): fix handling of 32-bit unsigneds on 64-bit

Michal reports:

In the framebuffer subsystem the abs() macro is often used as a part of
the calculation of a Manhattan metric, which in turn is used as a measure
of similarity between video modes.  The arguments of abs() are sometimes
unsigned numbers.  This worked fine until commit a49c59c0 ("Make sure the
value in abs() does not get truncated if it is greater than 2^32:) , which
changed the definition of abs() to prevent truncation.  As a result of
this change, in the following piece of code:

u32 a = 0, b = 1;
u32 c = abs(a - b);

'c' will end up with a value of 0xffffffff instead of the expected 0x1.

A problem caused by this change and visible by the end user is that
framebuffer drivers relying on functions from modedb.c will fail to find
high resolution video modes similar to that explicitly requested by the
user if an exact match cannot be found (see e.g.

Fix this by special-casing `long' types within abs().

This patch reduces x86_64 code size a bit - drivers/video/uvesafb.o shrunk
by 15 bytes, presumably because it is doing abs() on 4-byte quantities,
and expanding those to 8-byte longs adds code.

testcase:

#define oldabs(x) ({ \
long __x = (x); \
(__x < 0) ? -__x : __x; \
})

#define newabs(x) ({ \
long ret; \
if (sizeof(x) == sizeof(long)) { \
long __x = (x); \
ret = (__x < 0) ? -__x : __x; \
} else { \
int __x = (x); \
ret = (__x < 0) ? -__x : __x; \
} \
ret; \
})

typedef unsigned int u32;

main()
{
u32 a = 0;
u32 b = 1;
u32 oldc = oldabs(a - b);
u32 newc = newabs(a - b);

printf("%u %u\n", oldc, newc);
}

akpm:/home/akpm> gcc t.c
akpm:/home/akpm> ./a.out
4294967295 1

Reported-by: Michal Januszewski <michalj@gmail.com>
Cc: Rolf Eike Beer <eike-kernel@sf-tec.de
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoset_rtc_mmss: show warning message only once
Stephen Hemminger [Thu, 13 Jan 2011 00:59:31 +0000 (16:59 -0800)]
set_rtc_mmss: show warning message only once

Occasionally the system gets into a state where the CMOS clock has gotten
slightly ahead of current time and the periodic update of RTC fails.  The
message is a nuisance and repeats spamming the log.

  See: http://www.ntp.org/ntpfaq/NTP-s-trbl-spec.htm#Q-LINUX-SET-RTC-MMSS

Rather than just removing the message, make it show only once and reduce
severity since it indicates a normal and non urgent condition.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokmsg_dump: add kmsg_dump() calls to the reboot, halt, poweroff and emergency_restart...
Seiji Aguchi [Thu, 13 Jan 2011 00:59:30 +0000 (16:59 -0800)]
kmsg_dump: add kmsg_dump() calls to the reboot, halt, poweroff and emergency_restart paths

We need to know the reason why system rebooted in support service.
However, we can't inform our customers of the reason because final
messages are lost on current Linux kernel.

This patch improves the situation above because the final messages are
saved by adding kmsg_dump() to reboot, halt, poweroff and
emergency_restart path.

Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Marco Stornelli <marco.stornelli@gmail.com>
Reviewed-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokmsg_dump: constrain mtdoops and ramoops to perform their actions only for KMSG_DUMP_...
Seiji Aguchi [Thu, 13 Jan 2011 00:59:29 +0000 (16:59 -0800)]
kmsg_dump: constrain mtdoops and ramoops to perform their actions only for KMSG_DUMP_PANIC

This series aims to develop logging facility for enterprise use.

It is important to save kernel messages reliably on enterprise system
because they are helpful for diagnosing system.

This series add kmsg_dump() to the paths loosing kernel messages.  The use
case is the following.

[Use case of reboot/poweroff/halt/emergency_restart]

 My company has often experienced the followings in our support service.
 - Customer's system suddenly reboots.
 - Customers ask us to investigate the reason of the reboot.

We recognize the fact itself because boot messages remain in
/var/log/messages.  However, we can't investigate the reason why the
system rebooted, because the last messages don't remain.  And off course
we can't explain the reason.

We can solve above problem with this patch as follows.

 Case1: reboot with command
   - We can see "Restarting system with command:" or ""Restarting system.".

 Case2: halt with command
   - We can see "System halted.".

 Case3: poweroff with command
   - We can see " Power down.".

 Case4: emergency_restart with sysrq.
   - We can see "Sysrq:" outputted in __handle_sysrq().

 Case5: emergency_restart with softdog.
   - We can see "Initiating system reboot" in watchdog_fire().

So, we can distinguish the reason of reboot, poweroff, halt and emergency_restart.

If customer executed reboot command, you may think the customer should
know the fact.  However, they often claim they don't execute the command
when they rebooted system by mistake.

No message remains on the current Linux kernel, so we can't show the proof
to the customer.  This patch improves this situation.

This patch:

Alters mtdoops and ramoops to perform their actions only for
KMSG_DUMP_PANIC, KMSG_DUMP_OOPS and KMSG_DUMP_KEXEC because they would
like to log crashes only.

Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Marco Stornelli <marco.stornelli@gmail.com>
Reviewed-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agouml: use simple_write_to_buffer()
Akinobu Mita [Thu, 13 Jan 2011 00:59:28 +0000 (16:59 -0800)]
uml: use simple_write_to_buffer()

Simplify write file operation for mmapper by using
simple_write_to_buffer().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agouml: mmapper_kern needs MODULE_LICENSE
Randy Dunlap [Thu, 13 Jan 2011 00:59:27 +0000 (16:59 -0800)]
uml: mmapper_kern needs MODULE_LICENSE

Add missing MODULE_LICENSE():

WARNING: modpost: missing MODULE_LICENSE() in arch/um/drivers/mmapper_kern.o

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Greg Lonnon <glonnon@ridgerun.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoarch/um/drivers/line.c: safely iterate over list of winch handlers
Will Newton [Thu, 13 Jan 2011 00:59:26 +0000 (16:59 -0800)]
arch/um/drivers/line.c: safely iterate over list of winch handlers

unregister_winch() should use list_for_each_safe(), as it can delete from
the list.

Signed-off-by: Will Newton <will.newton@gmail.com>
Cc: richard -rw- weinberger <richard.weinberger@gmail.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoum: mark CONFIG_HIGHMEM as broken
Richard Weinberger [Thu, 13 Jan 2011 00:59:25 +0000 (16:59 -0800)]
um: mark CONFIG_HIGHMEM as broken

Currently CONFIG_HIGHMEM is broken on User Mode Linux.  I'm not sure if it
worked ever.

It doesn't compile and this breaks randomconfig testing.

Signed-off-by: Richard Weinberger <richard@nod.at>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/video/backlight/l4f00242t03.c: fix reset sequence
Alberto Panizzo [Thu, 13 Jan 2011 00:59:24 +0000 (16:59 -0800)]
drivers/video/backlight/l4f00242t03.c: fix reset sequence

The reset command is part of the init sequence and it take effect
only if the lcd is powered.

The effect of the bug was that the sequence:
set lcd power_state to FB_BLANK_POWERDOWN
set lcd power_state to FB_BLANK_UNBLANK
Did not produced a complete reboot of the LCD which was showing fuzzy
colours.

This was not experienced before implementing correctly all the LCD power
states with the patch [1].  Since before the patch [1] the regulators were
not touched and the LCD shutdown was reached with a register write.  After
the patch [1] a complete boot sequence with an initial reset is needed for
the display every time the LCD is powered up.

drivers-video-backlight-l4f00242t03c-full-implement-fb-power-states-for-this-lcd.patch

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/video/backlight/l4f00242t03.c: prevent unbalanced calls to regulator enable...
Alberto Panizzo [Thu, 13 Jan 2011 00:59:23 +0000 (16:59 -0800)]
drivers/video/backlight/l4f00242t03.c: prevent unbalanced calls to regulator enable/disable

Otherwise a double call to:
$ echo 4 > /sys/class/lcd/l4f00242t03/lcd_power
Will, the first power down the lcd and regulators correctly and the
second produce an unbalanced call to regulator disable.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/video/backlight/l4f00242t03.c: full implement fb power states for this lcd
Alberto Panizzo [Thu, 13 Jan 2011 00:59:22 +0000 (16:59 -0800)]
drivers/video/backlight/l4f00242t03.c: full implement fb power states for this lcd

Complete the support of fb power states managing correctly the regulators
bound to this driver.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/video/backlight/l4f00242t03.c: make 1-bit signed field unsigned
Mariusz Kozlowski [Thu, 13 Jan 2011 00:59:21 +0000 (16:59 -0800)]
drivers/video/backlight/l4f00242t03.c: make 1-bit signed field unsigned

Fixes sparse warning:
drivers/video/backlight/l4f00242t03.c:28:21: error: dubious one-bit signed bitfield

Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoleds: add output inversion option to backlight trigger
Janusz Krzysztofik [Thu, 13 Jan 2011 00:59:20 +0000 (16:59 -0800)]
leds: add output inversion option to backlight trigger

Extend the LED backlight tirgger driver with an option that allows for
inverting the trigger output polarity.

With the invertion option provided, I (ab)use the backlight trigger for
driving a LED that indicates LCD display blank condtition on my Amstrad
Delta videophone.  Since the machine has no dedicated power LED, it was
not possible to distinguish if the display was blanked, or the machine was
turned off, without touching it.

The invert sysfs control is patterned after a similiar function of the GPIO
trigger driver.

[akpm@linux-foundation.org: make output match input, tighten input checking]
[akpm@linux-foundation.org: make output match input, tighten input checking]
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoleds-lp5521: modify the way of setting led device name
Arun Murthy [Thu, 13 Jan 2011 00:59:20 +0000 (16:59 -0800)]
leds-lp5521: modify the way of setting led device name

Currently the led device name is fetched from the device_type in
I2C_BOARD_INFO which comes from the platform data.  This name is in turn
used to create an entry in sysfs.

If there exists two or more lp5521 on a particular platform, the
device_type in I2C_BOARD_INFO has to be the same, else lp5521 driver probe
wont be called and if used so, results in run time warning "cannot create
sysfs with same name" and hence a failure.

The name that is used to create sysfs entry is to be passed by the struct
led_platform_data.  Hence adding an element of type const char * and
change in lp5521 driver to use this name in creating the led device if
present else use the name obtained by I2C_BOARD_INFO.

Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Acked-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoleds: lp5521: fix circular locking
Samu Onkalo [Thu, 13 Jan 2011 00:59:19 +0000 (16:59 -0800)]
leds: lp5521: fix circular locking

Driver contained possibility for circular locking.

One lock is held by sysfs-core and another one by the driver itself.  This
happened when the driver created or removed sysfs entries dynamically.
There is no real need to do those operations.  Now all the sysfs entries
are created at probe and removed at removal.  Engine load sysfs entries
are now visible all the time.  However, access to the entries fails if the
engine is disabled or running.

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-by: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoleds: lp5523: fix circular locking
Samu Onkalo [Thu, 13 Jan 2011 00:59:18 +0000 (16:59 -0800)]
leds: lp5523: fix circular locking

Driver contained possibility for circular locking.

One lock is held by sysfs-core and another one by the driver itself.  This
happened when the driver created or removed sysfs entries dynamically.
There is no real need to do those operations.  Now all the sysfs entries
are created at probe and removed at removal.  Engine load and mux
configuration sysfs entries are now visible all the time.  However, access
to the entries fails if the engine is disabled or running.

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-by: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoleds: leds-lp5523: modify the way of setting led device name
Samu Onkalo [Thu, 13 Jan 2011 00:59:17 +0000 (16:59 -0800)]
leds: leds-lp5523: modify the way of setting led device name

Currently all leds channels begins with string lp5523.  Patch adds a
possibility to provide name via platform data.  This makes it possible to
have several chips without overlapping sysfs names.

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Cc: Arun Murthy <arun.murthy@stericsson.com>
Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoleds: leds-pca9532 cleanups
Axel Lin [Thu, 13 Jan 2011 00:59:15 +0000 (16:59 -0800)]
leds: leds-pca9532 cleanups

- Remove unneeded input_free_device() after input_unregister_device().

- Add pca9532_destroy_devices() function for destroy devices.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/leds/leds-lp5521.c: fix potential buffer overflow
Vasiliy Kulikov [Thu, 13 Jan 2011 00:59:14 +0000 (16:59 -0800)]
drivers/leds/leds-lp5521.c: fix potential buffer overflow

The code doesn't check first sscanf() return value.  If first sscanf()
failed then c contains some garbage.  It might lead to reading
uninitialised stack data in the second sscanf() call.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofs/ext4/inode.c: use pr_warn_ratelimited()
Andrew Morton [Thu, 13 Jan 2011 00:59:13 +0000 (16:59 -0800)]
fs/ext4/inode.c: use pr_warn_ratelimited()

pr_warning_ratelimited() doesn't exist.

Also include printk.h, which defines these things.

Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofirewire: ohci: fix compilation on arches without PAGE_KERNEL_RO
Clemens Ladisch [Thu, 13 Jan 2011 09:12:17 +0000 (10:12 +0100)]
firewire: ohci: fix compilation on arches without PAGE_KERNEL_RO

PAGE_KERNEL_RO is not available on all architectures, so its use
in the new AR code broke compilation on sparc64.

Because the read-only mapping was just a debugging aid, just use
PAGE_KERNEL instead.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
James Bottomley wrote:
> On Thu, 2011-01-13 at 08:27 +0100, Clemens Ladisch wrote:
>> firewire: ohci: fix compilation on arches without PAGE_KERNEL_RO, e.g. sparc
>>
>> PAGE_KERNEL_RO is not available on all architectures, so its use in the
>> new AR code broke compilation on sparc64.
>>
>> Because the R/O mapping is only used to catch drivers that try to write
>> to the reception buffer and not actually required for correct operation,
>> we can just use a normal PAGE_KERNEL mapping where _RO is not available.
[...]
>> +/*
>> + * For archs where PAGE_KERNEL_RO is not supported;
>> + * mapping the AR buffers readonly for the CPU is just a debugging aid.
>> + */
>> +#ifndef PAGE_KERNEL_RO
>> +#define PAGE_KERNEL_RO PAGE_KERNEL
>> +#endif
>
> This might cause interesting issues on sparc64 if it ever acquired a
> PAGE_KERNEL_RO.  Sparc64 has extern pgprot_t for it's PAGE_KERNEL types
> rather than #defines, so the #ifdef check wouldn't see this.
>
> I think either PAGE_PROT_RO becomes part of our arch API (so all
> architectures are forced to add it), or, if it's not part of the API,
> ohci isn't entitled to use it.  The latter seems simplest since you have
> no real use for write protection anyway.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
13 years agoMerge branch 'for-2.6.38/event-handling' into for-2.6.38/core
Jens Axboe [Thu, 13 Jan 2011 13:47:54 +0000 (14:47 +0100)]
Merge branch 'for-2.6.38/event-handling' into for-2.6.38/core

13 years agoMerge branch 'sh/alphaproject' into sh-latest
Paul Mundt [Thu, 13 Jan 2011 09:38:28 +0000 (18:38 +0900)]
Merge branch 'sh/alphaproject' into sh-latest

13 years agosh: Add support for AP-SH4AD-0A board.
Paul Mundt [Thu, 13 Jan 2011 09:36:21 +0000 (18:36 +0900)]
sh: Add support for AP-SH4AD-0A board.

This adds preliminary support for the alpha project AP-SH4AD-0A reference
platform (SH7786 based).

Additional platform information available at:

http://www.apnet.co.jp/product/superh/ap-sh4ad-0a.html

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosh: Add support for AP-SH4A-3A board.
Paul Mundt [Thu, 13 Jan 2011 09:32:42 +0000 (18:32 +0900)]
sh: Add support for AP-SH4A-3A board.

This adds preliminary support for the alpha project AP-SH4A-3A reference
platform (SH7785 based).

Additional paltform information available at:

http://www.apnet.co.jp/product/superh/ap-sh4a-3a.html

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosh: Add a new mach type for alpha project boards.
Paul Mundt [Thu, 13 Jan 2011 09:31:25 +0000 (18:31 +0900)]
sh: Add a new mach type for alpha project boards.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Thu, 13 Jan 2011 07:37:24 +0000 (08:37 +0100)]
Merge branch 'topic/asoc' into for-linus

13 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Thu, 13 Jan 2011 07:37:19 +0000 (08:37 +0100)]
Merge branch 'topic/hda' into for-linus

13 years agoMerge branch 'topic/misc' into for-linus
Takashi Iwai [Thu, 13 Jan 2011 07:37:14 +0000 (08:37 +0100)]
Merge branch 'topic/misc' into for-linus

13 years agoALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection
Takashi Iwai [Thu, 13 Jan 2011 07:08:08 +0000 (08:08 +0100)]
ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection

When only one mic is available and it's an analog mic, the current
IDT/STAC parser may give an Oops.

Reference: bko#25692
https://bugzilla.kernel.org/show_bug.cgi?id=25692

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
13 years agoserial: sh-sci: build fixes.
Paul Mundt [Thu, 13 Jan 2011 06:46:35 +0000 (15:46 +0900)]
serial: sh-sci: build fixes.

This fixes up the port_rx_irq_mask() REIE flag definition as well as a
debug printk blowing up on the SCSCR_INIT having gone away.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: Kill off unused !gpio_is_valid() case
Magnus Damm [Wed, 12 Jan 2011 10:43:07 +0000 (10:43 +0000)]
ARM: mach-shmobile: Kill off unused !gpio_is_valid() case

The Card Detect GPIOs used on AP4EVB and Mackerel are
alwayws valid, so kill off the unused !gpio_is_valid()
case.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'common/serial-rework' into sh-latest
Paul Mundt [Thu, 13 Jan 2011 06:21:27 +0000 (15:21 +0900)]
Merge branch 'common/serial-rework' into sh-latest

13 years agosh: sh7372 SH4AL-DSP probe support
Magnus Damm [Wed, 12 Jan 2011 10:54:21 +0000 (10:54 +0000)]
sh: sh7372 SH4AL-DSP probe support

Add probe support for the sh7372 SH4AL-DSP core.

The most common use case for this is when the system
boots from the ARM core in the sh7372 and uses the
SH core for application offload as a slave CPU.

May also be used to boot the sh7372 from the SH core.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux...
Paul Mundt [Thu, 13 Jan 2011 06:06:28 +0000 (15:06 +0900)]
Merge branch 'master' of /linux/kernel/git/torvalds/linux-2.6 into common/serial-rework

Conflicts:
arch/sh/kernel/cpu/sh2/setup-sh7619.c
arch/sh/kernel/cpu/sh2a/setup-mxg.c
arch/sh/kernel/cpu/sh2a/setup-sh7201.c
arch/sh/kernel/cpu/sh2a/setup-sh7203.c
arch/sh/kernel/cpu/sh2a/setup-sh7206.c
arch/sh/kernel/cpu/sh3/setup-sh7705.c
arch/sh/kernel/cpu/sh3/setup-sh770x.c
arch/sh/kernel/cpu/sh3/setup-sh7710.c
arch/sh/kernel/cpu/sh3/setup-sh7720.c
arch/sh/kernel/cpu/sh4/setup-sh4-202.c
arch/sh/kernel/cpu/sh4/setup-sh7750.c
arch/sh/kernel/cpu/sh4/setup-sh7760.c
arch/sh/kernel/cpu/sh4a/setup-sh7343.c
arch/sh/kernel/cpu/sh4a/setup-sh7366.c
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
arch/sh/kernel/cpu/sh4a/setup-sh7763.c
arch/sh/kernel/cpu/sh4a/setup-sh7770.c
arch/sh/kernel/cpu/sh4a/setup-sh7780.c
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
arch/sh/kernel/cpu/sh4a/setup-shx3.c
arch/sh/kernel/cpu/sh5/setup-sh5.c
drivers/serial/sh-sci.c
drivers/serial/sh-sci.h
include/linux/serial_sci.h

13 years agovideo: move SH_MIPI_DSI/SH_LCD_MIPI_DSI to the top of menu
Dmitry Eremin-Solenikov [Wed, 12 Jan 2011 15:19:35 +0000 (15:19 +0000)]
video: move SH_MIPI_DSI/SH_LCD_MIPI_DSI to the top of menu

Kconfig entries SH_MIPI_DSI and SH_LCD_MIPI_DSI while being invisible to
the user, broke the FrameBuffer menu (at least in menuconfig), as they
aren't depending on respective menuconfig item (FB). In result several
items got moved to the main "Graphics support" menu. Move these two
problematic items to the top of drivers/video/Kbuild to restore nice
display of FB menu.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agofbdev: Implement simple blanking in pseudocolor modes for vt8500lcdfb
Alexey Charkov [Wed, 12 Jan 2011 22:14:44 +0000 (22:14 +0000)]
fbdev: Implement simple blanking in pseudocolor modes for vt8500lcdfb

Implement simple blanking in pseudocolor modes for vt8500lcdfb

This follows the style of some other in-tree drivers by just setting
the hardware palette colors to all black. True Color modes are not
affected, but this at least allows to run xf86-video-fbdev without
errors due to blanking being unimplemented.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agofs: add documentation on fallocate hole punching
Josef Bacik [Wed, 5 Jan 2011 20:00:07 +0000 (15:00 -0500)]
fs: add documentation on fallocate hole punching

This patch simply adds documentation on how to handle the hole punching mode of
fallocate for any filesystem wishing to use it.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoGfs2: fail if we try to use hole punch
Josef Bacik [Thu, 18 Nov 2010 01:46:20 +0000 (20:46 -0500)]
Gfs2: fail if we try to use hole punch

Gfs2 doesn't have the ability to punch holes yet, so make sure we return
EOPNOTSUPP if we try to use hole punching through fallocate.  This support can
be added later.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoBtrfs: fail if we try to use hole punch
Josef Bacik [Thu, 18 Nov 2010 01:46:19 +0000 (20:46 -0500)]
Btrfs: fail if we try to use hole punch

Btrfs doesn't have the ability to punch holes yet, so make sure we return
EOPNOTSUPP if we try to use hole punching through fallocate.  This support can
be added later.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoExt4: fail if we try to use hole punch
Josef Bacik [Thu, 18 Nov 2010 01:46:18 +0000 (20:46 -0500)]
Ext4: fail if we try to use hole punch

Ext4 doesn't have the ability to punch holes yet, so make sure we return
EOPNOTSUPP if we try to use hole punching through fallocate.  This support can
be added later.  Thanks,

Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoOcfs2: handle hole punching via fallocate properly
Josef Bacik [Thu, 18 Nov 2010 01:46:17 +0000 (20:46 -0500)]
Ocfs2: handle hole punching via fallocate properly

This patch just makes ocfs2 use its UNRESERVP ioctl when we get the hole punch
flag in fallocate.  I didn't test it, but it seems simple enough.  Thanks,

Acked-by: Jan Kara <jack@suse.cz>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoXFS: handle hole punching via fallocate properly
Josef Bacik [Thu, 18 Nov 2010 01:46:16 +0000 (20:46 -0500)]
XFS: handle hole punching via fallocate properly

This patch simply allows XFS to handle the hole punching flag in fallocate
properly.  I've tested this with a little program that does a bunch of random
hole punching with FL_KEEP_SIZE and without it to make sure it does the right
thing.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: add hole punching to fallocate
Josef Bacik [Thu, 18 Nov 2010 01:46:15 +0000 (20:46 -0500)]
fs: add hole punching to fallocate

Hole punching has already been implemented by XFS and OCFS2, and has the
potential to be implemented on both BTRFS and EXT4 so we need a generic way to
get to this feature.  The simplest way in my mind is to add FALLOC_FL_PUNCH_HOLE
to fallocate() since it already looks like the normal fallocate() operation.
I've tested this patch with XFS and BTRFS to make sure XFS did what it's
supposed to do and that BTRFS failed like it was supposed to.  Thank you,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agovfs: pass struct file to do_truncate on O_TRUNC opens (try #2)
Jeff Layton [Tue, 7 Dec 2010 21:19:50 +0000 (16:19 -0500)]
vfs: pass struct file to do_truncate on O_TRUNC opens (try #2)

When a file is opened with O_TRUNC, the truncate processing is handled
by handle_truncate(). This function however doesn't receive any info
about the newly instantiated filp, and therefore can't pass that info
along so that the setattr can use it.

This makes NFSv4 misbehave. The client does an open and gets a valid
stateid, and then doesn't use that stateid on the subsequent truncate.
It uses the zero-stateid instead. Most servers ignore this fact and
just do the truncate anyway, but some don't like it (notably, RHEL4).

It seems more correct that since we have a fully instantiated file at
the time that handle_truncate is called, that we pass that along so
that the truncate operation can properly use it.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofix signedness mess in rw_verify_area() on 64bit architectures
Al Viro [Fri, 17 Dec 2010 12:44:05 +0000 (07:44 -0500)]
fix signedness mess in rw_verify_area() on 64bit architectures

... and clean the unsigned-f_pos code, while we are at it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: fix kernel-doc for dcache::prepend_path
Randy Dunlap [Thu, 18 Nov 2010 23:02:49 +0000 (15:02 -0800)]
fs: fix kernel-doc for dcache::prepend_path

Fix function kernel-doc warning for prepend_path():

Warning(fs/dcache.c:1924): missing initial short description on line:

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agofs: fix kernel-doc for dcache::d_validate
Randy Dunlap [Thu, 18 Nov 2010 23:02:45 +0000 (15:02 -0800)]
fs: fix kernel-doc for dcache::d_validate

Fix function parameter kernel-doc for d_validate():

Warning(fs/dcache.c:1495): No description found for parameter 'parent'
Warning(fs/dcache.c:1495): Excess function parameter 'dparent' description in 'd_validate'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agosanitize ecryptfs ->mount()
Al Viro [Thu, 13 Jan 2011 01:04:37 +0000 (20:04 -0500)]
sanitize ecryptfs ->mount()

kill ecryptfs_read_super(), reorder code allowing to use
normal d_alloc_root() instead of opencoding it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agoswitch afs
Al Viro [Thu, 13 Jan 2011 01:04:20 +0000 (20:04 -0500)]
switch afs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 years agomove internal-only parts of ncpfs headers to fs/ncpfs
Al Viro [Wed, 12 Jan 2011 22:37:47 +0000 (17:37 -0500)]
move internal-only parts of ncpfs headers to fs/ncpfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>