]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/log
sojka/nv-tegra/linux-3.10.git
7 years agodrivers: imx2xx: Fail probe if device unavailable
Bhanu Murthy V [Wed, 13 Jul 2016 01:40:38 +0000 (18:40 -0700)]
drivers: imx2xx: Fail probe if device unavailable

Return error if otp read or fuse id read fails
Turn off power before returning error and remove
check for device not available during power off as
it's already verified during power on.

Bug 1784114

Change-Id: Id217b87fb8352c426f68468b1520da9520b0dcc7
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1180011
(cherry picked from commit 7ecab59b36e15224e0ea3901055be20794f61f6e)
Reviewed-on: http://git-master/r/1180977
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
7 years agomedia: tegra: graph: clean unlinked channels
Frank Chen [Sat, 9 Jul 2016 00:43:48 +0000 (17:43 -0700)]
media: tegra: graph: clean unlinked channels

We need to clean all the unlinked channels when
failed to find any imager device in DT.

Failed to do so will leave a false video node in
/dev directory.

Bug 1768704

Change-Id: Ifdbcd2ebeb0f8c1b1a2d28d3b31e4928b6978842
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1177935
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
7 years agoARM64: DT: E3326 auto detect support
Frank Chen [Thu, 2 Jun 2016 05:09:44 +0000 (22:09 -0700)]
ARM64: DT: E3326 auto detect support

Add back E3326 auto detect support since
both cboot and uboot are supporting plugin
manager now.

Bug 1768704

Change-Id: If33edf7aa999d1e87cf603824addeee9eabd23e5
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1175910
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
7 years agoplatform: tegra: move pstore to carveout memory
Bibek Basu [Tue, 12 Jul 2016 07:07:38 +0000 (12:37 +0530)]
platform: tegra: move pstore to carveout memory

only carveout memory is gauranteed to be not
touched by bootloader. L4T uses NCT carveout
for Pstore .This change makes it explicit

Bug 200211744

Change-Id: I783f93a40f828784c181731cf21f6fcc9c95d718
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1178848
GVS: Gerrit_Virtual_Submit
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
7 years agovideo: tegra: dc: HDMI SPD InfoFrame support
Ahung Cheng [Tue, 21 Jun 2016 10:39:53 +0000 (18:39 +0800)]
video: tegra: dc: HDMI SPD InfoFrame support

Add support to send SPD over Generic InfoFrame.

Please be noted that once SPD InfoFrame support is
enabled, HDR InfoFrame will be disabled as only one
of them can use Generic InfoFrame at one time.

To enable SPD InfoFrame, please add this in kernel config
 CONFIG_TEGRA_HDMI_SPD_INFOFRAME=y

And add source product description format as below under
hdmi-display in device tree
spd-infoframe {
vendor-name = "XXX";
product-description = "YYY";
source-information = <N>;
};

bug 200211468

Change-Id: Ifa8e1f54e1cb64fd507a483b24f8962a96be180e
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1168466
(cherry picked from commit 5604cf8cbc53f91b6945cb933526249113fcbbe8)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1170967
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoarch: arm64: boot: dts: Remove barometer
Sunny Li [Wed, 29 Jun 2016 04:44:23 +0000 (12:44 +0800)]
arch: arm64: boot: dts: Remove barometer

Remove barometer override option in plugin-manager

Bug 200201316

Change-Id: I22bc7151e17ff07abdc18ddc7764ccac475875ca
Signed-off-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-on: http://git-master/r/1172923
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agoFix uninitialized variable
Joe Korty [Wed, 25 May 2016 12:52:48 +0000 (18:22 +0530)]
Fix uninitialized variable

drivers/staging/iio/meter/ina3221.c: In function
'ina3221_get_shuntv_offset':
drivers/staging/iio/meter/ina3221.c:1021:25: warning:
'offset' may be used uninitialized in this function
[-Wmaybe-uninitialized] shuntv_offset->offset = offset;

Bug 200187768

Change-Id: Iba86f1ed92ab10d702172f577ea59848d337e0a1
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163938
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
7 years agopcie: host: tegra: fix l1ss programming
Vidya Sagar [Tue, 5 Jul 2016 10:19:52 +0000 (15:49 +0530)]
pcie: host: tegra: fix l1ss programming

L1SS configuration parameters need to be programmed
only for Tegra root ports and immediate devices (EP/UP port).
This change fixes the unwanted programming being done
to other devices apart from the ones mentioned above

Bug 200215912

Change-Id: Id8d8ec9952f3c7f7249de0f5c2ed244721e2fb57
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1175569
(cherry picked from commit a006e75c1e505eb66386f8be24682d515f726111)
Reviewed-on: http://git-master/r/1176200
(cherry picked from commit 21f3796d6522578736342798947b1c99eec41c94)
Reviewed-on: http://git-master/r/1176996
(cherry picked from commit 0e20e95939447170b88b63bdb4a2365f07127bc6)
Reviewed-on: http://git-master/r/1178428
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agopcie: host: tegra: re-org L1SS reg programming
Vidya Sagar [Wed, 15 Jun 2016 16:13:13 +0000 (21:43 +0530)]
pcie: host: tegra: re-org L1SS reg programming

performs all L1SS registers programming before L1SS is
enabled by kernel

Bug 200210426

Change-Id: I48fe1a31933b9dfa9733b2550b1555db9be568b2
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165056
(cherry picked from commit 931881c4ce318b8d6b42db2300347db8546994ae)
Reviewed-on: http://git-master/r/1172629
(cherry picked from commit 67ad51482f14086c84986b2bf7eed9ff1d18a342)
Reviewed-on: http://git-master/r/1178427
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agoPCI: save and restore L1-SS registers
Vidya Sagar [Wed, 16 Dec 2015 08:17:56 +0000 (13:47 +0530)]
PCI: save and restore L1-SS registers

saves and restores L1 PM-SS registers during suspend and resume
this makes sure consistency of L1SS states across suspend/resume
cycle

Bug 200161255

Change-Id: I68b25e9433d0f08e4fadbe4547db7fb811f59462
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/923504
(cherry picked from commit 39530fa01a94d0f57f5fbb0febc56ac33f8e0024)
Reviewed-on: http://git-master/r/1165055
(cherry picked from commit 7db113ba07654ce0494b96fd2eb8bf2c3dd02407)
Reviewed-on: http://git-master/r/1172628
(cherry picked from commit 7348b2855df4c29c964b33db08d1687ed6c0d216)
Reviewed-on: http://git-master/r/1178426
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agoPCI: Add support for save/restore of extended capabilities
Alex Williamson [Tue, 17 Dec 2013 23:43:45 +0000 (16:43 -0700)]
PCI: Add support for save/restore of extended capabilities

Current save/restore is specific to standard capabilities.

Bug 200210426

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit fd0f7f73ca96bb0f8723b5e59759ad43bab88954)

Change-Id: I58e5d0ea452947d329e099ba54fa9059370693fc
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165054
(cherry picked from commit 61353ada0c3cae8f9302766b06158582387151f2)
Reviewed-on: http://git-master/r/1172627
(cherry picked from commit 8a2e41a87a7426c16916688205c31996422efa04)
Reviewed-on: http://git-master/r/1178425
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agoPCI: Fix comment typo for pci_add_cap_save_buffer()
Yijing Wang [Thu, 1 Aug 2013 13:05:27 +0000 (21:05 +0800)]
PCI: Fix comment typo for pci_add_cap_save_buffer()

Fix trivial comment typo for pci_add_cap_save_buffer().

Bug 200210426

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit ce1be10bf6dc8406ae773f0ac6265585a4154d37)

Change-Id: I7c657211f6c230ad2ac216f8539ade8205964626
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165053
(cherry picked from commit 791fe08f3aff6b141b4f406b394f8cc275665f5f)
Reviewed-on: http://git-master/r/1172626
(cherry picked from commit f47fc199c5f0ab097739361df2981ab71607119f)
Reviewed-on: http://git-master/r/1178424
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agopcie: host: tegra: disable aspm-l0s by default
Vidya Sagar [Mon, 2 Nov 2015 09:20:51 +0000 (14:50 +0530)]
pcie: host: tegra: disable aspm-l0s by default

disables aspm-l0s state by default except for those
which are whitelisted.
It also disables CLK-PM if the end point isn't pulling
clkreq down

Bug 200151223
Bug 1687368

