Makefile: Apply some optimizations

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
fs: namespace: suppress 'may be used uninitialized' warnings

The gcc version 4.9.1 compiler complains Even though it isn't possible for
these variables to not get initialized before they are used.

fs/namespace.c: In function ‘SyS_mount’:
fs/namespace.c:2720:8: warning: ‘kernel_dev’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags,
        ^
fs/namespace.c:2699:8: note: ‘kernel_dev’ was declared here
  char *kernel_dev;
        ^
fs/namespace.c:2720:8: warning: ‘kernel_type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags,
        ^
fs/namespace.c:2697:8: note: ‘kernel_type’ was declared here
  char *kernel_type;
        ^

Fix the warnings by simplifying copy_mount_string() as suggested by Al Viro.

Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
msm: acpuclock-krait: Implement CPU voltage control

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>

Conflicts:
	drivers/cpufreq/cpufreq.c
msm: board-flo: Decrease minimum SAW regulator voltage

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
touchscreen: Implement Sweep2Sleep for Nexus 7 2013

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
net: netfilter: Force no unsafe math optimizations

GCC spouts some weird segmentation fault.

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
Fix -Ofast optimization errors

Possibly uninitialized variables.
Array subscripts above/below bounds.

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>

Conflicts:
	kernel/sysctl.c
msm_fb: display; Fix snprintf length usage

Using a newer GCC we get the following warning:

drivers/video/msm/mipi_novatek.c: In function 'mipi_dsi_3d_barrier_read':
drivers/video/msm/mipi_novatek.c:683:37: warning: argument to 'sizeof' in
'snprintf' call is the same expression as the destination; did you mean to
provide an explicit length? [-Wsizeof-pointer-memaccess]

These look to be due to using sizeof(buf) which is a pointer,
access it properly.

Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>
USB: gadget: qdss: Fix strncmp length usage

Using a newer GCC we get the following warnings:

drivers/usb/gadget/f_qdss.c: In function 'qdss_bind_config':
drivers/usb/gadget/f_qdss.c:598: warning: argument to 'sizeof' in
'strncmp' call is the same expression as the second source; did you mean
to provide an explicit length? [-Wsizeof-pointer-memaccess]

drivers/usb/gadget/f_qdss.c: In function 'usb_qdss_open':
drivers/usb/gadget/f_qdss.c:760: warning: argument to 'sizeof' in
'strncmp' call is the same expression as the second source; did you mean
to provide an explicit length? [-Wsizeof-pointer-memaccess]

These look to be due to using sizeof(ch->name) which is a pointer, use
a simple strcmp instead.

Change-Id: I09e09a18ffb3361fc351b177ed3a35432d9ed933
Signed-off-by: Kumar Gala <galak@codeaurora.org>
phy: fix compiler array bounds warning on settings[]

With -Werror=array-bounds, gcc v4.7.x warns that in phy_find_valid(), the
settings[] "array subscript is above array bounds", I think because idx is
a signed integer and if the caller supplied idx < 0, we pass the guard but
still reference out of bounds.

Fix this by making idx unsigned here and elsewhere.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[zwliew: Backport to Linux 3.4]
Signed-off-by: Zhao Wei Liew <zhaoweiliew@gmail.com>

Conflicts:
	drivers/net/phy/phy.c