]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agofs/fat: fix a checkpatch issue in namei_msdos.c
Cruz Julian Bishop [Fri, 21 Sep 2012 01:02:22 +0000 (11:02 +1000)]
fs/fat: fix a checkpatch issue in namei_msdos.c

Add a space before an equals sign/operator in line 410.

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofat (exportfs): fix dentry reconnection
Steven J. Magnani [Fri, 21 Sep 2012 01:02:22 +0000 (11:02 +1000)]
fat (exportfs): fix dentry reconnection

Maintain an index of directory inodes by starting cluster, so that
fat_get_parent() can return the proper cached inode rather than inventing
one that cannot be traced back to the filesystem root.

Add a new msdos/vfat binary mount option "nfs" so that FAT filesystems
that are _not_ exported via NFS are not saddled with maintenance of an
index they will never use.

Finally, simplify NFS file handle generation and lookups.  An
ext2-congruent implementation is adequate for FAT needs.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofat (exportfs): move NFS support code
Steven J. Magnani [Fri, 21 Sep 2012 01:02:21 +0000 (11:02 +1000)]
fat (exportfs): move NFS support code

Under memory pressure, the system may evict dentries from cache.  When the
FAT driver receives a NFS request involving an evicted dentry, it is
unable to reconnect it to the filesystem root.  This causes the request to
fail, often with ENOENT.

This is partially due to ineffectiveness of the current FAT NFS
implementation, and partially due to an unimplemented fh_to_parent method.
 The latter can cause file accesses to fail on shares exported with
subtree_check.

This patch set provides the FAT driver with the ability to
reconnect dentries.  NFS file handle generation and lookups are simplified
and made congruent with ext2.

Testing has involved a memory-starved virtual machine running 3.5-rc5 that
exports a ~2 GB vfat filesystem containing a kernel tree (~770 MB, ~40000
files, 9 levels).  Both 'cp -r' and 'ls -lR' operations were performed
from a client, some overlapping, some consecutive.  Exports with
'subtree_check' and 'no_subtree_check' have been tested.

Note that while this patch set improves FAT's NFS support, it does not
eliminate ESTALE errors completely.

The following should be considered for NFS clients who are sensitive to ESTALE:

* Mounting with lookupcache=none
  Unfortunately this can degrade performance severely, particularly for deep
  filesystems.

* Incorporating VFS patches to retry ESTALE failures on the client-side,
  such as https://lkml.org/lkml/2012/6/29/381

* Handling ESTALE errors in client application code

This patch:

Move NFS-related code into its own C file.  No functional changes.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofat: use accessor function for msdos_dir_entry 'start'
Namjae Jeon [Fri, 21 Sep 2012 01:02:21 +0000 (11:02 +1000)]
fat: use accessor function for msdos_dir_entry 'start'

Use accessor function for msdos_dir_entry 'start'

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-s3c.c: fix return value in s3c_rtc_probe()
Sachin Kamat [Fri, 21 Sep 2012 01:02:21 +0000 (11:02 +1000)]
drivers/rtc/rtc-s3c.c: fix return value in s3c_rtc_probe()

Return the value returned by platform_get_irq() instead of -ENOENT;

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc_sysfs_show_hctosys-return-0-if-resume-failed-fix-fix
Stephen Rothwell [Fri, 21 Sep 2012 01:02:20 +0000 (11:02 +1000)]
rtc_sysfs_show_hctosys-return-0-if-resume-failed-fix-fix

drivers/rtc/class.c: In function 'rtc_init':
drivers/rtc/class.c:261:23: error: 'rtc_suspend' undeclared (first use in t=
his function)
drivers/rtc/class.c:261:23: note: each undeclared identifier is reported on=
ly once for each function it appears in
drivers/rtc/class.c:262:22: error: 'rtc_resume' undeclared (first use in th=
is function)

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: David Fries <David@Fries.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc_sysfs_show_hctosys-return-0-if-resume-failed-fix
David Fries [Fri, 21 Sep 2012 01:02:20 +0000 (11:02 +1000)]
rtc_sysfs_show_hctosys-return-0-if-resume-failed-fix

fix build

Signed-off-by: David Fries <David@Fries.net>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc_sysfs_show_hctosys(): display 0 if resume failed
David Fries [Fri, 21 Sep 2012 01:02:20 +0000 (11:02 +1000)]
rtc_sysfs_show_hctosys(): display 0 if resume failed