Change-Id: I594888b63a9e3b45fff61871b40bca623998e9e4
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/826164
(cherry picked from commit fed09295fc4e5182c94414ef59d27ba48fdae44e)
Reviewed-on: http://git-master/r/831188
(cherry picked from commit 2bc1e873f28d2dbb469ae916cd34bcf2caa54f13)
Reviewed-on: http://git-master/r/1165052
(cherry picked from commit c321a58efb4193a4f46a67553bb4fe03519517f6)
Reviewed-on: http://git-master/r/1172625
(cherry picked from commit a80880386b5066c1c1f58b55e1ec7af6b06600ca)
Reviewed-on: http://git-master/r/1178423
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agoPCI/ASPM: enable aspm-l1ss support
Vidya Sagar [Mon, 19 Oct 2015 16:05:02 +0000 (21:35 +0530)]
PCI/ASPM: enable aspm-l1ss support

enables ASPM-L1 sub-states support

Bug 200143430

Change-Id: I236d09df6ea63d4ae72ff99d976026cc9a1ba933
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/819699
(cherry picked from commit c29c8155a63cf296905aa04f2ed1c0382ade2a56)
Reviewed-on: http://git-master/r/822729
(cherry picked from commit 53c3407b88d0964ca9f8653bb3901ccf623d43d9)
Reviewed-on: http://git-master/r/1165051
(cherry picked from commit 4aed2786b41ea74bb6a503674b192f15275baeb7)
Reviewed-on: http://git-master/r/1172624
(cherry picked from commit c0256dde68fb20a33554308e7b9e40fc5e1e5a92)
Reviewed-on: http://git-master/r/1178422
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agopcie: host: tegra: fix aspm-l1ss enabling
Vidya Sagar [Fri, 23 Oct 2015 08:12:24 +0000 (13:42 +0530)]
pcie: host: tegra: fix aspm-l1ss enabling

fixes the way aspm-l1ss gets enabled when multiple
pcie end points are connected

Bug 200143430

Change-Id: I1dc7fadb7092e8251378a84c3e4df538e5423d3e
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/821939
(cherry picked from commit 1f8efcf7faafd3641e9e2dfcb2d1956ff5926017)
Reviewed-on: http://git-master/r/822730
(cherry picked from commit 3c23d02d338c2b616966a4567be07e208fcb0541)
Reviewed-on: http://git-master/r/1165050
(cherry picked from commit 61004b3d58110509c749a7574d3b53297f133e96)
Reviewed-on: http://git-master/r/1172623
(cherry picked from commit 11eeeace1b24a51d1be05eb9b052500ef8ea2d71)
Reviewed-on: http://git-master/r/1178421
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agoRevert "pcie: host: tegra: cleanup clkreq dir programming"
Vidya Sagar [Tue, 28 Jun 2016 17:32:50 +0000 (23:02 +0530)]
Revert "pcie: host: tegra: cleanup clkreq dir programming"

This reverts commit b57a2766df3545d7f0f3d4229830369643bc18de.

This will be fixed properly along with other fixes in
http://git-master/r/#/c/1172629/

Bug 200210426

Change-Id: I1b11160d333f4957c1ac0296c804cc2379cb9923
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1172622
(cherry picked from commit 9b9c524437b958d186728c224393531a1e04f634)
Reviewed-on: http://git-master/r/1178420
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agoFix improper 'const' propagation
Joe Korty [Wed, 25 May 2016 12:51:19 +0000 (18:21 +0530)]
Fix improper 'const' propagation

It turns out that data 'data' points to
is always constant, so we can declare that
the pointer 'data' points to constant data
without problem.

drivers/net/wireless/iwlwifi/mvm/fw.c:90:64: warning:
initialization discards 'const' qualifier from
pointer target type [-Wdiscarded-array-qualifiers]
{.size = sizeof(_buf), .data = &_buf}
                                                                ^
drivers/net/wireless/iwlwifi/mvm/fw.c:93:8: note:
in expansion of macro 'CALIB_SIZE_N_DATA'
[9] = CALIB_SIZE_N_DATA(wkp_calib_values_tx_iq_skew),

drivers/net/wireless/iwlwifi/mvm/fw.c:90:64: warning:
initialization discards 'const' qualifier from
pointer target type [-Wdiscarded-array-qualifiers]

drivers/net/wireless/iwlwifi/mvm/fw.c:94:9: note:
in expansion of macro 'CALIB_SIZE_N_DATA'
[11] = CALIB_SIZE_N_DATA(wkp_calib_values_rx_iq_skew),

Bug 200187768

Change-Id: Ib1d0dbd3b44238feb39f54d1ebff00c2edd09254
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163937
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agodrivers: imx219: Fix power on sequence
Bhanu Murthy V [Wed, 15 Jun 2016 23:19:46 +0000 (16:19 -0700)]
drivers: imx219: Fix power on sequence

Fix the delay and order for the power on
sequence for IMX219 driver.

Bug 200210065

Change-Id: I55e1ac469c43b3f39739612f730bb9f64c20738f
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1165292
(cherry picked from commit afae6029c0334537d3ca93784685bfaee41cc50d)
Reviewed-on: http://git-master/r/1177913
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
7 years agomedia: tegra_camera: add SoC fops for CSI
Bryan Wu [Sat, 18 Jun 2016 00:16:13 +0000 (17:16 -0700)]
media: tegra_camera: add SoC fops for CSI

Add an SoC abstraction layer for for CSI which can be extended to
support different Tegra SoC in the future. Now start with T210.

Bug 1779020

Change-Id: I7c081ccb008bb7775591300495154aaf4505aee5
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1169883
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
7 years agomedia: tegra_camera: add SoC fops for VI
Bryan Wu [Fri, 17 Jun 2016 20:29:48 +0000 (13:29 -0700)]
media: tegra_camera: add SoC fops for VI

Add an SoC abstraction layer for for VI which can be extended to
support different Tegra SoC in the future. Now start with T210.

Bug 1779020

Change-Id: I29a8388f9343a1ffc895148b8ffb36c18d7f5c19
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1169882
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
7 years agonet: wireless: bcmdhd: reduce packet timeout to 100ms
Leo He [Fri, 4 Mar 2016 02:57:30 +0000 (02:57 +0000)]
net: wireless: bcmdhd: reduce packet timeout to 100ms

bug 200153029

This packet timeout prevents system entering suspend.
This 500ms timeout is too long, which will slow
resume/suspend cycle in WiFi wakeup, so reducing it to 100ms.
Also, BRCM confirmed that it's safe to remove this timeout.

Change-Id: I62dd11e292d3c9fbfe959d76fc510c2115958b7e
Signed-off-by: Leo He <leoh@nvidia.com>
Reviewed-on: http://git-master/r/1023810
(cherry picked from commit e1395c20bf28b4eb5412534d46da9949db6cc8a0)
Reviewed-on: http://git-master/r/1176046
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agoarm64: dts: wdr/non-wdr 30fps modes for imx185
esen chen [Mon, 13 Jun 2016 08:52:41 +0000 (16:52 +0800)]
arm64: dts: wdr/non-wdr 30fps modes for imx185

for modes:
IMX185_MODE_1920X1080_CROP_30FPS
IMX185_MODE_1920X1080_CROP_HDR_30FPS

Bug 200168141

Change-Id: If4cbd3e40178596d90b7909de34b0464f2438b4e
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1163236
(cherry picked from commit a332e5ea8e86133436c4ad39a1f1141b4135c70a)
Reviewed-on: http://git-master/r/1174274
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
7 years agodriver: media: i2c: update imx185 driver
esen chen [Fri, 1 Jul 2016 02:01:21 +0000 (10:01 +0800)]
driver: media: i2c: update imx185 driver

Added proper equation to translate gain
Update imx185 sensor mode table

Bug 1744523
Bug 200168141

Change-Id: I806a833f5e055c5660f3151562fcd28f622573bc
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1174271
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
7 years agovideo: tegra: dc: fix bit depth of yuv422 mode
Michael Frydrych [Fri, 17 Jun 2016 14:39:30 +0000 (17:39 +0300)]
video: tegra: dc: fix bit depth of yuv422 mode

Bit depth of yuv422 mode was set to 10-bits, while it should
have been set to 12-bits. Incorrect bit depth resulted in the
mode not being intercepted when setting yuv422 black.

Bug 200102634
Bug 200182153

Change-Id: I6de42816a9aad92bc2c8bdfad70b1727a49fe94a
Signed-off-by: Michael Frydrych <mfrydrych@nvidia.com>
Reviewed-on: http://git-master/r/1167820
(cherry picked from commit 39aabae1c46710a5dd609690ab12746075640f7f)
Reviewed-on: http://git-master/r/1166991
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
7 years agoarch: arm64: kernel: disable the regs dump
Ninad Malwade [Tue, 28 Jun 2016 06:59:44 +0000 (14:59 +0800)]
arch: arm64: kernel: disable the regs dump

