Linux 3.4.89

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
Linux 3.4.90

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
Linux 3.4.91

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
intelli/msm_thermal: initial coding for Qualcomm Snapdragon 800 devices

an intelligent MSM thermal throttling kernel driver designed to replace the
closed sourced thermald(aemon) from Qualcomm.

The current driver can throttle the SOC via core frequency scaling or via
core hotplug with user configurable sysfs entries to adjust the throttling
temperature thresholds for each.

Derived from Qualcomm's Open source repo.

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
board-8974-hammerhead: initialize intelli_thermal engine

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
intelli-thermal: use its own dedicated workqueue

this should reduce the load on the shared global workqueue for other
processes and also give its own unique variable name for cpu limit

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
intelli-thermal: increase sampling time to reduce sampling overhead

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
Intelli-thermal: remove duplicate header include

Thanks to code review by @Androguide

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
mm/swapfile.c: do not skip lowest_bit in scan_swap_map() scan loop

In the second half of scan_swap_map()'s scan loop, offset is set to
si->lowest_bit and then incremented before entering the loop for the
first time, causing si->swap_map[si->lowest_bit] to be skipped.

Signed-off-by: Jamie Liu <jamieliu@google.com>
Cc: Shaohua Li <shli@fusionio.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
ext4: remove unused ac_ex_scanned

When looking at a bug report with:

> kernel: EXT4-fs: 0 scanned, 0 found

I thought wow, 0 scanned, that's odd?  But it's not odd; it's printing
a variable that is initialized to 0 and never touched again.

It's never been used since the original merge, so I don't really even
know what the original intent was, either.

If anyone knows how to hook it up, speak now via patch, otherwise just
yank it so it's not making a confusing situation more confusing in
kernel logs.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
ext4: don't calculate total xattr header size unless needed

The function ext4_expand_extra_isize_ea() doesn't need the size of all
of the extended attribute headers.  So if we don't calculate it when
it is unneeded, it we can skip some undeeded memory references, and as
a bonus, we eliminate some kvetching by static code analysis tools.

Addresses-Coverity-Id: #741291

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
ext4: address a benign compiler warning

When !defined(CONFIG_EXT4_DEBUG), mb_debug() should be defined as a
no_printk() statement instead of an empty statement in order to suppress
the following compiler warning:

fs/ext4/mballoc.c: In function ‘ext4_mb_cleanup_pa’:
fs/ext4/mballoc.c:2659:47: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
   mb_debug(1, "mballoc: %u PAs left\n", count);

Signed-off-by: Patrick Palka <patrick@parcs.ath.cx>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
ext4: remove unreachable code in ext4_can_extents_be_merged()

Commit ec22ba8e ("ext4: disable merging of uninitialized extents")
ensured that if either extent under consideration is uninit, we
decline to merge, and immediately return.

But right after that test, we test again for an uninit
extent; we can never hit this.  So just remove the impossible
test and associated variable.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
ext4: remove unreachable code after ext4_can_extents_be_merged()

Commit ec22ba8e ("ext4: disable merging of uninitialized extents")
ensured that if either extent under consideration is uninit, we
decline to merge, and ext4_can_extents_be_merged() returns false.

So there is no need for the caller to then test whether the
extent under consideration is unitialized; if it were, we
wouldn't have gotten that far.

The comments were also inaccurate; ext4_can_extents_be_merged()
no longer XORs the states, it fails if *either* is uninit.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>

Conflicts:
	fs/ext4/extents.c

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
sweep2wake: Add bidirectional Sweep2Sleep based on the idea by @Dorimanx and adapted for the Nexus 5

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>

Conflicts:
	drivers/input/touchscreen/sweep2wake.c

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
Sweep2Wake: Bidirectional S2W for Nexus 5

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
IO: removed usless test & debug things

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>

Conflicts:
	block/Makefile

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
Not cool to force that debugging.

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>
Update 1

Signed-off-by: Joao Paulo <joaolrpaulo@gmail.com>