Without this patch /sys/class/rtc/$CONFIG_RTC_HCTOSYS_DEVICE/hctosys
contains a 1 (meaning "This rtc was used to initialize the system
clock") even if setting the time by do_settimeofday() at bootup failed.
The RTC can also be used to set the clock on resume, if it did 1,
otherwise 0.  Previously there was no indication if the RTC was used
to set the clock in resume.

This uses only CONFIG_RTC_HCTOSYS_DEVICE for conditional compilation
instead of it and CONFIG_RTC_HCTOSYS to be more consistent.
rtc_hctosys_ret was moved to class.c so class.c no longer depends on
hctosys.c.

Signed-off-by: David Fries <David@Fries.net>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: rtc-mxc: convert to module_platform_driver
Fabio Estevam [Fri, 21 Sep 2012 01:02:20 +0000 (11:02 +1000)]
rtc: rtc-mxc: convert to module_platform_driver

Converting to module_platform_driver can make the code smaller and cleaner.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: rtc-mxc: adapt to the new i.mx clock framework
Fabio Estevam [Fri, 21 Sep 2012 01:02:19 +0000 (11:02 +1000)]
rtc: rtc-mxc: adapt to the new i.mx clock framework

i.mx drivers should use clk_prepare_enable/clk_disable_unprepare() in
order to avoid clk warnings.

While at it, convert to devm_clk_get() since other devm_ functions are
used in this driver and it can also save some clk_put() calls.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-coh901331.c: use clk_prepare_enable() and clk_disable_unprepare()
Julia Lawall [Fri, 21 Sep 2012 01:02:19 +0000 (11:02 +1000)]
drivers/rtc/rtc-coh901331.c: use clk_prepare_enable() and clk_disable_unprepare()

clk_prepare_enable and clk_disable_unprepare combine clk_prepare and
clk_enable, and clk_disable and clk_unprepare.  They make the code more
concise, and ensure that clk_unprepare is called when clk_enable fails.

A simplified version of the semantic patch that introduces calls to these
functions is as follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
@@

- clk_prepare(e);
- clk_enable(e);
+ clk_prepare_enable(e);

@@
expression e;
@@

- clk_disable(e);
- clk_unprepare(e);
+ clk_disable_unprepare(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: rc5t583: add ricoh rc5t583 RTC driver
Venu Byravarasu [Fri, 21 Sep 2012 01:02:19 +0000 (11:02 +1000)]
rtc: rc5t583: add ricoh rc5t583 RTC driver

Add an RTC driver for the RTC device on Ricoh MFD Rc5t583.  Ricoh RTC has
3 types of alarms.  The current patch adds support for the Y-Alarm of
RC5t583 RTC.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-spear.c: fix several error checks
Lars-Peter Clausen [Fri, 21 Sep 2012 01:02:18 +0000 (11:02 +1000)]
drivers/rtc/rtc-spear.c: fix several error checks

There are several comparisons of a unsigned int to less than zero int
spear RTC driver.  Such a check will always be true.  In all these cases a
signed int is assigned to the unsigned variable, which is checked, before.
 So the right fix is to make the checked variable signed as well.  In one
case the check can be dropped completely, because all it does it returns
'err' if 'err' is less than zero, otherwise it returns 0.  Since in this
particular case 'err' is always either 0 or less this is the same as just
returning 'err'.

The issue has been found using the following coccinelle semantic patch:

//<smpl>
@@
type T;
unsigned T i;
@@
(
*i < 0
|
*i >= 0
)
//</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Viresh Kumar <viresh.kumar@st.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-jz4740.c: fix IRQ error check
Lars-Peter Clausen [Fri, 21 Sep 2012 01:02:18 +0000 (11:02 +1000)]
drivers/rtc/rtc-jz4740.c: fix IRQ error check

The irq field of the jz4740_irc struct is unsigned.  Yet we assign the
result of platform_get_irq() to it.  platform_get_irq() may return a
negative error code and the code checks for this condition by checking if
'irq' is less than zero.  But since 'irq' is unsigned this test will
always be false.  Fix it by making 'irq' signed.

The issue was found using the following coccinelle semantic patch:

//<smpl>
@@
type T;
unsigned T i;
@@
(
*i < 0
|
*i >= 0
)
//</smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: kconfig: remove unnecessary dependencies.
Venu Byravarasu [Fri, 21 Sep 2012 01:02:18 +0000 (11:02 +1000)]
rtc: kconfig: remove unnecessary dependencies.

Remove "depends on RTC_CLASS = y" for multiple Kconfig definitions, as all
of them are already placed under "if RTC_CLASS".

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: add MAX8907 RTC driver
Stephen Warren [Fri, 21 Sep 2012 01:02:17 +0000 (11:02 +1000)]
rtc: add MAX8907 RTC driver

The MAX8907 is an I2C-based power-management IC containing voltage
regulators, a reset controller, a real-time clock, and a touch-screen
controller.

The driver is based on an original by or fixed by:
* Tom Cherry
* Prashant Gaikwad
* Joseph Yoon

During upstreaming, I (swarren):
* Converted to regmap.
* Fixed handling of RTC_HOUR register containing 12.
* Fixed handling of RTC_WEEKDAY register.
* General cleanup.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: Tom Cherry <tcherry@nvidia.com>
Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
Cc: Joseph Yoon <tyoon@nvidia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: tps65910: change RTC driver name as per mfd
Venu Byravarasu [Fri, 21 Sep 2012 01:02:17 +0000 (11:02 +1000)]
rtc: tps65910: change RTC driver name as per mfd

As TPS65910 mfd uses "tps65910-rtc" as driver name, change the
driver name in the RTC driver to match with the same.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: tps65910: add RTC driver for TPS65910 PMIC RTC
Venu Byravarasu [Fri, 21 Sep 2012 01:02:17 +0000 (11:02 +1000)]
rtc: tps65910: add RTC driver for TPS65910 PMIC RTC

TPS65910 PMIC is a MFD with RTC as one of the device.  Adding RTC driver
for supporting RTC device present inside TPS65910 PMIC.

Only support for RTC alarm is implemented as part of this patch.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-at91sam9.c: use module_platform_driver() macro
Devendra Naga [Fri, 21 Sep 2012 01:02:16 +0000 (11:02 +1000)]
drivers/rtc/rtc-at91sam9.c: use module_platform_driver() macro

This driver does seems to do only platform_driver_register in the init
function and platform_driver_unregister in the exit function,

so replace all this code including the module_init and module_exit with
module_platform_driver macro...

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: recycle id when unloading a rtc driver
Vincent Palatin [Fri, 21 Sep 2012 01:02:16 +0000 (11:02 +1000)]
rtc: recycle id when unloading a rtc driver

When calling rtc_device_unregister, we are not freeing the id used by the
driver.  So when doing a unload/load cycle for a RTC driver (e.g.  rmmod
rtc_cmos && modprobe rtc_cmos), its id is incremented by one.  As a
consequence, we no longer have neither an rtc0 driver nor a
/proc/driver/rtc (as it only exists for the first driver).

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: snvs: change timeout to use a fixed number of loop
Shawn Guo [Fri, 21 Sep 2012 01:02:16 +0000 (11:02 +1000)]
rtc: snvs: change timeout to use a fixed number of loop

Andrew Morton <akpm@linux-foundation.org> wrote:

> The timeout code here is fragile.  If acquiring the spinlock takes more
> than a millisecond or if this thread gets interrupted or preempted then
> we could easily execute that loop just a single time, and fail.
>
> It would be better to retry a fixed number of times, say 1000?  That
> would take around 1 millisecond, but might be overkill.

Take Andrew's suggestion to change the timeout code to retry 1000
times.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: snvs: add Freescale rtc-snvs driver
Shawn Guo [Fri, 21 Sep 2012 01:02:16 +0000 (11:02 +1000)]
rtc: snvs: add Freescale rtc-snvs driver

Add an RTC driver for Freescale Secure Non-Volatile Storage (SNVS)
Low Power (LP) RTC.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-add-dallas-ds2404-driver-fix
Andrew Morton [Fri, 21 Sep 2012 01:02:15 +0000 (11:02 +1000)]
rtc-add-dallas-ds2404-driver-fix

drivers/rtc/rtc-ds2404.c:23:1: warning: "DEBUG" redefined <command-line>:
warning: this is the location of the previous definition

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: add Dallas DS2404 driver
Sven Schnelle [Fri, 21 Sep 2012 01:02:15 +0000 (11:02 +1000)]
rtc: add Dallas DS2404 driver

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-proc: permit the /proc/driver/rtc device to use other devices
Kim, Milo [Fri, 21 Sep 2012 01:02:15 +0000 (11:02 +1000)]
rtc-proc: permit the /proc/driver/rtc device to use other devices

To get time information via /proc/driver/rtc, only the first device (rtc0)
is used.  If the rtcN (eg.  rtc1 or rtc2) is used for the system clock,
there is no way to get information of rtcN via /proc/driver/rtc.  With
this patch, the time data can be retrieved from the system clock RTC.

If the RTC_HCTOSYS_DEVICE is not defined, then rtc0 is used by default.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-isl1208.c: add support for the ISL1218
Ben Gardner [Fri, 21 Sep 2012 01:02:14 +0000 (11:02 +1000)]
drivers/rtc/rtc-isl1208.c: add support for the ISL1218

The ISL1218 chip is identical to the ISL1208, except that it has 6
additional user-storage registers.  This patch does not enable access to
those additional registers, but only adds the chip name to the list.

Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoepoll: support for disabling items, and a self-test app
Paton J. Lewis [Fri, 21 Sep 2012 01:02:14 +0000 (11:02 +1000)]
epoll: support for disabling items, and a self-test app

Enhanced epoll_ctl to support EPOLL_CTL_DISABLE, which disables an epoll
item.  If epoll_ctl doesn't return -EBUSY in this case, it is then safe to
delete the epoll item in a multi-threaded environment.  Also added a new
test_epoll self- test app to both demonstrate the need for this feature
and test it.

Signed-off-by: Paton J. Lewis <palewis@adobe.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Paul Holland <pholland@adobe.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoCodingStyle: add networking specific block comment style
Joe Perches [Fri, 21 Sep 2012 01:02:14 +0000 (11:02 +1000)]
CodingStyle: add networking specific block comment style

The block comment style in net/ and drivers/net is non-standard.
Document it.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Allan, Bruce W" <bruce.w.allan@intel.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: check networking specific block comment style
Joe Perches [Fri, 21 Sep 2012 01:02:13 +0000 (11:02 +1000)]
checkpatch: check networking specific block comment style

In an effort to get fewer checkpatch reviewer corrections, add a
networking specific style test for the preferred networking comment style.

/* The preferred style for block comments in
 * drivers/net/... and net/... is like this
 */

These tests are only used in net/ and drivers/net/

Tested with:

$ cat drivers/net/t.c

/* foo */

/*
 * foo
 */

/* foo
 */

/* foo
 * bar */
$ ./scripts/checkpatch.pl -f drivers/net/t.c
WARNING: networking block comments don't use an empty /* line, use /* Comment...
#4: FILE: net/t.c:4:
+
+/*

WARNING: networking block comments put the trailing */ on a separate line
#12: FILE: net/t.c:12:
+ * bar */

total: 0 errors, 2 warnings, 12 lines checked

Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Allan, Bruce W" <bruce.w.allan@intel.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: update suggested printk conversions
Joe Perches [Fri, 21 Sep 2012 01:02:13 +0000 (11:02 +1000)]
checkpatch: update suggested printk conversions

Direct conversion of printk(KERN_<LEVEL>...  to pr_<level> isn't the
preferred conversion when a struct net_device or struct device is
available.

Hint that using netdev_<level> or dev_<level> is preferred to using
pr_<level>.  Add netdev_dbg and dev_dbg variants too.

Miscellaneous whitespace neatening of a misplaced close brace.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: check utf-8 content from a commit log when it's missing from charset
Pasi Savanainen [Fri, 21 Sep 2012 01:02:13 +0000 (11:02 +1000)]
checkpatch: check utf-8 content from a commit log when it's missing from charset

Check that a commit log doesn't contain UTF-8 when a mail header
explicitly defines a different charset, like

'Content-Type: text/plain; charset="us-ascii"'

Signed-off-by: Pasi Savanainen <pasi.savanainen@nixu.com>
Cc: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers-firmware-dmi_scanc-fetch-dmi-version-from-smbios-if-it-exists-checkpatch...
Andrew Morton [Fri, 21 Sep 2012 01:02:12 +0000 (11:02 +1000)]
drivers-firmware-dmi_scanc-fetch-dmi-version-from-smbios-if-it-exists-checkpatch-fixes

WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
#56: FILE: drivers/firmware/dmi_scan.c:426:
+ printk(KERN_INFO "SMBIOS %d.%d present.\n",

WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
#61: FILE: drivers/firmware/dmi_scan.c:431:
+ printk(KERN_INFO "Legacy DMI %d.%d present.\n",

WARNING: Prefer pr_debug(... to printk(KERN_DEBUG, ...
#85: FILE: drivers/firmware/dmi_scan.c:455:
+ printk(KERN_DEBUG "SMBIOS version fixup(2.%d->2.%d)\n",

WARNING: Prefer pr_debug(... to printk(KERN_DEBUG, ...
#90: FILE: drivers/firmware/dmi_scan.c:460:
+ printk(KERN_DEBUG "SMBIOS version fixup(2.%d->2.%d)\n",

total: 0 errors, 4 warnings, 104 lines checked

./patches/drivers-firmware-dmi_scanc-fetch-dmi-version-from-smbios-if-it-exists.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Feng Jin <joe.jin@oracle.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists
Zhenzhong Duan [Fri, 21 Sep 2012 01:02:12 +0000 (11:02 +1000)]
drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists

The right dmi version is in SMBIOS if it's zero in DMI region

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: Feng Jin <joe.jin@oracle.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers-firmware-dmi_scanc-check-dmi-version-when-get-system-uuid-fix
Andrew Morton [Fri, 21 Sep 2012 01:02:12 +0000 (11:02 +1000)]
drivers-firmware-dmi_scanc-check-dmi-version-when-get-system-uuid-fix

tweak code comment

Cc: Feng Jin <joe.jin@oracle.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/firmware/dmi_scan.c: check dmi version when get system uuid
Zhenzhong Duan [Fri, 21 Sep 2012 01:02:11 +0000 (11:02 +1000)]
drivers/firmware/dmi_scan.c: check dmi version when get system uuid

As of version 2.6 of the SMBIOS specification, the first 3
fields of the UUID are supposed to be little-endian encoded.

Also a minor fix to match variable meaning and mute checkpatch.pl

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: Feng Jin <joe.jin@oracle.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocompat: fs: generic compat_sys_sendfile() implementation
Catalin Marinas [Fri, 21 Sep 2012 01:02:11 +0000 (11:02 +1000)]
compat: fs: generic compat_sys_sendfile() implementation

This function is used by sparc, powerpc and arm64 for compat support.  The
patch adds a generic implementation which calls do_sendfile() directly and
avoids set_fs().

The sparc architecture has wrappers for the sign extensions while powerpc
relies on the compiler to do the this.  The patch adds wrappers for
powerpc to handle the u32->int type conversion.

compat_sys_sendfile64() can be replaced by a sys_sendfile() call since
compat_loff_t has the same size as off_t on a 64-bit system.

On powerpc, the patch also changes the 64-bit sendfile call from
sys_sendile64 to sys_sendfile.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocompat_ioctl: Remove unused local typedef
Andi Kleen [Fri, 21 Sep 2012 01:02:11 +0000 (11:02 +1000)]
compat_ioctl: Remove unused local typedef

gcc 4.8 always warns

fs/compat_ioctl.c: In function 'serial_struct_ioctl':
fs/compat_ioctl.c:609:38: warning: typedef 'SS' locally defined but not used [-Wunused-local-typedefs]
         typedef struct serial_struct SS;

Indeed that typedef is unused, so just remove it.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoscatterlist: atomic sg_mapping_iter() no longer needs disabled IRQs
Tejun Heo [Fri, 21 Sep 2012 01:02:10 +0000 (11:02 +1000)]
scatterlist: atomic sg_mapping_iter() no longer needs disabled IRQs

SG mapping iterator w/ SG_MITER_ATOMIC set required IRQ disabled because
it originally used KM_BIO_SRC_IRQ to allow use from IRQ handlers.
kmap_atomic() has long been updated to handle stacking atomic mapping
requests on per-cpu basis and only requires not sleeping while mapped.

Update sg_mapping_iter such that atomic iterators only require disabling
preemption instead of disabling IRQ.

While at it, convert wte weird @ARG@ notations to @ARG in the comment of
sg_miter_start().

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/plist.c: make plist test announcements KERN_DEBUG
Borislav Petkov [Fri, 21 Sep 2012 01:02:10 +0000 (11:02 +1000)]
lib/plist.c: make plist test announcements KERN_DEBUG

They show up in dmesg

[    4.041094] start plist test
[    4.045804] end plist test

without a lot of meaning so hide them behind debug loglevel.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/vsprintf.c: improve standard conformance of sscanf()
Jan Beulich [Fri, 21 Sep 2012 01:02:10 +0000 (11:02 +1000)]
lib/vsprintf.c: improve standard conformance of sscanf()

Xen's pciback points out a couple of deficiencies with vsscanf()'s
standard conformance:

- Trailing character matching cannot be checked by the caller: With a
  format string of "(%x:%x.%x) %n" absence of the closing parenthesis
  cannot be checked, as input of "(00:00.0)" doesn't cause the %n to be
  evaluated (because of the code not skipping white space before the
  trailing %n).

- The parameter corresponding to a trailing %n could get filled even if
  there was a matching error: With a format string of "(%x:%x.%x)%n",
  input of "(00:00.0]" would still fill the respective variable pointed to
  (and hence again make the mismatch non-detectable by the caller).

This patch aims at fixing those, but leaves other non-conforming aspects
of it untouched, among them these possibly relevant ones:

- improper handling of the assignment suppression character '*' (blindly
  discarding all succeeding non-white space from the format and input
  strings),

- not honoring conversion specifiers for %n, - not recognizing the C99
  conversion specifier 't' (recognized by vsprintf()).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib-spinlock_debug-avoid-livelock-in-do_raw_spin_lock-fix
Andrew Morton [Fri, 21 Sep 2012 01:02:09 +0000 (11:02 +1000)]
lib-spinlock_debug-avoid-livelock-in-do_raw_spin_lock-fix

tweak comment

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/spinlock_debug: avoid livelock in do_raw_spin_lock()
Vikram Mulukutla [Fri, 21 Sep 2012 01:02:09 +0000 (11:02 +1000)]
lib/spinlock_debug: avoid livelock in do_raw_spin_lock()

The logic in do_raw_spin_lock() attempts to acquire a spinlock by invoking
arch_spin_trylock() in a loop with a delay between each attempt.  Now
consider the following situation in a 2 CPU system:

1. CPU-0 continually acquires and releases a spinlock in a
   tight loop; it stays in this loop until some condition X
   is satisfied. X can only be satisfied by another CPU.

2. CPU-1 tries to acquire the same spinlock, in an attempt
   to satisfy the aforementioned condition X. However, it
   never sees the unlocked value of the lock because the
   debug spinlock code uses trylock instead of just lock;
   it checks at all the wrong moments - whenever CPU-0 has
   locked the lock.

Now in the absence of debug spinlocks, the architecture specific spinlock
code can correctly allow CPU-1 to wait in a "queue" (e.g., ticket
spinlocks), ensuring that it acquires the lock at some point.  However,
with the debug spinlock code, livelock can easily occur due to the use of
try_lock, which obviously cannot put the CPU in that "queue".  This
queueing mechanism is implemented in both x86 and ARM spinlock code.

Note that the situation mentioned above is not hypothetical.  A real
problem was encountered where CPU-0 was running hrtimer_cancel with
interrupts disabled, and CPU-1 was attempting to run the hrtimer that
CPU-0 was trying to cancel.

Address this by actually attempting arch_spin_lock once it is suspected
that there is a spinlock lockup.  If we're in a situation that is
described above, the arch_spin_lock should succeed; otherwise other
timeout mechanisms (e.g., watchdog) should alert the system of a lockup.
Therefore, if there is a genuine system problem and the spinlock can't be
acquired, the end result (irrespective of this change being present) is
the same.  If there is a livelock caused by the debug code, this change
will allow the lock to be acquired, depending on the implementation of the
lower level arch specific spinlock code.

Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agogenalloc: make it possible to use a custom allocation algorithm
Benjamin Gaignard [Fri, 21 Sep 2012 01:02:09 +0000 (11:02 +1000)]
genalloc: make it possible to use a custom allocation algorithm

Premit use of another algorithm than the default first-fit one.  For
example a custom algorithm could be used to manage alignment requirements.

As I can't predict all the possible requirements/needs for all allocation
uses cases, I add a "free" field 'void *data' to pass any needed
information to the allocation function.  For example 'data' could be used
to handle a structure where you store the alignment, the expected memory
bank, the requester device, or any information that could influence the
allocation algorithm.

An usage example may look like this:
struct my_pool_constraints {
int align;
int bank;
...
};

unsigned long my_custom_algo(unsigned long *map, unsigned long size,
unsigned long start, unsigned int nr, void *data)
{
struct my_pool_constraints *constraints = data;
...
deal with allocation contraints
...
return the index in bitmap where perform the allocation
}

void create_my_pool()
{
struct my_pool_constraints c;
struct gen_pool *pool = gen_pool_create(...);
gen_pool_add(pool, ...);
gen_pool_set_algo(pool, my_custom_algo, &c);
}

Add of best-fit algorithm function:
most of the time best-fit is slower then first-fit but memory fragmentation
is lower. The random buffer allocation/free tests don't show any arithmetic
relation between the allocation time and fragmentation but the
best-fit algorithm
is sometime able to perform the allocation when the first-fit can't.

This new algorithm help to remove static allocations on ESRAM, a small but
fast on-chip RAM of few KB, used for high-performance uses cases like DMA
linked lists, graphic accelerators, encoders/decoders. On the Ux500
(in the ARM tree) we have define 5 ESRAM banks of 128 KB each and use of
static allocations becomes unmaintainable:
cd arch/arm/mach-ux500 && grep -r ESRAM .
./include/mach/db8500-regs.h:/* Base address and bank offsets for ESRAM */
./include/mach/db8500-regs.h:#define U8500_ESRAM_BASE   0x40000000
./include/mach/db8500-regs.h:#define U8500_ESRAM_BANK_SIZE      0x00020000
./include/mach/db8500-regs.h:#define U8500_ESRAM_BANK0  U8500_ESRAM_BASE
./include/mach/db8500-regs.h:#define U8500_ESRAM_BANK1       (U8500_ESRAM_BASE + U8500_ESRAM_BANK_SIZE)
./include/mach/db8500-regs.h:#define U8500_ESRAM_BANK2       (U8500_ESRAM_BANK1 + U8500_ESRAM_BANK_SIZE)
./include/mach/db8500-regs.h:#define U8500_ESRAM_BANK3       (U8500_ESRAM_BANK2 + U8500_ESRAM_BANK_SIZE)
./include/mach/db8500-regs.h:#define U8500_ESRAM_BANK4       (U8500_ESRAM_BANK3 + U8500_ESRAM_BANK_SIZE)
./include/mach/db8500-regs.h:#define U8500_ESRAM_DMA_LCPA_OFFSET     0x10000
./include/mach/db8500-regs.h:#define U8500_DMA_LCPA_BASE
(U8500_ESRAM_BANK0 + U8500_ESRAM_DMA_LCPA_OFFSET)
./include/mach/db8500-regs.h:#define U8500_DMA_LCLA_BASE U8500_ESRAM_BANK4

I want to use genalloc to do dynamic allocations but I need to be able to
fine tune the allocation algorithm. I my case best-fit algorithm give
better results than first-fit, but it will not be true for every use case.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@stericsson.com>
Cc: Huang Ying <ying.huang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/gcd.c: prevent possible div by 0
Davidlohr Bueso [Fri, 21 Sep 2012 01:02:08 +0000 (11:02 +1000)]
lib/gcd.c: prevent possible div by 0

Account for all properties when a and/or b are 0:
gcd(0, 0) = 0
gcd(a, 0) = a
gcd(0, b) = b

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/Kconfig.debug: adjust hard-lockup related Kconfig options
Jan Beulich [Fri, 21 Sep 2012 01:02:08 +0000 (11:02 +1000)]
lib/Kconfig.debug: adjust hard-lockup related Kconfig options

The main option should not appear in the resulting .config when the
dependencies aren't met (i.e.  use "depends on" rather than directly
setting the default from the combined dependency values).

The sub-options should depend on the main option rather than a more
generic higher level one.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib-parserc-avoid-overflow-in-match_number-fix
Andrew Morton [Fri, 21 Sep 2012 01:02:08 +0000 (11:02 +1000)]
lib-parserc-avoid-overflow-in-match_number-fix

coding-style tweaks

Cc: Alex Elder <elder@inktank.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/parser.c: avoid overflow in match_number()
Alex Elder [Fri, 21 Sep 2012 01:02:08 +0000 (11:02 +1000)]
lib/parser.c: avoid overflow in match_number()

The result of converting an integer value to another signed integer type
that's unable to represent the original value is implementation defined.
(See notes in section 6.3.1.3 of the C standard.)

In match_number(), the result of simple_strtol() (which returns type long)
is assigned to a value of type int.

Instead, handle the result of simple_strtol() in a well-defined way, and
return -ERANGE if the result won't fit in the int variable used to hold
the parsed result.

No current callers pay attention to the particular error value returned,
so this additional return code shouldn't do any harm.

Signed-off-by: Alex Elder <elder@inktank.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoidr-rename-max_level-to-max_idr_level-fix-fix-2-fix
Stephen Rothwell [Tue, 25 Sep 2012 00:22:54 +0000 (10:22 +1000)]
idr-rename-max_level-to-max_idr_level-fix-fix-2-fix

IB/mlx4: fix for MAX_ID_MASK to MAX_IDR_MASK name change

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Roland Dreier <roland@purestorage.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoidr-rename-max_level-to-max_idr_level-fix-fix-2
Andrew Morton [Fri, 21 Sep 2012 01:02:07 +0000 (11:02 +1000)]
idr-rename-max_level-to-max_idr_level-fix-fix-2

ho hum

Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Glauber Costa <glommer@parallels.com>
Cc: walter harms <wharms@bfs.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoidr-rename-max_level-to-max_idr_level-fix
Andrew Morton [Fri, 21 Sep 2012 01:02:07 +0000 (11:02 +1000)]
idr-rename-max_level-to-max_idr_level-fix

repair fallout

Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Glauber Costa <glommer@parallels.com>
Cc: walter harms <wharms@bfs.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoidr: rename MAX_LEVEL to MAX_IDR_LEVEL
Fengguang Wu [Fri, 21 Sep 2012 01:02:07 +0000 (11:02 +1000)]
idr: rename MAX_LEVEL to MAX_IDR_LEVEL

To avoid name conflicts:

drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined

While at it, also make the other names more consistent and add
parentheses.

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Cc: walter harms <wharms@bfs.de>
Cc: Glauber Costa <glommer@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agokvm: replace test_and_set_bit_le() in mark_page_dirty_in_slot() with set_bit_le()
Takuya Yoshikawa [Fri, 21 Sep 2012 01:02:06 +0000 (11:02 +1000)]
kvm: replace test_and_set_bit_le() in mark_page_dirty_in_slot() with set_bit_le()

Now that we have defined generic set_bit_le() we do not need to use
test_and_set_bit_le() for atomically setting a bit.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agopowerpc: bitops: introduce {clear,set}_bit_le()
Takuya Yoshikawa [Fri, 21 Sep 2012 01:02:06 +0000 (11:02 +1000)]
powerpc: bitops: introduce {clear,set}_bit_le()

Needed to replace test_and_set_bit_le() in virt/kvm/kvm_main.c which is
being used for this missing function.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobitops: introduce generic {clear,set}_bit_le()
Takuya Yoshikawa [Fri, 21 Sep 2012 01:02:06 +0000 (11:02 +1000)]
bitops: introduce generic {clear,set}_bit_le()

Needed to replace test_and_set_bit_le() in virt/kvm/kvm_main.c which is
being used for this missing function.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/net/ethernet/dec/tulip: Use standard __set_bit_le() function
Takuya Yoshikawa [Fri, 21 Sep 2012 01:02:05 +0000 (11:02 +1000)]
drivers/net/ethernet/dec/tulip: Use standard __set_bit_le() function

To introduce generic set_bit_le() later, we remove our own definition
and use a proper non-atomic bitops function: __set_bit_le().

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/net/ethernet/sfc: use standard __{clear,set}_bit_le() functions
Ben Hutchings [Fri, 21 Sep 2012 01:02:05 +0000 (11:02 +1000)]
drivers/net/ethernet/sfc: use standard __{clear,set}_bit_le() functions

There are now standard functions for dealing with little-endian bit
arrays, so use them instead of our own implementations.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/da9052_bl.c: drop devm_kfree of devm_kzalloc'd data
Julia Lawall [Fri, 21 Sep 2012 01:02:05 +0000 (11:02 +1000)]
drivers/video/backlight/da9052_bl.c: drop devm_kfree of devm_kzalloc'd data

devm_kfree should not have to be explicitly used.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,d;
@@

x = devm_kzalloc(...)
...
?-devm_kfree(d,x);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: remove ProGear driver
Marcin Juszkiewicz [Fri, 21 Sep 2012 01:02:05 +0000 (11:02 +1000)]
backlight: remove ProGear driver

This driver was for the ProGear webpad device which was produced in
2000/2001 and is not available on a market.  I no longer have this
hardware so can not even check how Linux works on it.

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight-add-new-lm3639-backlight-driver-fix-2
G.Shark Jeong [Fri, 21 Sep 2012 01:02:04 +0000 (11:02 +1000)]
backlight-add-new-lm3639-backlight-driver-fix-2

Put NEW_LEDS and LEDS_CLASS into Kconfig file to reduce additional
configuration works in LEDs.

Signed-off-by: G.Shark Jeong <gshark.jeong@gmail.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight-add-new-lm3639-backlight-driver-fix
Andrew Morton [Fri, 21 Sep 2012 01:02:04 +0000 (11:02 +1000)]
backlight-add-new-lm3639-backlight-driver-fix

code layout tweaks

Cc: "G.Shark Jeong" <gshark.jeong@gmail.com>
Cc: Daniel Jeong <daniel.jeong@ti.com>
Cc: G.Shark Jeong <gshark.jeong@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: add new lm3639 backlight driver
G.Shark Jeong [Fri, 21 Sep 2012 01:02:04 +0000 (11:02 +1000)]
backlight: add new lm3639 backlight driver

This driver is a general version for LM3639 backlgiht + flash driver chip
of TI.

LM3639:
The LM3639 is a single chip LCD Display Backlight driver + white LED
Camera driver.  Programming is done over an I2C compatible interface.
www.ti.com

Signed-off-by: G.Shark Jeong <gshark.jeong@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Daniel Jeong <daniel.jeong@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight-add-backlight-driver-for-lm3630-chip-fix
Andrew Morton [Fri, 21 Sep 2012 01:02:03 +0000 (11:02 +1000)]
backlight-add-backlight-driver-for-lm3630-chip-fix

- make bled_name[] static

- a few coding style tuneups

- create new set_intensity(), partly to avoid awkward layout gymnastics

Cc: "G.Shark Jeong" <gshark.jeong@gmail.com>
Cc: Daniel Jeong <daniel.jeong@ti.com>
Cc: G.Shark Jeong <gshark.jeong@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: add Backlight driver for lm3630 chip
G.Shark Jeong [Fri, 21 Sep 2012 01:02:03 +0000 (11:02 +1000)]
backlight: add Backlight driver for lm3630 chip

This driver is a general version for LM3630 backlgiht driver chip of TI.

LM3630 :
The LM3630 is a current mode boost converter which supplies the power
and controls the current in two strings of up to 10 LEDs per string.
Programming is done over an I2C compatible interface.
www.ti.com

Signed-off-by: G.Shark Jeong <gshark.jeong@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Daniel Jeong <daniel.jeong@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: lp855x: add FAST bit description for LP8556
Kim, Milo [Fri, 21 Sep 2012 01:02:03 +0000 (11:02 +1000)]
backlight: lp855x: add FAST bit description for LP8556

LP8556 backlight driver supports fast refresh mode when exiting the low
power mode.  This bit can be configurable in the platform side.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/kb3886_bl.c: use usleep_range() instead of msleep() for small...
Jingoo Han [Fri, 21 Sep 2012 01:02:02 +0000 (11:02 +1000)]
drivers/video/backlight/kb3886_bl.c: use usleep_range() instead of msleep() for small sleeps

Since msleep() might not sleep for the desired amount when less than 20ms,
use usleep_range().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Claudio Nieder <private@claudio.ch>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/ltv350qv.c: use usleep_range() instead of msleep() for small...
Jingoo Han [Fri, 21 Sep 2012 01:02:02 +0000 (11:02 +1000)]
drivers/video/backlight/ltv350qv.c: use usleep_range() instead of msleep() for small sleeps

Since msleep() might not sleep for the desired amount when less than 20ms,
use usleep_range().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/da9052_bl.c: use usleep_range() instead of msleep() for small...
Jingoo Han [Fri, 21 Sep 2012 01:02:02 +0000 (11:02 +1000)]
drivers/video/backlight/da9052_bl.c: use usleep_range() instead of msleep() for small sleeps

Since msleep() might not sleep for the desired amount when less than 20ms,
use usleep_range().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Ashish Jangam <ashish.jangam@kpitcummins.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoMAINTAINERS: Update gianfar_ptp after renaming
Joe Perches [Fri, 21 Sep 2012 01:02:01 +0000 (11:02 +1000)]
MAINTAINERS: Update gianfar_ptp after renaming

commit ec21e2ec36769 ("freescale: Move the Freescale drivers")
moved the files, update the pattern.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoMAINTAINERS: add defconfig file to IMX section
Uwe Kleine-König [Fri, 21 Sep 2012 01:02:01 +0000 (11:02 +1000)]
MAINTAINERS: add defconfig file to IMX section

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoMAINTAINERS: update gpio subsystem file list
Yang Bai [Fri, 21 Sep 2012 01:02:01 +0000 (11:02 +1000)]
MAINTAINERS: update gpio subsystem file list

Signed-off-by: Yang Bai <hamo.by@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/vsprintf: update documentation to cover all of %p[Mm][FR]
Andy Shevchenko [Fri, 21 Sep 2012 01:02:00 +0000 (11:02 +1000)]
lib/vsprintf: update documentation to cover all of %p[Mm][FR]

Acked-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib: vsprintf: fix broken comments
George Spelvin [Fri, 21 Sep 2012 01:02:00 +0000 (11:02 +1000)]
lib: vsprintf: fix broken comments

Numbering the 8 potential digits 2 though 9 never did make a lot of sense.

Signed-off-by: George Spelvin <linux@horizon.com>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib: vsprintf: optimize put_dec_trunc8()
George Spelvin [Fri, 21 Sep 2012 01:02:00 +0000 (11:02 +1000)]
lib: vsprintf: optimize put_dec_trunc8()

If you're going to have a conditional branch after each 32x32->64-bit
multiply, might as well shrink the code and make it a loop.

This also avoids using the long multiply for small integers.

(This leaves the comments in a confusing state, but that's a separate
patch to make review easier.)

Signed-off-by: George Spelvin <linux@horizon.com>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib: vsprintf: optimize division by 10000
George Spelvin [Fri, 21 Sep 2012 01:01:59 +0000 (11:01 +1000)]
lib: vsprintf: optimize division by 10000

The same multiply-by-inverse technique can be used to convert division by
10000 to a 32x32->64-bit multiply.

Signed-off-by: George Spelvin <linux@horizon.com>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib: vsprintf: optimize division by 10 for small integers
George Spelvin [Fri, 21 Sep 2012 01:01:59 +0000 (11:01 +1000)]
lib: vsprintf: optimize division by 10 for small integers

Shrink the reciprocal approximations used in put_dec_full4() based on the
comments in put_dec_full9().

Signed-off-by: George Spelvin <linux@horizon.com>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers-misc-lis3lv02d-lis3lv02d_i2cc-add-lis3lv02d-device-tree-init-fix
Andrew Morton [Fri, 21 Sep 2012 01:01:59 +0000 (11:01 +1000)]
drivers-misc-lis3lv02d-lis3lv02d_i2cc-add-lis3lv02d-device-tree-init-fix

fix CONFIG_OF=n build

drivers/misc/lis3lv02d/lis3lv02d_i2c.c: In function 'lis3lv02d_i2c_probe':
drivers/misc/lis3lv02d/lis3lv02d_i2c.c:120: error: implicit declaration of function 'of_match_device'
drivers/misc/lis3lv02d/lis3lv02d_i2c.c:121: error: 'struct lis3lv02d' has no member named 'of_node'

Cc: AnilKumar Ch <anilkumar@ti.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/misc/lis3lv02d/lis3lv02d_i2c.c: add lis3lv02d device tree init
AnilKumar Ch [Fri, 21 Sep 2012 01:01:59 +0000 (11:01 +1000)]
drivers/misc/lis3lv02d/lis3lv02d_i2c.c: add lis3lv02d device tree init

Add lis3lv02d device tree initialization code/API to take pdata from
device node.  Also adds device tree init matching table support to
lis3lv02d_i2c driver.  If the driver data is passed from device tree, then
this driver picks up platform data from device node through common/generic
lis3lv02d.c driver.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers-misc-lis3lv02d-lis3lv02d_spic-add-lis3lv02d-device-tree-init-fix
Andrew Morton [Fri, 21 Sep 2012 01:01:58 +0000 (11:01 +1000)]
drivers-misc-lis3lv02d-lis3lv02d_spic-add-lis3lv02d-device-tree-init-fix

config CONFIG_OF=n build

drivers/misc/lis3lv02d/lis3lv02d_spi.c: In function 'lis302dl_spi_probe':
drivers/misc/lis3lv02d/lis3lv02d_spi.c:89: error: implicit declaration of function 'of_match_device'
drivers/misc/lis3lv02d/lis3lv02d_spi.c:89: error: 'lis302dl_spi_dt_ids' undeclared (first use in this function)
drivers/misc/lis3lv02d/lis3lv02d_spi.c:89: error: (Each undeclared identifier is reported only once
drivers/misc/lis3lv02d/lis3lv02d_spi.c:89: error: for each function it appears in.)
drivers/misc/lis3lv02d/lis3lv02d_spi.c:90: error: 'struct lis3lv02d' has no member named 'of_node'

Cc: AnilKumar Ch <anilkumar@ti.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/misc/lis3lv02d/lis3lv02d_spi.c: add lis3lv02d device tree init
AnilKumar Ch [Fri, 21 Sep 2012 01:01:58 +0000 (11:01 +1000)]
drivers/misc/lis3lv02d/lis3lv02d_spi.c: add lis3lv02d device tree init

Add lis3lv02d device tree initialization code/API to take pdata from
device node.  Also remove CONFIG_OF ifdef from the driver, if CONFIG_OF is
not defined then OF APIs returns 0.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/misc/lis3lv02d: remove lis3lv02d driver DT init
AnilKumar Ch [Fri, 21 Sep 2012 01:01:58 +0000 (11:01 +1000)]
drivers/misc/lis3lv02d: remove lis3lv02d driver DT init

Remove lis3lv02d driver device tree initialization from core driver and
move it to individual drivers.  With the current implementation some pdata
parameters are missing if we use lis3lv02d_init_device() in lis3lv02d_i2c
driver.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers-misc-lis3lv02d-lis3lv02d_spic-add-dt-matching-table-passthru-code-fix-fix
Andrew Morton [Fri, 21 Sep 2012 01:01:57 +0000 (11:01 +1000)]
drivers-misc-lis3lv02d-lis3lv02d_spic-add-dt-matching-table-passthru-code-fix-fix

fix lis302dl_spi_dt_ids unused warning when CONFIG_OF=n

drivers/misc/lis3lv02d/lis3lv02d_spi.c:63: warning: 'lis302dl_spi_dt_ids' defined but not used

Cc: Daniel Mack <zonque@gmail.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolis3: lis3lv02d_spi.c: include linux/of.h
Daniel Mack [Fri, 21 Sep 2012 01:01:57 +0000 (11:01 +1000)]
lis3: lis3lv02d_spi.c: include linux/of.h

This include is needed to define of_match:ptr() for !CONFIG_OF &&
1CONFIG_DTC.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/misc/lis3lv02d/lis3lv02d_spi.c: add DT matching table passthru code
Daniel Mack [Fri, 21 Sep 2012 01:01:57 +0000 (11:01 +1000)]
drivers/misc/lis3lv02d/lis3lv02d_spi.c: add DT matching table passthru code

If probed from a device tree, this driver now passes the node information
to the generic part, so the runtime information can be derived.

Successfully tested on a PXA3xx board.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Rob Herring <robherring2@gmail.com>
Cc: "AnilKumar, Chimata" <anilkumar@ti.com>
Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/misc/lis3lv02d: add generic DT matching code
Daniel Mack [Fri, 21 Sep 2012 01:01:56 +0000 (11:01 +1000)]
drivers/misc/lis3lv02d: add generic DT matching code

Adds logic to parse lis3 properties from a device tree node and store them
in a freshly allocated lis3lv02d_platform_data.

Note that the actual match tables are left out here.  This part should
happen in the drivers that bind to the individual busses (SPI/I2C/PCI).

Also adds some DT bindinds documentation.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Rob Herring <robherring2@gmail.com>
Cc: "AnilKumar, Chimata" <anilkumar@ti.com>
Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agopoweroff: fix bug in orderly_poweroff()
hongfeng [Fri, 21 Sep 2012 01:01:56 +0000 (11:01 +1000)]
poweroff: fix bug in orderly_poweroff()

orderly_poweroff is trying to poweroff platform by two steps:

step 1: Call userspace application to poweroff

step 2: If userspace poweroff fail, then do a force power off if force
param is set.

The bug here is, step 1 is always successful with param UMH_NO_WAIT,
should change to UMH_WAIT_EXEC which will monitor whether user application
successful run.

Signed-off-by: Feng Hong <hongfeng@marvell.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosyscalls: make kcmp syscall available for all architectures
Heiko Carstens [Fri, 21 Sep 2012 01:01:56 +0000 (11:01 +1000)]
syscalls: make kcmp syscall available for all architectures

Remove the x86 dependency, since the system call is not architecture
dependent.

Also add a ptrace.h include, so it compiles at least also on s390.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agokernel/sys.c: call disable_nonboot_cpus() in kernel_restart()
Shawn Guo [Fri, 21 Sep 2012 01:01:55 +0000 (11:01 +1000)]
kernel/sys.c: call disable_nonboot_cpus() in kernel_restart()

As kernel_power_off() calls disable_nonboot_cpus(), we may also want to
have kernel_restart() call disable_nonboot_cpus().  Doing so can help
machines that require boot cpu be the last alive cpu during reboot to
survive with kernel restart.

This fixes one reboot issue seen on imx6q (Cortex-A9 Quad).  The machine
requires that the restart routine be run on the primary cpu rather than
secondary ones.  Otherwise, the secondary core running the restart routine
will fail to come to online after reboot.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agotile: fix personality bits handling upon exec()
Jiri Kosina [Fri, 21 Sep 2012 01:01:55 +0000 (11:01 +1000)]
tile: fix personality bits handling upon exec()

Historically, the top three bytes of personality have been used for things
such as ADDR_NO_RANDOMIZE, which made sense only for specific
architectures.

We now however have a flag there that is general no matter the
architecture (UNAME26); generally we have to be careful to preserve the
personality flags across exec().

This patch fixes tile architecture not to forcefully overwrite personality
flags during exec().

In addition to that, we fix two other things along the way:

- exec_domain switching is fixed -- set_personality() should always
  be used instead of directly assigning to current->personality.
- as pointed out by Arnd Bergmann, PER_LINUX_32BIT is not used anywhere
  by tile, so let's just drop that in favor of PER_LINUX

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocross-arch: don't corrupt personality flags upon exec()
Jiri Kosina [Fri, 21 Sep 2012 01:01:55 +0000 (11:01 +1000)]
cross-arch: don't corrupt personality flags upon exec()

Historically, the top three bytes of personality have been used for things
such as ADDR_NO_RANDOMIZE, which made sense only for specific
architectures.

We now however have a flag there that is general no matter the
architecture (UNAME26); generally we have to be careful to preserve the
personality flags across exec().

This patch tries to fix all architectures that forcefully overwrite
personality flags during exec() (ppc32 and s390 have been fixed recently
by commits f9783ec86 and 59e4c3a2f in a similar way already).

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Mark Salter <msalter@redhat.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoscore: select generic atomic64_t support
Fengguang Wu [Fri, 21 Sep 2012 01:01:54 +0000 (11:01 +1000)]
score: select generic atomic64_t support

It's required for the core fs/namespace.c and many other basic features.

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Lennox Wu <lennox.wu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofrv: kill used but uninitialized variable
Geert Uytterhoeven [Fri, 21 Sep 2012 01:01:54 +0000 (11:01 +1000)]
frv: kill used but uninitialized variable

Commit 6afe1a1fe8ff83f6a ("PM: Remove legacy PM") removed the
initialization of retval, causing:

arch/frv/kernel/pm.c: In function 'sysctl_pm_do_suspend':
arch/frv/kernel/pm.c:165:5: warning: 'retval' may be used uninitialized in this function [-Wuninitialized]

Remove the variable completely to fix this, and convert to a proper
switch (...) { ... } construct to improve readability.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosectons-fix-const-sections-for-crc32-table-checkpatch-fixes
Andrew Morton [Fri, 21 Sep 2012 01:01:54 +0000 (11:01 +1000)]
sectons-fix-const-sections-for-crc32-table-checkpatch-fixes

ERROR: code indent should use tabs where possible
#54: FILE: lib/gen_crc32table.c:112:
+        ^Iprintf("static u32 __cacheline_aligned "$

WARNING: please, no space before tabs
#54: FILE: lib/gen_crc32table.c:112:
+        ^Iprintf("static u32 __cacheline_aligned "$

WARNING: please, no spaces at the start of a line
#54: FILE: lib/gen_crc32table.c:112:
+        ^Iprintf("static u32 __cacheline_aligned "$

ERROR: code indent should use tabs where possible
#63: FILE: lib/gen_crc32table.c:122:
+        ^Iprintf("static u32 __cacheline_aligned "$

WARNING: please, no space before tabs
#63: FILE: lib/gen_crc32table.c:122:
+        ^Iprintf("static u32 __cacheline_aligned "$

WARNING: please, no spaces at the start of a line
#63: FILE: lib/gen_crc32table.c:122:
+        ^Iprintf("static u32 __cacheline_aligned "$

ERROR: code indent should use tabs where possible
#72: FILE: lib/gen_crc32table.c:131:
+        ^Iprintf("static u32 __cacheline_aligned "$

WARNING: please, no space before tabs
#72: FILE: lib/gen_crc32table.c:131:
+        ^Iprintf("static u32 __cacheline_aligned "$

WARNING: please, no spaces at the start of a line
#72: FILE: lib/gen_crc32table.c:131:
+        ^Iprintf("static u32 __cacheline_aligned "$

total: 3 errors, 6 warnings, 48 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

./patches/sectons-fix-const-sections-for-crc32-table.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Andi Kleen <ak@linux.intel.com>
Cc: Joe Mario <jmario@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosectons: fix const sections for crc32 table
Joe Mario [Fri, 21 Sep 2012 01:01:54 +0000 (11:01 +1000)]
sectons: fix const sections for crc32 table

Fix the const sections for the code generated by crc32 table.  There's no
ro version of the cacheline aligned section, so we cannot put in const
data without a conflict Just don't make the crc tables const for now.

[ak@linux.intel.com: some fixes and new description]
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosections: fix section conflicts in sound
Andi Kleen [Fri, 21 Sep 2012 01:01:53 +0000 (11:01 +1000)]
sections: fix section conflicts in sound

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosections: fix section conflicts in net
Andi Kleen [Fri, 21 Sep 2012 01:01:53 +0000 (11:01 +1000)]
sections: fix section conflicts in net

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosections: fix section conflicts in net/can
Andi Kleen [Fri, 21 Sep 2012 01:01:53 +0000 (11:01 +1000)]
sections: fix section conflicts in net/can

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosections: fix section conflicts in mm/percpu.c
Andi Kleen [Fri, 21 Sep 2012 01:01:52 +0000 (11:01 +1000)]
sections: fix section conflicts in mm/percpu.c

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosections: fix section conflicts in drivers/video
Andi Kleen [Fri, 21 Sep 2012 01:01:52 +0000 (11:01 +1000)]
sections: fix section conflicts in drivers/video

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosections: fix section conflicts in drivers/scsi
Andi Kleen [Fri, 21 Sep 2012 01:01:52 +0000 (11:01 +1000)]
sections: fix section conflicts in drivers/scsi

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosections: fix section conflicts in drivers/platform/x86
Andi Kleen [Fri, 21 Sep 2012 01:01:51 +0000 (11:01 +1000)]
sections: fix section conflicts in drivers/platform/x86

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>