- When user space app tried to call a syscall
  which is not implemented in kernel, then
  it dumps the process name, syscall number
  and the registers along with PC and LR.
- This leads to kernel_warning GVS failures.
- Since, the regs dump is just for the
  information purspose, it's safe to ignore
  and thus, putting it under CONFIG_DEBUG_USER.
- This is surfaced while trying to port 16.04
  rootfs and it's a must change for switching.

Bug 1731796

Change-Id: I776dd9dccf4d75cca6a3541b7fb64afe37fc4fcb
Signed-off-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-on: http://git-master/r/1172352
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
7 years agoCast a 'void *' pointer to a 'char *'
Joe Korty [Wed, 25 May 2016 12:42:30 +0000 (18:12 +0530)]
Cast a 'void *' pointer to a 'char *'

It is clear from the below that we want to
reference the pointer as a character string,
so cast it as such before using it.

drivers/net/wireless/bcmdhd/dhd_common.c:429:30:
warning: dereferencing 'void *' pointer
     value = *(uint*)&ioc->buf[strlen(param)+1];

Bug 200187768

Change-Id: If6a6cc80b39b03709b55e9e2850e174886593fb6
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163934
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoPointers fit inside unsigned long
Joe Korty [Wed, 25 May 2016 12:12:43 +0000 (17:42 +0530)]
Pointers fit inside unsigned long

drivers/net/ethernet/smsc/smc91x.c:
In function 'smc_probe':
drivers/net/ethernet/smsc/smc91x.c:1899:7: warning:
cast from pointer to integer of
different size [-Wpointer-to-int-cast]
if (((unsigned int)ioaddr &
(0x3e0 << SMC_IO_SHIFT)) != val) {

Bug 200187768

Change-Id: I67b452a65f442bfe1b6fe6933a134638424c6acc
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163931
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoFix the return type explicitly
Joe Korty [Wed, 25 May 2016 12:08:14 +0000 (17:38 +0530)]
Fix the return type explicitly

gcc does not like longs being compared
to pointers; tell the compiler that this
is OK by hand-casting the long integer to
the required pointer type first.

kernel/sched/core.c: In function 'idle_cpu_relaxed':
kernel/sched/core.c:3863:39: warning:
comparison between pointer and integer
if (cpu_relaxed_read_long(&rq->curr) != rq->idle)

Bug 200187768

Change-Id: Ic6ea947cb4f0af9b24edaebbd2b32eb1a6dfedbe
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163929
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoFix the return type explicitly
Joe Korty [Wed, 25 May 2016 12:06:00 +0000 (17:36 +0530)]
Fix the return type explicitly

gcc does not like a long put into a pointer
without an explicit cast.

kernel/mutex.c: In function 'mspin_unlock':
kernel/mutex.c:155:17: warning:
assignment makes pointer from integer
without cast [-Wint-conversion]
while (!(next = cpu_relaxed_read_long(&(node->next))))

Bug 200187768

Change-Id: I5fb1da7fffb4f24173c8fd92ee0291ed1ed188e4
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163928
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoFix __init section mismatch in usb gadget driver
Joe Korty [Wed, 25 May 2016 09:08:19 +0000 (14:38 +0530)]
Fix __init section mismatch in usb gadget driver

gcc complains when __init variables or __init functions
are referenced from non-init code, as by the time the
non-init code is run, the __init variables and functions
it references might no longer exist.

Fix by removing the __init from the afunc_bind defition.
This allows it to be called from anywhere, anytime without
problem.

WARNING: drivers/usb/gadget/g_audio.o(.text+0x101c): Section
mismatch in reference from the function audio_bind_config()
to the function .init.text:afunc_bind()
The function audio_bind_config() references
the function __init afunc_bind().
This is often because audio_bind_config lacks a __init
annotation or the annotation of afunc_bind is wrong.

Bug 200187768

Change-Id: I3df30f66a100273b6b1d9b1a29a2ded022027690
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163919
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoCorrect variable declaration
Joe Korty [Wed, 25 May 2016 08:06:24 +0000 (13:36 +0530)]
Correct variable declaration

Fix variable declaration in the middle of a
block of C code.Add brackets to make the
declaration appear at the top of its own
subblock of code.

drivers/net/wireless/bcmdhd/dhd_linux.c:7143:2:
warning:ISO C90 forbids mixed declarations
and code [-Wdeclaration-after-statement]

Bug 200187768

Change-Id: I431a47b0c91f9ddf48d20a48d87f646b2f72cea6
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163918
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
7 years agoCorrect the declaration of variable
Joe Korty [Wed, 25 May 2016 07:51:40 +0000 (13:21 +0530)]
Correct the declaration of variable

Do not declare a variable in the middle of a
C code block.Moved the declaration to the front
of the block.

sound/soc/codecs/audience/es-d300.c:
In function '_es_stop_route':
sound/soc/codecs/audience/es-d300.c:294:4:
warning: ISO C90 forbids mixed declarations
and code [-Wdeclaration-after-statement]
u32 cmd = escore->dhwpt_cmd & 0xFFFF0000;

Bug 200187768

Change-Id: I45660f1d958ad56db3204da533791d324a5431a6
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163917
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoUse corretct format specifier
Joe Korty [Wed, 25 May 2016 07:38:03 +0000 (13:08 +0530)]
Use corretct format specifier

cur_state is of size long, not int,
so use %ld rather than %d to print it.

drivers/thermal/adaptive_skin.c:695:11: warning:
format '%d' expects argument of type 'int',
but argument 3 has type 'long unsigned int' [-Wformat=]

Bug 200187768

Change-Id: Ie3035384ae0c0e3358ae8ac0a7f402dcdbb202b5
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163916
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoFix integer size errors in printf format
Joe Korty [Wed, 25 May 2016 07:36:52 +0000 (13:06 +0530)]
Fix integer size errors in printf format

drivers/mmc/core/debugfs.c:544:44: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
drivers/mmc/core/debugfs.c:553:45: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
drivers/mmc/core/debugfs.c:562:42: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]
drivers/mmc/core/debugfs.c:572:41: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int' [-Wformat=]

Bug 200187768

Change-Id: Iec7e0de8b01dac30713cb7e545b5ada98b5ffb1c
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163915
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoCorrect format specifier
Joe Korty [Wed, 25 May 2016 07:34:27 +0000 (13:04 +0530)]
Correct format specifier

%d -> %zd printk format statement transformation

sound/soc/codecs/audience/escore-vs.c:870:24:
warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t
{aka long unsigned int}' [-Wformat=]

Bug 200187768

Change-Id: I809a198fdb14a46dac1e9dbee89dda225b46df66
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163914
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoUse atomic_read to access atomic var
Joe Korty [Wed, 25 May 2016 07:32:13 +0000 (13:02 +0530)]
Use atomic_read to access atomic var

Also fix a few format statement mismatches,
%u -> %lu.

sound/soc/codecs/audience/es-d300.c:1317:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1332:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1355:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1386:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1398:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1412:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
sound/soc/codecs/audience/es-d300.c:1433:12: warning:
format '%d' expects argument of type 'int',
but argument 5 has type 'atomic_t
{aka struct <anonymous>}' [-Wformat=]
include/linux/kern_levels.h:4:18: warning:
format '%d' expects argument of type 'int',
but argument 4 has type 'long unsigned int' [-Wformat=]
include/linux/kern_levels.h:4:18: warning:
format '%d' expects argument of type 'int',
but argument 4 has type 'long unsigned int' [-Wformat=]

.... plus others, most %d -> %zd transformations.

Bug 200187768

Change-Id: I891f626c63343ada222ea6375213a799a6262ff2
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163913
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoCorrect format specifier
Joe Korty [Wed, 25 May 2016 07:29:05 +0000 (12:59 +0530)]
Correct format specifier

d -> %zd format statement transformation, fixes

sound/soc/codecs/audience/es755.c:
In function 'codec_reg_dump_store':
sound/soc/codecs/audience/es755.c:528:11:
warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t
{aka long unsigned int}' [-Wformat=]
pr_debug("%s(): requested - %s, count=%d\n",
__func__, buf, count);

Bug 200187768

Change-Id: I661f46104bc6740e993e84f95b575719d7978733
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163912
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agopr_err requires size_t be printed with %zu
Joe Korty [Wed, 25 May 2016 07:27:18 +0000 (12:57 +0530)]
pr_err requires size_t be printed with %zu

drivers/usb/gadget/rndis.c:
In function 'rndis_rm_hdr':
include/linux/kern_levels.h:4:18: warning:
format '%u' expects argument of type 'unsigned int',
but argument 3 has type 'long unsigned int' [-Wformat=]

