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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scatterlist: add sg_alloc_table_from_pages function

This patch adds a new constructor for an sg table. The table is constructed
from an array of struct pages. All contiguous chunks of the pages are merged
into a single sg nodes. A user may provide an offset and a size of a buffer if
the buffer is not page-aligned.

The function is dedicated for DMABUF exporters which often perform conversion
from an page array to a scatterlist. Moreover the scatterlist should be
squashed in order to save memory and to speed-up the process of DMA mapping
using dma_map_sg.

The code is based on the patch 'v4l: vb2-dma-contig: add support for
scatterlist in userptr mode' and hints from Laurent Pinchart.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Andrew Morton <akpm@linux-foundation.org>
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
tmpfs: fix mempolicy object leaks

This patch fixes several mempolicy leaks in the tmpfs mount logic.
These leaks are slow - on the order of one object leaked per mount
attempt.

Leak 1 (umount doesn't free mpol allocated in mount):
    while true; do
        mount -t tmpfs -o mpol=interleave,size=100M nodev /mnt
        umount /mnt
    done

Leak 2 (errors parsing remount options will leak mpol):
    mount -t tmpfs -o size=100M nodev /mnt
    while true; do
        mount -o remount,mpol=interleave,size=x /mnt 2> /dev/null
    done
    umount /mnt

Leak 3 (multiple mpol per mount leak mpol):
    while true; do
        mount -t tmpfs -o mpol=interleave,mpol=interleave,size=100M nodev /mnt
        umount /mnt
    done

This patch fixes all of the above.  I could have broken the patch into
three pieces but is seemed easier to review as one.

Signed-off-by: Greg Thelen <gthelen@google.com>
modified for Mako kernel from LKML reference

Signed-off-by: faux123 <reioux@gmail.com>
block/deadline-iosched: Tweak magic value
prima: release v3.2.2.17b

	git://codeaurora.org/external/wlan/prima.git

	4990d1c Wlan: Release 3.2.2.17B
	d6b217f wlan: DTIM3 changed to DTIM1 after roaming
	f83a6cd Wlan: Release 3.2.2.17A
	2f45a43 Fix for "crash in pMac->cfg.gCfgEntry"
	c8faf30 wlan: Change regulatory followed customer request
	82e75bf wlan: Add msecs_to_jiffies() to wake lock argument
	f1bb518 Revert "wlan: Release 3.2.2.18"
	a65fc60 Revert "wlan: Set the country code in cfg before creating channel list."
	d235ff4 Revert "wlan: Release 3.2.2.19"
	2742bc2 Revert "wlan: Decrease SAP timeout from 100 to 10 seconds"
	768b6f5 Revert "wlan: Change RX wakelock to 50 milliseconds"
	4edbdc7 Revert "wlan: Fix for spectrum management bit in AddBss for SM disabled AP"
	2b46b25 Revert "wlan: Release 3.2.2.20"
	0647d89 wlan: Release 3.2.2.20
	e1c76a3 wlan: Fix for spectrum management bit in AddBss for SM disabled AP
	b8493a3 wlan: Change RX wakelock to 50 milliseconds
	476a501 wlan: Decrease SAP timeout from 100 to 10 seconds
	c883f13 wlan: Release 3.2.2.19
	4dbdab2 wlan: Set the country code in cfg before creating channel list.
	7cabdd8 wlan: Release 3.2.2.18

Signed-off-by: Iliyan Malchev <malchev@google.com>
msm: mdp: Adjust bandwidth parameters
720p video on 1080p panel have upscaling, mdp clk should not be
increased for this case. Also slightly increase mdp ib to make
sure there is no bw access bottleneck.
msm: video: increase MM heap size for smoothstreaming
Increase MM carveout size to 76M to support 1080P secure
playback with worst-case allocation for smoothstreaming.
Restrict dpb count to 14 for smoothstreaming mode.
b/ 9302522
msm: mdp: Unmap secure memory on dtv off

Signed-off-by: naseer <naseer@codeaurora.org>
Readahead: Optimize divide/multiply by power of 2 using L/R shift
Readahead: Optimize divide/multiply by power of 2 using L/R shift - Fix