Bug 200187768

Change-Id: Ie44cf041e9f814e607d6f91949f64b1a1e9e6cd6
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163911
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agolongs are printed with %lx
Joe Korty [Wed, 25 May 2016 07:22:41 +0000 (12:52 +0530)]
longs are printed with %lx

sound/pci/hda/hda_intel.c:
In function 'azx_single_wait_for_response':
sound/pci/hda/hda_intel.c:208:13: warning:
format '%x' expects argument of
type 'unsigned int',
but argument 3 has type 'long unsigned int' [-Wformat=]

sound/pci/hda/hda_intel.c:1147:14:
note: in expansion of macro 'SFX'
snd_printd(SFX "%s: get_response timeout: IRS=0x%x\n",

sound/pci/hda/hda_intel.c:
In function 'azx_single_send_cmd':
sound/pci/hda/hda_intel.c:208:13: warning:
format '%x' expects argument of type 'unsigned int',
but argument 3 has type 'long unsigned int' [-Wformat=]

sound/pci/hda/hda_intel.c:1175:14:
note: in expansion of macro 'SFX'
snd_printd(SFX "%s: send_cmd timeout: IRS=0x%x, val=0x%x\n",

Bug 200187768

Change-Id: Ib8985940ea39544dea1075a2a6aa8f0a7006993f
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163910
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoPointer types are printed with %p
Joe Korty [Wed, 25 May 2016 07:19:59 +0000 (12:49 +0530)]
Pointer types are printed with %p

drivers/misc/gps/gps.c:828:3: note:
in expansion of macro 'GPS_DBG'
GPS_DBG("copy_to_user error: 0x%X 0x%X, %d\n",
(unsigned int)buf, (unsigned int)dev->dat_buf,
dev->dat_len);

Bug 200187768

Change-Id: Id0c634639e1a94639cc86051ce0b37dcaf1dfbd7
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163909
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agodrivers: IMX274: fix AE blink in manual exposure
Josh Kuo [Wed, 11 May 2016 06:57:04 +0000 (14:57 +0800)]
drivers: IMX274: fix AE blink in manual exposure

- remove digital gain setting from mode tables
- set to 4k60fps

Bug 200192121

Change-Id: I6bcfbed25d1eaba842adef446561891bff50ca2b
Signed-off-by: Josh Kuo <joshk@nvidia.com>
Reviewed-on: http://git-master/r/1166527
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agoCorrect g_ether module init & exit fn
Joe Korty [Wed, 25 May 2016 11:55:45 +0000 (17:25 +0530)]
Correct g_ether module init & exit fn

Replace u_ether.c's use of __initcall and __exitcall
with direct invocations of its init and exit function
from ether.c's module_init and module_exit functions.

We have to do this as 1) __initcall cannot be used
from within a module, and 2) module_init cannot be
declared more than once inside any .c file, and
3) ether.c #includes u_ether.c.

Fortunately, ether.c unconditionally includes u_ether.c,
so we can unconditionally add the u_ether.c's init code
directly to ether.c's init function.

include/linux/init.h:298:27:
error: redefinition of '__inittest'
static inline initcall_t __inittest(void)

include/linux/init.h:291:30: note:
in expansion of macro 'module_init'

drivers/usb/gadget/u_ether.c:1216:1: note:
in expansion of macro 'device_initcall'
device_initcall(gether_exit);

include/linux/init.h:298:27: note:
previous definition of '__inittest' was here
static inline initcall_t __inittest(void)

include/linux/init.h:291:30: note:
in expansion of macro 'module_init'

drivers/usb/gadget/u_ether.c:1209:1: note:
in expansion of macro 'device_initcall'
device_initcall(gether_init);

drivers/usb/gadget/u_ether.c: In function '__inittest':
drivers/usb/gadget/u_ether.c:1216:17: warning:
return from
incompatible pointer type [-Wincompatible-pointer-types]
device_initcall(gether_exit);

include/linux/init.h:299:11:
note: in definition of macro 'module_init'
  { return initfn; }

Bug 200187768

Change-Id: I37262041ae79aa2c1672499f735517b53ae5fc45
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163924
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
7 years agoFix the explicit cast
Joe Korty [Wed, 25 May 2016 12:15:05 +0000 (17:45 +0530)]
Fix the explicit cast

gcc requires that when an integer value is being
returned through a pointer, that value be explicity
cast first to a pointer type.

drivers/usb/gadget/u_ether.c:
In function 'gether_setup_name':
drivers/usb/gadget/u_ether.c:963:24: warning:
return makes pointer from integer
without a cast [-Wint-conversion]
return -ENOMEM;

Bug 200187768

Change-Id: I19d6abbd12c812779587fd097a3277ca3f91caf4
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163932
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
7 years agoFix unwanted #ifdef in swtich case
Joe Korty [Wed, 25 May 2016 12:04:04 +0000 (17:34 +0530)]
Fix unwanted #ifdef in swtich case

SCAN_SUSPEND_ABORT is always defined in the
enumeration,so no need to '#ifdef' out its
use in those kernels for which this feature
is not compiled in.

net/mac80211/scan.c: In function 'ieee80211_scan_work':
net/mac80211/scan.c:758:3: warning:
enumeration value 'SCAN_SUSPEND_ABORT'
not handled in switch [-Wswitch]
switch (local->next_scan_state) {

Bug 200187768

Change-Id: Ic30505196c5e676b10be64ed5e4d4e16d77c5b30
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163927
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoInclude required header file
Joe Korty [Wed, 25 May 2016 12:02:34 +0000 (17:32 +0530)]
Include required header file

Insert missing include file, felt
when CONFIG_COMPAT=n

drivers/devfreq/governor_wmark_active.c:
In function 'devfreq_watermark_target_freq':
drivers/devfreq/governor_wmark_active.c:146:25:
error: implicit declaration of function
'ktime_get' [-Werror=implicit-function-declaration]
ktime_t current_time = ktime_get();

drivers/devfreq/governor_wmark_active.c:146:25:
error: invalid initializer

Bug 200187768

Change-Id: I0b2deda3cbbc9b2af5c4846e0a20614eadb04353
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163926
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoInclude the required header file
Joe Korty [Wed, 25 May 2016 11:58:40 +0000 (17:28 +0530)]
Include the required header file

Insert missing #include file, felt
when CONFIG_COMPAT=n.

drivers/firmware/tegra/bpmp.c:
In function 'bpmp_ping_show':
drivers/firmware/tegra/bpmp.c:465:7: error:
implicit declaration of
function 'ktime_get' [-Werror=implicit-function-declaration]
tm = ktime_get();

drivers/firmware/tegra/bpmp.c:465:5: error:
incompatible types when assigning to type 'ktime_t
{aka union ktime}' from type 'int'
tm = ktime_get();

include/linux/ktime.h:85:30: error: request for member
'tv64' in something not a structure or union
({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; })
                              ^
drivers/firmware/tegra/bpmp.c:468:7: note: in expansion
of macro 'ktime_sub'
tm = ktime_sub(ktime_get(), tm);

Bug 200187768

Change-Id: I4c355276560971eb98ab1ffa87713e665d857457
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163925
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoFix trace_sched_switch_end definition
Gaurav Singh [Wed, 25 May 2016 11:46:34 +0000 (17:16 +0530)]
Fix trace_sched_switch_end definition

We model what we do here on other empty (no arg)
tracepoint function definitions in the kernel.

In file included from include/trace/define_trace.h:86:0,
from include/trace/events/sched.h:452,
from kernel/sched/core.c:94:
include/trace/events/sched.h:
In function 'ftrace_define_fields_sched_switch_end':
include/trace/ftrace.h:327:27:
warning: unused variable 'field' [-Wunused-variable]
struct ftrace_raw_##call field;

include/trace/ftrace.h:32:2:
note: in expansion of macro 'DECLARE_EVENT_CLASS'
DECLARE_EVENT_CLASS(name,

include/trace/events/sched.h:155:1:
note: in expansion of macro 'TRACE_EVENT'
TRACE_EVENT(sched_switch_end,

Bug 200187768

Change-Id: I4d5a2b4717d62ca90018d0e3847c185d7cc590ac
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163923
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoFix return type of xchg()
Joe Korty [Wed, 25 May 2016 09:17:20 +0000 (14:47 +0530)]
Fix return type of xchg()

The kernel does not like it when the return
value of xchg() is not being used, so tell
it when that is indeed the proper use.

drivers/media/platform/tegra/camera.c:
In function 'camera_remove':
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/cmpxchg.h:75:3:
warning: value computed is not used [-Wunused-value]
((__typeof__(*(ptr)))__xchg((unsigned long)(x),
(ptr),sizeof(*(ptr))))

/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/atomic.h:198:30:
note: in expansion of macro 'xchg'

drivers/media/platform/tegra/camera.c:1201:2:
note: in expansion of macro 'atomic_xchg'
atomic_xchg(&cam_desc.in_use, 0);

drivers/media/platform/tegra/camera.c:
In function 'camera_shutdown':
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/cmpxchg.h:75:3:
warning: value computed is not used [-Wunused-value]
((__typeof__(*(ptr)))__xchg((unsigned long)(x),
(ptr),sizeof(*(ptr))))

Bug 200187768

Change-Id: Iacc15eec6ab5e72dd3d671376a68971bd307fac3
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163922
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoCorrect arguments declaration
Joe Korty [Wed, 25 May 2016 09:13:55 +0000 (14:43 +0530)]
Correct arguments declaration

include/linux/spinlock.h:198:3: note:
in expansion of macro 'typecheck'
typecheck(unsigned long, flags);

include/linux/spinlock.h:323:2: note:
in expansion of macro 'raw_spin_lock_irqsave'
raw_spin_lock_irqsave(spinlock_check(lock), flags);

drivers/mmc/core/core.c:407:2: note:
in expansion of macro 'spin_lock_irqsave'
spin_lock_irqsave(&host->que_lock, flags);

include/linux/typecheck.h:11:18: warning:
comparison of distinct pointer types lacks a cast
(void)(&__dummy == &__dummy2);
                  ^
include/linux/spinlock.h:198:3: note:
in expansion of macro 'typecheck'
typecheck(unsigned long, flags);

include/linux/spinlock.h:323:2: note:
in expansion of macro 'raw_spin_lock_irqsave'
raw_spin_lock_irqsave(spinlock_check(lock), flags);

drivers/mmc/core/core.c:480:2: note:
in expansion of macro 'spin_lock_irqsave'
spin_lock_irqsave(&host->que_lock, flags);

Bug 200187768

Change-Id: I1340ceda88676f6f3a7ce95d951dee187fffba96
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163921
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agofix incompatible ptr type
Joe Korty [Wed, 25 May 2016 09:12:26 +0000 (14:42 +0530)]
fix incompatible ptr type

The '&length' argument must be a long*, not an int*.

drivers/of/of_reserved_mem.c:215:54: warning:
passing argument 3 of 'of_get_flat_dt_prop' from
incompatible pointer type [-Wincompatible-pointer-types]
drivers/of/of_reserved_mem.c:215:54: warning:
passing argument 3 of 'of_get_flat_dt_prop' from
incompatible pointer type [-Wincompatible-pointer-types]
prop = of_get_flat_dt_prop(node, "linux,phandle", &len);

In file included from drivers/of/of_reserved_mem.c:18:0:
include/linux/of_fdt.h:88:14: note:
expected 'long unsigned int *' but argument is of type 'int *'
extern void *of_get_flat_dt_prop(unsigned long node,
const char *name,

Bug 200187768

Change-Id: Iaa3a60a9fbae620d21fb21d779ccd3e2c1229d6f
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163920
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoPrint size_t variables with %zd
Joe Korty [Wed, 25 May 2016 07:17:45 +0000 (12:47 +0530)]
Print size_t variables with %zd

size_t variables to be used with %zd,
not %d and %zu, not %u.

Bug 200187768

Change-Id: I824f88635de1cddeaaa74f7031f88f91788fb3a1
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163908
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoFormat size_t with %zd, not %d
Joe Korty [Wed, 25 May 2016 07:12:50 +0000 (12:42 +0530)]
Format size_t with %zd, not %d

drivers/media/platform/tegra/ov9772.c:2223:3:
note: in expansion of macro 'dev_dbg'
dev_dbg(&info->i2c_client->dev, "%s CAPS_RD n=%d\n",

Bug 200187768

Change-Id: I88c9ca52ab9b0387a92ff6046e7518ecca59c354
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163907
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoCorrect format specifier
Joe Korty [Wed, 25 May 2016 06:48:55 +0000 (12:18 +0530)]
Correct format specifier

u64 data types are displayed with %llu, not %u

drivers/mmc/core/debugfs.c:498:39: warning:
format '%u' expects argument of type 'unsigned int',
but argument 2 has type 'long long unsigned int'
[-Wformat=] mmc_dbg_card_speed_class_get, NULL, "%u\n");
                                       ^
include/linux/fs.h:2667:29: note:
in definition of macro 'DEFINE_SIMPLE_ATTRIBUTE'
  __simple_attr_check_format(__fmt, 0ull);  \

Bug 200187768

Change-Id: I6bfabdf34eb318320a85ad30c2a1fb3f6afd0193
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163905
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoCorrect format specifier
Joe Korty [Wed, 25 May 2016 06:45:43 +0000 (12:15 +0530)]
Correct format specifier

Use %zd, not %d, for display of size_t in printk's

drivers/tty/tty_buffer.c:
In function 'tty_insert_flip_string_fixed_flag_lock':
include/linux/kern_levels.h:4:18: warning:
format '%d' expects argument of type 'int', but
argument 3 has type 'size_t {aka long unsigned int}'
[-Wformat=]

drivers/tty/tty_buffer.c:354:4: note: in expansion of
macro 'pr_err'
pr_err("%s: No space: Requested %d, memory used: %d\n",

Bug 200187768

Change-Id: I5c8937a4786343325231800d7be58ef0205aae6f
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163904
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoRemove unused variable 'p_cmd'
Joe Korty [Wed, 25 May 2016 06:44:00 +0000 (12:14 +0530)]
Remove unused variable 'p_cmd'

sound/soc/codecs/audience/escore.c:
In function 'escore_wakeup':
sound/soc/codecs/audience/escore.c:830:6:
warning: unused variable 'p_cmd' [-Wunused-variable]
u32 p_cmd = ES_GET_POWER_STATE << 16;

Bug 200187768

Change-Id: I17b73812270cc1c0610516009c8f64fa7f14eb6d
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163903
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoRemove unused variable
Joe Korty [Wed, 25 May 2016 06:42:14 +0000 (12:12 +0530)]
Remove unused variable

net/core/sysctl_net_core.c:24:12:
warning: 'one' defined but not used [-Wunused-variable]

Bug 200187768

Change-Id: I07436c7ac789ad6a7fe9fbbb2019b24df82cabbc
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163902
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoGive ampud_status an initial value of zero.
Joe Korty [Wed, 25 May 2016 06:40:39 +0000 (12:10 +0530)]
Give ampud_status an initial value of zero.

It is not actually used anywhere its value
is passed to, so any value would do.

drivers/net/wireless/iwlwifi/mvm/rx.c:
In function 'iwl_mvm_rx_rx_mpdu':
drivers/net/wireless/iwlwifi/mvm/rx.c:362:2:
warning: 'ampdu_status' may be used uninitialized
in this function [-Wmaybe-uninitialized]
iwl_mvm_pass_packet_to_mac80211(mvm, hdr, len, ampdu_status,

Bug 200187768

Change-Id: Ie30c23dd8fbcb8c1e5851cdf69b56666df302ce0
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163901
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoRemove unused label
Joe Korty [Wed, 25 May 2016 06:39:09 +0000 (12:09 +0530)]
Remove unused label

net/wireless/nl80211.c:
In function 'cfg80211_ch_switch_notify':
net/wireless/nl80211.c:10425:1: warning:
label 'out' defined but not used [-Wunused-label]

Bug 200187768

Change-Id: Ida1bd16d9afdc976d4aab77875975d613d23b2ee
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163900
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoUse #ifdef for the functions
Joe Korty [Wed, 25 May 2016 06:37:28 +0000 (12:07 +0530)]
Use #ifdef for the functions

Put the same '#ifdef' around the definition of
a function that is present around its use, so
that both definition and use are either present
or not present in the resulting binary.

drivers/base/cpu.c:291:12: warning:
'cpu_uevent' defined but not used [-Wunused-function]

Bug 200187768

Change-Id: I44201a9561ab7407777fb40134306b1c2868ea4f
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163899
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoFix minor gcc problems in rtrace.c
Joe Korty [Wed, 25 May 2016 06:35:04 +0000 (12:05 +0530)]
Fix minor gcc problems in rtrace.c

1) when storing a pointer into an int,
tell the compiler that this
is OK by casting the pointer first to an int.

2) remove unused variable 'phys'.
This is not being used even under #ifdef.

fs/pstore/rtrace.c:58:13: warning: assignment makes
integer from pointer without a cast [-Wint-conversion]
fs/pstore/rtrace.c:48:16: warning:
unused variable 'phys' [-Wunused-variable]

Bug 200187768

Change-Id: I590fe1f4b1af24e2ac9fd7f023a06c8a49f1b4bc
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163898
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoRemove unused label
Joe Korty [Tue, 24 May 2016 11:19:08 +0000 (16:49 +0530)]
Remove unused label

Wunused-label is a stupid gcc option as removing the
warnings it produces often makes the code harder to
read. But such is life ....

fs/pstore/ram.c:633:1: warning: label 'fail_init_fprz'
defined but not used [-Wunused-label]
fs/pstore/ram.c:629:1: warning: label 'fail_init_mprz'
defined but not used [-Wunused-label]

Bug 200187768

Change-Id: Ia9756fc029cf5882ee89fb871aabecae036d439a
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163897
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoDelete unused function.
Joe Korty [Tue, 24 May 2016 11:01:23 +0000 (16:31 +0530)]
Delete unused function.

Clearly, the intent at one time was for it to be used,
but either the code that used it got deleted, or
compat_binfmt_elf.c never got the feature that was
expected to use it.

fs/compat_binfmt_elf.c: At top level:
fs/compat_binfmt_elf.c:58:13: warning:
'cputime_to_compat_timeval' defined but not used
[-Wunused-function]
static void cputime_to_compat_timeval(const cputime_t cputime,

Bug 200187768

Change-Id: I23eaf92cc988105e559b67238799d864bd62600f
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163896
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoRemove unused label
Joe Korty [Tue, 24 May 2016 10:53:38 +0000 (16:23 +0530)]
Remove unused label

drivers/mmc/core/debugfs.c:
In function 'mmc_get_ext_csd_byte_val':
drivers/mmc/core/debugfs.c:519:1: warning:
label 'out_free' defined but not used
[-Wunused-label] out_free:

Bug 200187768

Change-Id: I7c16c6ab716032dc1c894d81c3f564426210b2fc
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163895
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoMove 'unused' var inside the '#if' stmts
Joe Korty [Tue, 24 May 2016 10:47:43 +0000 (16:17 +0530)]
Move 'unused' var inside the '#if' stmts

drivers/net/ethernet/smsc/smsc911x.c:
In function 'smsc911x_enable_resources':
drivers/net/ethernet/smsc/smsc911x.c:381:24: warning:
unused variable 'pdata' [-Wunused-variable]
struct smsc911x_data *pdata = netdev_priv(ndev);

drivers/net/ethernet/smsc/smsc911x.c:
In function 'smsc911x_disable_resources':
drivers/net/ethernet/smsc/smsc911x.c:406:21: warning:
unused variable 'ndev' [-Wunused-variable]
struct net_device *ndev = platform_get_drvdata(pdev);

drivers/net/ethernet/smsc/smsc911x.c:
In function 'smsc911x_disable_resources':
drivers/net/ethernet/smsc/smsc911x.c:407:24: warning:
unused variable 'pdata' [-Wunused-variable]
struct smsc911x_data *pdata = netdev_priv(ndev);

Bug 200187768

Change-Id: I7eaf5fd777dd675ad3e6800a57f29e94e96a045a
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163894
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agovideo: tegra: nvmap: remove nvmap_vm_insert_handle()
Sri Krishna chowdary [Tue, 21 Jun 2016 14:34:46 +0000 (20:04 +0530)]
video: tegra: nvmap: remove nvmap_vm_insert_handle()

Inserting new pages in a handle to a vma does not seem
to improve perf in most cases and so is more like overhead.
Remove this path. Accounting dirty pages should not hold
handle lock again from within nvmap_handle_mk(), so add
an argument to it to avoid taking the lock again from
_nvmap_handle_mkdirty().

This also avoids a coverity defect.

Coverity ID 32110

bug 200174682

Change-Id: I0a04f554dda1aa2f27dd81fcae08b7dc8adfe249
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
(cherry picked from commit 3a959fad6c958c0572b7a216168558382c029391)
Reviewed-on: http://git-master/r/1170230
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
7 years agovideo: tegra: nvmap: optimize handle mk clean/dirty operations
Sri Krishna chowdary [Fri, 11 Mar 2016 17:35:50 +0000 (23:05 +0530)]
video: tegra: nvmap: optimize handle mk clean/dirty operations

When handle has all clean pages, avoid any further clean operation.
Similarly for dirty pages. This avoids any unnecessary overeheads
in empty cuda kernel launch whose buffer is not accessed by cpu
before passing to GPU.

bug 200174682

Change-Id: Iac40de5b6d07a5abc6590647665768fd1965a130
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1029688
(cherry picked from commit 244bb96eda9fab1ad21779a07c32f5ad91fc71b8)
Reviewed-on: http://git-master/r/1170229
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
7 years agoarm64: config: update l4t defconfig
Bibek Basu [Wed, 29 Jun 2016 10:30:18 +0000 (16:00 +0530)]
arm64: config: update l4t defconfig

Enable support for EXT2 FS and disable Preempt
Traces
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
-CONFIG_PREEMPT_TRACER=y

Boot.img size is increased by 65280 bytes.

Bug 200190777

Change-Id: Ia8c6141fe96b03f7d835ac1098c6a8956cf3b658
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1173084
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
7 years agoARM64: add Docker related options
Bryan Wu [Mon, 27 Jun 2016 18:04:40 +0000 (11:04 -0700)]
ARM64: add Docker related options

boot.img size is increased by 332000 bytes.

Bug 1767148

Change-Id: I200ef9826456e29741d08c00784f353945191bfb
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1171967
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agomm: remove memcg oom killer sync up with upstream
Bryan Wu [Fri, 24 Jun 2016 21:54:44 +0000 (14:54 -0700)]
mm: remove memcg oom killer sync up with upstream

This memcg oom killer code was removed in upstream stable tree, but
still keep that. After enabling CONFIG_MEMCG in kernel, kernel booting
will give endless warning and system is not usable.

This patch fix this issue and it's required for using Docker on L4T

Bug 1767148

Change-Id: I50e60c7cd8e60fd1d757597d9260a9bee806e292
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1171277
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
7 years agokuid/kgid: fix building error when trying Docker
Bryan Wu [Fri, 24 Jun 2016 21:59:52 +0000 (14:59 -0700)]
kuid/kgid: fix building error when trying Docker

Docker requires CONFIG_UIDGID_STRICT_TYPE_CHECKS which will refine kuid
and kgid struct. Some old code needs to change to use
__kuid_val/__kgid_val, KUIDT_INIT()/KUIDT_INIT() and uid_eq(), otherwise
kernel will building fail.

Bug 1767148

Change-Id: I81f2b9c165ff85604566ee1aa719673fbbd93011
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1171276
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoALSA: HDA: wait for eld available
Bibek Basu [Mon, 6 Jun 2016 14:33:56 +0000 (20:03 +0530)]
ALSA: HDA: wait for eld available

If HDMI presence is detected successfully, wait for eld
data available in L4T.As L4T does not retry for pcm_open

Bug 200170726

Change-Id: I208b97db9f8610a1eb86004c87b357c926cf45e2
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1159086
(cherry picked from commit 84f925671c7b6be09aa44c1ca3c23ee4af6c5b40)
Reviewed-on: http://git-master/r/1170219
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shaunak Gupte <shaunakg@nvidia.com>
7 years agoHID: usbhid: more mice with ALWAYS_POLL
Oliver Neukum [Mon, 30 Mar 2015 10:36:35 +0000 (12:36 +0200)]
HID: usbhid: more mice with ALWAYS_POLL

[ Upstream commit 003e817a9ecf6cfded59630858bbf04056d71e9a ]

During a stress test these mice kept dropping and reappearing
in runlevel 1 as opposed to 5.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 6ec16957394dec27288a2e3ba1bb29486a5a4392 in mainline v3.18)

Bug 200094818

Change-Id: I8be974e95bd725d02eca356032f8beefcbfa6b37
Reviewed-on: http://git-master/r/1154423
(cherry picked from commit 5e0c951f85476c0f85725dec94cdb7797c241fab)
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1169174
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
7 years agoHID: usbhid: add always-poll quirk
Johan Hovold [Fri, 5 Sep 2014 16:08:47 +0000 (18:08 +0200)]
HID: usbhid: add always-poll quirk

Add quirk to make sure that a device is always polled for input events
even if it hasn't been opened.

This is needed for devices that disconnects from the bus unless the
interrupt endpoint has been polled at least once or when not responding
to an input event (e.g. after having shut down X).

Bug 200094818

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 0b750b3baa2d64f1b77aecc10f20deeb28efe60d in mainline v3.18)

Change-Id: I8220fa3c64b64b5fbadec0c3db231d1266342af4
Reviewed-on: http://git-master/r/1154422
(cherry picked from commit 75e507f9dee005fbfad7b88e0aa77a327b06f6bb)
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1169173
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
7 years agoRemove unused local variable
Joe Korty [Tue, 24 May 2016 09:11:05 +0000 (14:41 +0530)]
Remove unused local variable

Local variable 'name' is not used anywhere, remove it.

mm/vmscan.c: In function 'debug_shrinker_show':
mm/vmscan.c:171:8:
warning: unused variable 'name' [-Wunused-variable]
char name[64];

Bug 200187768

Change-Id: Ife9af1f65d78a3b9d9773a9090387011fd6c173e
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163892
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoRemove unused variable
Joe Korty [Tue, 24 May 2016 09:02:06 +0000 (14:32 +0530)]
Remove unused variable

local variable 'memcg_oom' is not used anywhere,
not even under an #ifdef, so remove it.

mm/filemap.c: In function 'filemap_fault':
mm/filemap.c:1632:7: warning: unused variable
'memcg_oom' [-Wunused-variable]
bool memcg_oom;

Bug 200187768

Change-Id: I7aa2ad38e2faee6d10106be6f0781e8bacb44c6c
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163891
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoTake care of unmet dependencies
Joe Korty [Tue, 24 May 2016 08:57:32 +0000 (14:27 +0530)]
Take care of unmet dependencies

warning: (ARCH_TEGRA_21x_SOC && ARCH_TEGRA_12x_SOC)
selects SKIP_LATE_PASR_SETUP which has unmet direct
dependencies (STAGING && PASR)

Bug 200187768

Change-Id: I9cf1252c333e1e41563987b742246580b661750e
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163890
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agodrivers/base/Kconfig: Correct bool string
Joe Korty [Tue, 24 May 2016 08:50:53 +0000 (14:20 +0530)]
drivers/base/Kconfig: Correct bool string

For config DMA_CMA, bool string was not correct as
multi-line strings are not supported.

Bug 200187768

Change-Id: I253746d3ef66629810413608d9c22535f03e7b85
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163889
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoRemove reference to HOTPLUG Kconfig var
Joe Korty [Tue, 24 May 2016 08:46:41 +0000 (14:16 +0530)]
Remove reference to HOTPLUG Kconfig var

The HOTPLUG Kbuild variable disappeared long ago from
Linux, but apparently not all references to it were
removed.  Remove the one causing the below Kbuild
warning.

warning: (PM_SLEEP_SMP) selects HOTPLUG_CPU which has
unmet direct dependencies (SMP && HOTPLUG)

Bug 200187768

Change-Id: I18e36442b50b43ded66aa555a03af35a9ee3fd3f
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163888
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
7 years agoarch: arm64: boot: dts: Fix 210 ERS power tree
Bhanu Murthy V [Mon, 20 Jun 2016 23:42:01 +0000 (16:42 -0700)]
arch: arm64: boot: dts: Fix 210 ERS power tree

Add the avdd-dsi-csi supply entry in power tree
under i2c.

Bug 1736471

Change-Id: I5c46316ca7ed130525420fde28560c84bf00361e
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1168105
Reviewed-by: Arun Kannan <akannan@nvidia.com>
Tested-by: Arun Kannan <akannan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agodrivers: media: camera: Fix sync for VI driver
Bhanu Murthy V [Thu, 16 Jun 2016 22:48:39 +0000 (15:48 -0700)]
drivers: media: camera: Fix sync for VI driver

Fix sync issues between the userspace capture and
kernel capture flow. In the userspace capture
flow the power cycle routines are being done twice.

Bug 200195506

Change-Id: I6fca04ec9c7a6605bd27269f555dd2798f608ce9
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1166235
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
7 years agowireless: bcmdhd: fix memory leak
Bhadram Varka [Wed, 22 Jun 2016 06:43:53 +0000 (12:13 +0530)]
wireless: bcmdhd: fix memory leak

Bug 1720381
Change-Id: I5d43870858ba02ee2fcf7d98e2c055a47dd91c82
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: http://git-master/r/1169183
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
7 years agovideo: tegra: nvmap: Replace zap with mprotect
Sri Krishna chowdary [Sat, 26 Mar 2016 09:47:37 +0000 (15:17 +0530)]
video: tegra: nvmap: Replace zap with mprotect

Despite zap being costly, zap was used as nvmap wants to be able
to disallow access to handle on any cpu access. Now this is made
available through a fixup_prot handler so a less costly operation
like mprotect can be used.

During NVMAP_PAGES_RESERVE operation, use mprotect to set
permissions to __P000.

On NVMAP_PAGES_UNRESERVE, just modify the vm_flags to allow nvmap
know about the first cpu access using fixup_prot handler and do
necessary cache operations. If fixup_prot returns true, the pte
will be fixed up with proper protections.

NVMAP_PAGES_INSERT_ON_UNRESERVE fixes up the pte protections as well.

Rename NVMAP_PAGES_ZAP_AND_CLEAN as NVMAP_PAGES_PROT_AND_CLEAN,
this is same as doing a NVMAP_PAGES_RESERVE followed by
NVMAP_PAGES_UNRESERVE.

Bug 200174682

Change-Id: I0a30deead282873d61bab96742fa840d89a40910
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1141807
(cherry picked from commit 47fdff3db8db53a6546953c41dcaa4132195b544)
Reviewed-on: http://git-master/r/1168481
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agovideo: tegra: nvmap: Add fixup_prot handler
Sri Krishna chowdary [Wed, 6 Apr 2016 09:19:48 +0000 (14:49 +0530)]
video: tegra: nvmap: Add fixup_prot handler

fixup_prot handler is added to be able to notify nvmap
about any user accesses when user ptes are marked with
_P000 protections. Nvmap allows fix up of protections
if the handle is not reserved and also performs necessary
cache flushes as applicable

JIRA TMM-59

Change-Id: I7089704d255d2539010e2bbc8b3d9871593932f2
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1141384
(cherry picked from commit e487ae65dc77c63080556a3278de2f3173712b53)
Reviewed-on: http://git-master/r/1168480
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agovideo: tegra: nvmap: force handle wide reserve operations
Sri Krishna chowdary [Tue, 26 Apr 2016 09:47:59 +0000 (15:17 +0530)]
video: tegra: nvmap: force handle wide reserve operations

This forces all supported reserve operations to be handle wide
operations. This will allow us to remove all zap and explicit insert
we do in nvmap. This will make us align more towards upstream.

bug 200174682

Change-Id: Id4b83a7bbce9ebeda75e8efaea8d487a5868eb3c
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1141382
(cherry picked from commit effbbdccf90eb22f9fe62e850c9b575e17430101)
Reviewed-on: http://git-master/r/1168479
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agovideo: tegra: nvmap: track reserve at handle level
Sri Krishna chowdary [Fri, 11 Mar 2016 07:18:35 +0000 (12:48 +0530)]
video: tegra: nvmap: track reserve at handle level

Reserve/unreserve entire handle at once. Remove the bookkeeping
operations which kept track of reserve/unreserve per page. This
avoiding some overhead involved in both reserve/unreserve operations.

bug 200174682

Change-Id: I16e4d298938d1854ce1cf34705ad1b4dbbf6eab1
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1130984
(cherry picked from commit 499ec738af72628eeb79a6a26bd2755281eb9c21)
Reviewed-on: http://git-master/r/1131673
(cherry picked from commit c4fee21aae8cd51852c4923f7e0f8fbe4258ae15)
Reviewed-on: http://git-master/r/1168478
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agovideo: tegra: nvmap: disallow partial reserve/unreserve on handles
Sri Krishna chowdary [Thu, 24 Mar 2016 06:53:54 +0000 (12:23 +0530)]
video: tegra: nvmap: disallow partial reserve/unreserve on handles

For NVMAP_PAGES_RESERVE and NVMAP_PAGES_UNRESERVE, allow only handle
wide operations. This way a lot of bookkeeping work can be reduced.

Bug 200174682

Change-Id: I63892dc97be0c2eddf8ce113dc4709d293be6dc2
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1127347
(cherry picked from commit 46dd06fbab582df7afdecfc424a483831d79fec9)
Reviewed-on: http://git-master/r/1168477
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agomm: mprotect: introduce vm_set_page_prot()
Sri Krishna chowdary [Thu, 5 May 2016 06:05:48 +0000 (11:35 +0530)]
mm: mprotect: introduce vm_set_page_prot()

vm_set_page_prot() is needed to change vm_struct's default
protections from within kernel.

bug 200174682

Change-Id: I46b0f5c331cfa6edc91e636748912892edbf7c5b
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1141806
(cherry picked from commit a198f7b54a83a40701485db84a7e83b4caadcf76)
Reviewed-on: http://git-master/r/1168476
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agomm: memory: Handle VM_NONE protected page faults
Sri Krishna chowdary [Wed, 6 Apr 2016 05:14:16 +0000 (10:44 +0530)]
mm: memory: Handle VM_NONE protected page faults

Allow driver decide if page protections can be fixed.
This allows us replace zapping vma's with mprotect calls.
Zap based solution is considerably slower than mprotect
based one and hence deviating from upstream.

JIRA TMM-59

Change-Id: I3d362deda2866d5db9f1cfb037a2a35e646ced8a
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1141383
(cherry picked from commit bc3555caae78981db5d1bb8a521d927be06bdd9e)
Reviewed-on: http://git-master/r/1168475
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agoarm64: t210: disable suspend and cpuidle
Rajkumar Kasirajan [Thu, 14 Apr 2016 10:42:28 +0000 (18:42 +0800)]
arm64: t210: disable suspend and cpuidle

Disabled suspend to RAM and CPU Idle support.

Bug 1747157

Change-Id: Ic0b242b2a2248beee1986c1a13f4ad4612c3f854
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-on: http://git-master/r/1165695
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
7 years agoARM64: dts: removing HDR mode for E3326 ov5693
David Wang [Wed, 8 Jun 2016 20:17:40 +0000 (13:17 -0700)]
ARM64: dts: removing HDR mode for E3326 ov5693

Bug 200113885

Change-Id: I3b3c21c7d4b5a663ecb12aeedec3f18d939b2a40
Signed-off-by: David Wang <davidw@nvidia.com>
(cherry picked from commit 577b6b199fb68a3667a5c2c5ea1a457b48e29378)
Reviewed-on: http://git-master/r/1167965
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
7 years agoiio: imu: nvi v.328 fix wake IRQ
Erik Lilliebjerg [Tue, 24 May 2016 00:28:14 +0000 (17:28 -0700)]
iio: imu: nvi v.328 fix wake IRQ

- Some sensors require other sensors to be enabled (significant motion requires
  accelerometer) which caused the setting of the ICM DMP wake IRQ to be
  incorrect.  Fixed by basing the ICM DMP wake IRQ setting on only the intended
  enabled sensors (enabled from HAL as opposed to enabled due to dependency).

Bug 200199302

Change-Id: Ia8fe2f475c1cac1efc3606b4250633655facc874
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1152136
(cherry picked from commit 97c50202f49092f7c762b96e7b417e27385a6c04)
Reviewed-on: http://git-master/r/1165237
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
7 years agoplatform: tegra: enable motion_int wake
Akhilesh Reddy Khumbum [Fri, 20 May 2016 20:56:36 +0000 (13:56 -0700)]
platform: tegra: enable motion_int wake

- Enable wake63 for motion_int: The GPIO_PX2 to which the MPU hw irq
  is routed is currently not configured as a wake up source and because
  of this when the system goes into suspend, the MPU irq is unable to
  wake the system up.

Bug 200199302

Change-Id: If27acc8d077b691aa671ce6c1a59e9adcf0f3304
Signed-off-by: Akhilesh Reddy Khumbum <akhumbum@nvidia.com>
Reviewed-on: http://git-master/r/1151301
(cherry picked from commit 4bef08e949bce50908cacac793df159f141bb112)
Reviewed-on: http://git-master/r/1165236
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
7 years agodsti: sensors: Fix Jetson sensor orientation vector
Robert Collins [Fri, 6 May 2016 20:42:09 +0000 (13:42 -0700)]
dsti: sensors: Fix Jetson sensor orientation vector

Bug 200196839

Change-Id: I5a0baafa370b2cd9728ff021a143eb92b72bd884
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1143060
(cherry picked from commit 7882d72fca93bcc7a61bda7ef80f211cb68ffb48)
Reviewed-on: http://git-master/r/1165235
GVS: Gerrit_Virtual_Submit

7 years agodtsi: sensors: Limit JCV gyroscope min frequency to 10hz
Robert Collins [Fri, 15 Apr 2016 03:43:41 +0000 (20:43 -0700)]
dtsi: sensors: Limit JCV gyroscope min frequency to 10hz

- Limit Jetson-CV gyro minimum to 10 Hz.
- Disable BMP280

Bug 1722103

Change-Id: I5e5d03060c889bf81c5db1df4793f20db54d749b
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1127103
(cherry picked from commit e76c0c3782d5160cc20d353cf1bf44e634ebb30c)
Reviewed-on: http://git-master/r/1165234
GVS: Gerrit_Virtual_Submit

7 years agodts: sensors: Fix sensor orientation matrix
Robert Collins [Mon, 23 May 2016 14:33:26 +0000 (07:33 -0700)]
dts: sensors: Fix sensor orientation matrix

Bug 200189040

Change-Id: Ia22c592c95c85dc70cdff93c6805a47fac87227b
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1151869
(cherry picked from commit dc9df93bd1fffb1ac5e09b36022bc3f175c4516b)
Reviewed-on: http://git-master/r/1165233
GVS: Gerrit_Virtual_Submit

7 years agoiio: imu: nvi v.327 ICM DMP matrix
Erik Lilliebjerg [Mon, 23 May 2016 14:13:46 +0000 (07:13 -0700)]
iio: imu: nvi v.327 ICM DMP matrix

- Change how the NVI driver handles sensor mounting matrix from a localized
  method to a global method.

Bug 200189040

Change-Id: I8842389e8a954945c0ea4219edef95dd730a3c19
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1151863
(cherry picked from commit 0622db2cf9e89f03e72b8fb9ee92e19b29a3e4ae)
Reviewed-on: http://git-master/r/1165232
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
7 years agoiio: imu: nvi v.326 DMP configuration
Erik Lilliebjerg [Mon, 23 May 2016 14:05:29 +0000 (07:05 -0700)]
iio: imu: nvi v.326 DMP configuration

- Add device tree ICM DMP sensor configuration allowing which sensors enable
  the ICM DMP.
- Add this configuration ability at runtime.

Bug 200189040

Change-Id: Ifb3c4e6cd2535b4271d1bc1cb931876b62f5486b
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1151862
(cherry picked from commit 273dfcf8424192cfcced79a6e14b0b7a3230b0fe)
Reviewed-on: http://git-master/r/1165231
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
7 years agoiio: imu: nvi v.325 ICM DMP support
Erik Lilliebjerg [Mon, 23 May 2016 08:27:46 +0000 (01:27 -0700)]
iio: imu: nvi v.325 ICM DMP support

The following done to support the Invensense ICM DMP:
- Add ability for AUX client to select the AUX port.
- Add efficient AUX device enable/disable.
- Add sensor accuracy.
- Add DMP initialization after AUX device registers.

Bug 200189040

Change-Id: Ibfb93703f9e10a69bb0164bde3b0d1c16f0fc0ec
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1151696
(cherry picked from commit c3f4471e90fde5409cead50dfcbaf0a4700c69f5)
Reviewed-on: http://git-master/r/1165230
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
7 years agoiio: imu: nvi v.324 Fix wake up IRQ
Erik Lilliebjerg [Thu, 19 May 2016 19:44:43 +0000 (12:44 -0700)]
iio: imu: nvi v.324 Fix wake up IRQ

- The DMP IRQ mode is selected by which sensors are enabled which is tracked
  by a bit mask.  The bug was that this bit mask was not clearing the bit
  pertaining to a disabled sensor and hence the DMP was programming the
  incorrect IRQ mode when suspending.

Bug 200199302

Change-Id: Id4fa3f1bc96041a3c5eb81689af0a5be04075697
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1150633
(cherry picked from commit 73a907d169612ce79ca6363c7bbd7661e6a8c335)
Reviewed-on: http://git-master/r/1165229
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
7 years agoRevert "Revert "iio: meter: Coverity: Use secure snprintf to prevent buffer overrun.""
Robert Collins [Thu, 19 May 2016 23:45:28 +0000 (16:45 -0700)]
Revert "Revert "iio: meter: Coverity: Use secure snprintf to prevent buffer overrun.""

This reverts commit 11eb58677582c320c043e60f2ef942b64c29ad0a.

Bug 1768847
Bug 200199302

Change-Id: I9b52a3a34d4b997e52fbcf8c93f6c2b973a70a3d
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1150887
(cherry picked from commit 6e99b208ff68d8accc327eff21bd93c2914888a8)
Reviewed-on: http://git-master/r/1165228
GVS: Gerrit_Virtual_Submit