Commit Graph

641354 Commits

Author SHA1 Message Date
Xing Wang
87b2ed649b audio: fix pdm Asynchronous FIFO for channel shift issue
PD#152798: audio: fix pdm channel shift issue

Change-Id: I1ed76602041625eba2bd6f9691b3d0b8138eac31
Signed-off-by: Xing Wang <xing.wang@amlogic.com>
2017-10-23 20:29:13 -07:00
Pengcheng Chen
474cffeae2 osd: fixed smem_start error [3/3]
PD#152220: fixed smem_start error

Change-Id: I8beac687d912d8ffd642d05a9e4c2bee7df02649
Signed-off-by: Jiyu Yang <jiyu.yang@amlogic.com>
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2017-10-23 03:53:12 -07:00
Jiyu Yang
86aa35db2e dts: update gpu freq tbl for buildroot[2/3]
PD#152220: update gpu freq tbl for buildroot

Change-Id: I5f0409285aa350cd2f87e15b25497229245d28f4
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
2017-10-23 03:21:52 -07:00
Jiyu Yang
fcbaeafc5e clk: update gpu clk node [1/3]
PD#152220: update gpu clk node

Change-Id: I77796b9db66a24466211380432700bbaf50ac1d7
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
2017-10-23 03:19:13 -07:00
tao zeng
a998ca2c01 mm: add pagetrace function
PD#151104: mm: add pagetrace function

1. implement pagetrace as a driver; you can get information
  of how many pages allocated by each function by read:

  cat /proc/pagetrace

2. fix wrong statistics of free memory of each migrate type.

Change-Id: Ib2dff4bb5b3dd288ee188007352fc7b353eda100
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
2017-10-23 00:11:33 -07:00
Jianxin Pan
8c990449e2 Merge "mtd: report all bad block as 1" into amlogic-4.9-dev 2017-10-23 00:11:17 -07:00
Yonghui Yu
3f92c04ffe mtd: report all bad block as 1
PD#145359: mtd: report factory bad block as used bad one to mtd.

nandwrite in mtd utilies identify bad blocks by checking whether
return value of mtd_block_isbad is 1;
Our host driver need to distinguish used(1)/factory(FACTORY_BAD_BLOCK_ERROR)
bad block because partition table caculation cares factory bad ones only.

As mtd->_block_isbad is called by inside usage, so we normalize all the bad
block return value in mtd_block_isbad.

Change-Id: I19b0f25ce93ce527b6e02d59330b2edaf61020d4
Signed-off-by: Yonghui Yu <yonghui.yu@amlogic.com>
2017-10-22 23:49:48 -07:00
tao zeng
ee76ce9ce0 mm: fix cma allocate fail problem
PD#152454: mm: fix cma allocate fail problem

boost work shoud return right value of __alloc_contig_migrate_range

Change-Id: I8275a8541cd263f5ea5574fba1c053a30e3cbc80
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
2017-10-22 23:32:31 -07:00
jintao xu
deca8a9c70 ion_dev: add codec_mm heap for omx. [3/3]
PD#152137: add codec_mm heap for omx
           codec_mm_cma 308M;
           ion_dev_dma 92M;

Change-Id: I804d16c19e6133ec41bd51a7b2c328339a8d0fd7
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
2017-10-22 21:09:46 -07:00
Jiamin Ma
79bb659f90 unifykey: fix arbitrary memory access in unifykeys ioctl
PD#152036: arbitrary memory access in unifykeys ioctl

Change-Id: Ic7aa0fce291af7bd5810b4815137ca26b37110f8
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2017-10-20 03:01:46 -07:00
Rongrong Zhou
28f7e2859d media: add ioctl video layer1 on/off state in amvideo.[2/1]
PD#152453: add ioctl for OMX to get current video layer1 on/off state
for DRM TVP resource release.

Change-Id: I8a45869f63259500cbe8be7bc146793e6d7eb266
Signed-off-by: Rongrong Zhou <rongrong.zhou@amlogic.com>
2017-10-20 02:37:30 -07:00
Jiamin Ma
a3d748ca70 Revert "unifykey: fix arbitrary memory access in unifykeys ioctl"
This reverts commit 54f617de7f.

Change-Id: Ibdd0cb5c073513bb529e5c39f6f963906391a870
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2017-10-20 02:29:48 -07:00
Jiamin Ma
54f617de7f unifykey: fix arbitrary memory access in unifykeys ioctl
PD#152036: arbitrary  memory access in unifykeys ioctl

Change-Id: I2e76906bef8f417909d97c8a04289ce38baa6087
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2017-10-20 16:25:15 +08:00
Qi Duan
b0a002341c USB: get RESET1_REGISTER address from dts.[1/1]
PD#152591: USB: get RESET_REGISTER address from dts.
Before we get this address by offset of cbus.
From txlx,this address is not the same because memory map modifty.
Now usb module get this address from dts.

Change-Id: I2ed7d3a19f52c80edab33dec2569ed3ccd375438
Signed-off-by: Qi Duan <qi.duan@amlogic.com>
2017-10-19 21:32:58 -07:00
hong.guo
7bde3afb56 Power: add wakeup interface in shutdown
PD#150222: shutdown: add interface for alarm wakeup

1.add interface for alarm wakeup.
2.set alarm to wakeup system in shutdown.

Change-Id: I21adaecd15b0bc28c6c363835820c9e0291b87af
Signed-off-by: hong.guo <hong.guo@amlogic.com>
2017-10-19 18:46:23 -07:00
Yueguie He
233f9f77d5 dts: sync s420 & s420_128m
PD#150185: dts: sync s420 & s420_128m

Change-Id: I2e11bdffb760ee51d57aeb7aaf6d0f833a15c9ec
Signed-off-by: Yueguie He <yuegui.he@amlogic.com>
2017-10-19 00:00:15 -07:00
Bencheng Jing
e0b8b01a72 vdin: clean up dead code and bad compare
PD#151225: driver defect clean up:
#228
#262
#354
#407
#442
#445
#461
#576
#580
#598
#599
#615
#616
#671
#756
#760
#874

Change-Id: I1bc47c3e30ecfa1ca44e53f91201aa4e09ff19f5
Signed-off-by: Bencheng Jing <bencheng.jing@amlogic.com>
2017-10-18 22:19:51 -07:00
Victor Wan
fa1a711427 Merge branch 'android-4.9' into amlogic-4.9-dev 2017-10-19 08:43:31 +08:00
Yi Zhou
e447a4bccb hdmitx: clean up deadcode
PD#151236: driver defect clean up:
#252
#270~283

Change-Id: I009c06dcb14bd3fb686c46a155418093bc7f7514
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
2017-10-18 04:51:49 -07:00
Yao.Liu
a09f71110c ionvideo: modify ionvideo print info to pass the vts test
PD#151634: modify ionvideo print info to pass the vts test

Change-Id: I32e6bba500f7dc3cc0c987c65187e1354efc424e
Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
2017-10-16 03:06:06 -07:00
Ao Xu
a7ed492099 defconfig: disable CONFIG_ANDROID_LOGGER
PD#149771: disable CONFIG_ANDROID_LOGGER

No need CONFIG_ANDROID_LOGGER from Android L.
Android uses a service called logd to provide the
same function as the driver did.

Change-Id: I89c9d3bdb3dc3786e817c5f4055856f41babfc5a
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
2017-10-16 03:04:25 -07:00
Yi Zeng
b04de58cb3 nand: add slc nand support:F59L1G81LA (2Y),F59L1G81MA (2Y)
PD#151128: nand: add slc nand support:F59L1G81LA (2Y),F59L1G81MA (2Y)

Change-Id: I695e222c305aa4a7c9ca33d6e17c20d57bcf0191
Signed-off-by: Yi Zeng <yi.zeng@amlogic.com>
2017-10-16 02:10:33 -07:00
Yan Wang
cbfe6c2ec4 unifykey: check secure check secure storage valid before SMC call ATF.
PD#150482: unifykey: check secure storage valid before SMC call ATF.

  same as PD#150483.

    ATF use CONFIG to enable/disable secure storage.
    If ATF disable secure storage, secure storage code will be
    compiled out. Kernel should check if secure stroage exists before
    SMC call ATF.

Change-Id: Ifd5e3c42a181bb814dcedad13bebb4596ae95e27
Signed-off-by: Yan Wang <yan.wang@amlogic.com>
2017-10-12 23:13:31 -07:00
Qi Duan
53160bf7b0 USB: gadget: add wake lock when gadget connect.[1/1]
PD#151886: usb: gadget: add wake lock when gadget connect
       this case,not real suspend.

Change-Id: I0c371ad2c051b3f4fc64b96f8372fdc3be795145
Signed-off-by: Qi Duan <qi.duan@amlogic.com>
2017-10-12 01:50:12 -07:00
Qi Duan
ce4ac9bd2d UART: add spinlock for tx protect in interrupt. [1/1]
PD#151632: UART: add spinlock for tx protect in interrupt.

Change-Id: Ie2c7e6d3003d8b4248f05a72acd6c5242d45441f
Signed-off-by: Qi Duan <qi.duan@amlogic.com>
2017-10-12 01:30:10 -07:00
Pengcheng Chen
ef7a3d0d29 osd: null pointer risk protect
PD#151241: null pointer risk protect

driver defect clean up:
#284

Change-Id: I05ffb3df451b0f62de0ef00a688edc6bc33b1964
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2017-10-11 19:17:34 -07:00
MingLiang Dong
0a19c008ff amvecm: fix hdr no effect
PD#151008: fix hdr no effect

Change-Id: I9edc076cb74783d26e1f16ebeaceb48dbb7e6bfe
Signed-off-by: MingLiang Dong <mingliang.dong@amlogic.com>
2017-10-10 22:10:37 -07:00
Jiamin Ma
0385280d28 uart: fix NULL pointer deferencing in suspend/resume
PD#151229: driver defect clean up
#235
#236

Change-Id: I59acc448a4ece1f385d0b6d602721d34ce60e02c
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2017-10-10 19:47:08 -07:00
Jiamin Ma
cc619fdedb clocksource: fix NULL pointer deferencing issue
PD#151226: driver defect clean up
#229

Change-Id: Ie37dc17d5036813958180415d2b9b4405a44c793
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
2017-10-10 19:43:02 -07:00
wenfeng.guo
07d62d0088 amvecm: incorrect free pointer event
PD#150076: incorrect free pointer event

driver defect clean up:
#4
#7

Change-Id: Iec9d38a5fd71d26c36115eefe98326b909f85527
Signed-off-by: wenfeng.guo <wenfeng.guo@amlogic.com>
2017-10-10 19:13:21 -07:00
Yvonne Chen
190a64cb3a tee: open tee loading under optee
PD#151855: open tee loading under optee

Change-Id: Id18ff381bedadb724ace5f22cc820ef64f4666f6
Signed-off-by: Yvonne Chen <yvonne.chen@amlogic.com>
2017-10-09 01:29:59 -07:00
Victor Wan
ff27e33bf8 Merge branch 'android-4.9' into amlogic-4.9-dev 2017-10-09 15:30:18 +08:00
KeLe Bai
ccfeb711a7 di: driver defect clean up
PD#151224: driver defect clean up:

#227
#238~239
#249
#257~258
#285~287
#384
#466~467
#472~474
#585
#655
#659~660

Change-Id: I241d863318a8754c0e7c5fa1155247d99a21eb9e
Signed-off-by: KeLe Bai <kele.bai@amlogic.com>
2017-10-08 22:44:58 -07:00
Pengcheng Chen
eb47732293 osd: osd display error when work in 1080i and cvbs
PD#151305: osd: osd display error when work in 1080i and cvbs

Change-Id: I75dbc06ceddf724210f3a2a858bc10685c829fcf
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
2017-10-08 20:18:54 -07:00
Greg Kroah-Hartman
e5eba30388 Merge 4.9.54 into android-4.9
Changes in 4.9.54
	drm_fourcc: Fix DRM_FORMAT_MOD_LINEAR #define
	drm: bridge: add DT bindings for TI ths8135
	GFS2: Fix reference to ERR_PTR in gfs2_glock_iter_next
	drm/i915: Fix the overlay frontbuffer tracking
	ARM: dts: exynos: Add CPU OPPs for Exynos4412 Prime
	clk: sunxi-ng: fix PLL_CPUX adjusting on H3
	RDS: RDMA: Fix the composite message user notification
	ARM: dts: r8a7790: Use R-Car Gen 2 fallback binding for msiof nodes
	MIPS: Ensure bss section ends on a long-aligned address
	MIPS: ralink: Fix a typo in the pinmux setup.
	MIPS: ralink: Fix incorrect assignment on ralink_soc
	power: supply: axp288_fuel_gauge: Fix fuel_gauge_reg_readb return on error
	scsi: be2iscsi: Add checks to validate CID alloc/free
	ARM: dts: am335x-chilisom: Wakeup from RTC-only state by power on event
	igb: re-assign hw address pointer on reset after PCI error
	extcon: axp288: Use vbus-valid instead of -present to determine cable presence
	reset: ti_syscon: fix a ti_syscon_reset_status issue
	sh_eth: use correct name for ECMR_MPDE bit
	clk/axs10x: Clear init field in driver probe
	usb: make the MTK XHCI driver compile for older MIPS SoCs
	hwmon: (gl520sm) Fix overflows and crash seen when writing into limit attributes
	iio: adc: imx25-gcq: Fix module autoload
	iio: adc: axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications
	iio: adc: hx711: Add DT binding for avia,hx711
	IB/rxe: Add a runtime check in alloc_index()
	IB/rxe: Fix a MR reference leak in check_rkey()
	ARM: 8635/1: nommu: allow enabling REMAP_VECTORS_TO_RAM
	drm/i915/psr: disable psr2 for resolution greater than 32X20
	serial: 8250: moxa: Store num_ports in brd
	tty: goldfish: Fix a parameter of a call to free_irq
	serial: 8250_port: Remove dangerous pr_debug()
	IB/ipoib: Fix deadlock over vlan_mutex
	IB/ipoib: rtnl_unlock can not come after free_netdev
	IB/ipoib: Replace list_del of the neigh->list with list_del_init
	arm: dts: mt2701: Add subsystem clock controller device nodes
	drm/amdkfd: fix improper return value on error
	USB: serial: mos7720: fix control-message error handling
	USB: serial: mos7840: fix control-message error handling
	sfc: get PIO buffer size from the NIC
	partitions/efi: Fix integer overflow in GPT size calculation
	ASoC: dapm: handle probe deferrals
	audit: log 32-bit socketcalls
	ath10k: prevent sta pointer rcu violation
	spi: pxa2xx: Add support for Intel Gemini Lake
	iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged'
	usb: chipidea: vbus event may exist before starting gadget
	rtl8xxxu: Add additional USB IDs for rtl8192eu devices
	ASoC: dapm: fix some pointer error handling
	drm: mali-dp: Fix destination size handling when rotating
	drm: mali-dp: Fix transposed horizontal/vertical flip
	HID: wacom: release the resources before leaving despite devm
	MIPS: Lantiq: Fix another request_mem_region() return code check
	mips: ath79: clock:- Unmap region obtained by of_iomap
	lkdtm: Fix Oops when unloading the module
	net: core: Prevent from dereferencing null pointer when releasing SKB
	net/packet: check length in getsockopt() called with PACKET_HDRLEN
	team: fix memory leaks
	usb: plusb: Add support for PL-27A1
	udp: disable inner UDP checksum offloads in IPsec case
	net: dsa: b53: Include IMP/CPU port in dumb forwarding mode
	qed: Fix possible system hang in the dcbnl-getdcbx() path.
	mmc: sdio: fix alignment issue in struct sdio_func
	bridge: netlink: register netdevice before executing changelink
	Btrfs: fix segmentation fault when doing dio read
	Btrfs: fix potential use-after-free for cloned bio
	sata_via: Enable hotplug only on VT6421
	hugetlbfs: initialize shared policy as part of inode allocation
	kasan: do not sanitize kexec purgatory
	drivers/rapidio/devices/tsi721.c: make module parameter variable name unique
	netfilter: invoke synchronize_rcu after set the _hook_ to NULL
	MIPS: IRQ Stack: Unwind IRQ stack onto task stack
	iommu/exynos: Block SYSMMU while invalidating FLPD cache
	exynos-gsc: Do not swap cb/cr for semi planar formats
	MIPS: smp-cps: Fix retrieval of VPE mask on big endian CPUs
	nvme-rdma: handle cpu unplug when re-establishing the controller
	netfilter: nfnl_cthelper: fix incorrect helper->expect_class_max
	parisc: perf: Fix potential NULL pointer dereference
	nfs: make nfs4_cb_sv_ops static
	ibmvnic: Free tx/rx scrq pointer array when releasing sub-crqs
	cpufreq: intel_pstate: Update pid_params.sample_rate_ns in pid_param_set()
	x86/acpi: Restore the order of CPU IDs
	iommu/io-pgtable-arm: Check for leaf entry before dereferencing it
	mm/cgroup: avoid panic when init with low memory
	rds: ib: add error handle
	md/raid10: submit bio directly to replacement disk
	netfilter: nf_tables: set pktinfo->thoff at AH header if found
	i2c: meson: fix wrong variable usage in meson_i2c_put_data
	xfs: remove kmem_zalloc_greedy
	ASoC: wm_adsp: Return an error on write to a disabled volatile control
	libata: transport: Remove circular dependency at free time
	ARM: dts: BCM5301X: Fix memory start address
	tools/power turbostat: bugfix: GFXMHz column not changing
	IB/qib: fix false-postive maybe-uninitialized warning
	ARM: remove duplicate 'const' annotations'
	ASoC: rt5514: fix gcc-7 warning
	ASoC: rt5659: drop double const
	ASoC: rt5660: remove double const
	ALSA: au88x0: avoid theoretical uninitialized access
	ttpci: address stringop overflow warning
	s390/mm: make pmdp_invalidate() do invalidation only
	Linux 4.9.54

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-10-08 10:49:06 +02:00
Greg Kroah-Hartman
f37eb7b586 Linux 4.9.54 2017-10-08 10:26:32 +02:00
Gerald Schaefer
75903d40aa s390/mm: make pmdp_invalidate() do invalidation only
commit 91c575b335 upstream.

Commit 227be799c3 ("s390/mm: uninline pmdp_xxx functions from pgtable.h")
inadvertently changed the behavior of pmdp_invalidate(), so that it now
clears the pmd instead of just marking it as invalid. Fix this by restoring
the original behavior.

A possible impact of the misbehaving pmdp_invalidate() would be the
MADV_DONTNEED races (see commits ced10803 and 58ceeb6b), although we
should not have any negative impact on the related dirty/young flags,
since those flags are not set by the hardware on s390.

Fixes: 227be799c3 ("s390/mm: uninline pmdp_xxx functions from pgtable.h")
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:12 +02:00
Arnd Bergmann
14b502e491 ttpci: address stringop overflow warning
commit 69d3973af1 upstream.

gcc-7.0.1 warns about old code in ttpci:

In file included from drivers/media/pci/ttpci/av7110.c:63:0:
In function 'irdebi.isra.2',
    inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3,
    inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:659:3:
drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   memcpy(av7110->debi_virt, (char *) &res, count);
In function 'irdebi.isra.2',
    inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3,
    inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:668:3:
drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
   memcpy(av7110->debi_virt, (char *) &res, count);

Apparently, 'count' can be negative here, which will then get turned
into a giant size argument for memcpy. Changing the sizes to 'unsigned
int' instead seems safe as we already check for maximum sizes, and it
also simplifies the code a bit.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:12 +02:00
Arnd Bergmann
c637027054 ALSA: au88x0: avoid theoretical uninitialized access
commit 13f99ebdd6 upstream.

The latest gcc-7.0.1 snapshot points out that we if nr_ch is zero, we never
initialize some variables:

sound/pci/au88x0/au88x0_core.c: In function 'vortex_adb_allocroute':
sound/pci/au88x0/au88x0_core.c:2304:68: error: 'mix[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
sound/pci/au88x0/au88x0_core.c:2305:58: error: 'src[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I assume this can never happen in practice, but adding a check here doesn't
hurt either and avoids the warning. The code has been unchanged since
the start of git history.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:12 +02:00
Nicholas Mc Guire
cf2cd9feb8 ASoC: rt5660: remove double const
commit 4281fcc02e upstream.

Drop the const qualifier as it is being added by SOC_ENUM_DOUBLE_DECL()
already which is called by SOC_ENUM_SINGLE_DECL() here.

Fixes: commit 2b26dd4c1f ("ASoC: rt5660: add rt5660 codec driver")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:12 +02:00
Nicholas Mc Guire
617c7735db ASoC: rt5659: drop double const
commit eae39b5f42 upstream.

Drop the const qualifier as it is being added by SOC_ENUM_DOUBLE_DECL()
already which is called by SOC_ENUM_SINGLE_DECL() as well as the
double const by calls to SOC_VALUE_ENUM_SINGLE_DECL() via
SOC_VALUE_ENUM_DOUBLE_DECL).

Fixes: commit d3cb2de247 ("ASoC: rt5659: add rt5659 codec driver")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:12 +02:00
Arnd Bergmann
2f4835ee55 ASoC: rt5514: fix gcc-7 warning
commit 03ba791df9 upstream.

gcc-7 warns that there is a duplicate 'const' specifier in some
variables that are declared using the SOC_ENUM_SINGLE_DECL macro:

sound/soc/codecs/rt5514.c:398:14: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const SOC_ENUM_SINGLE_DECL(
sound/soc/codecs/rt5514.c:405:14: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const SOC_ENUM_SINGLE_DECL(

This removes one to fix the warning.

Fixes: 4a6180ea73 ("ASoC: rt5514: add rt5514 codec driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:12 +02:00
Arnd Bergmann
d8ba70c094 ARM: remove duplicate 'const' annotations'
commit 0527873b29 upstream.

gcc-7 warns about some declarations that are more 'const' than necessary:

arch/arm/mach-at91/pm.c:338:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const ramc_ids[] __initconst = {
arch/arm/mach-bcm/bcm_kona_smc.c:36:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const bcm_kona_smc_ids[] __initconst = {
arch/arm/mach-spear/time.c:207:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const timer_of_match[] __initconst = {
arch/arm/mach-omap2/prm_common.c:714:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct of_device_id const omap_prcm_dt_match_table[] __initconst = {
arch/arm/mach-omap2/vc.c:562:35: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
 static const struct i2c_init_data const omap4_i2c_timing_data[] __initconst = {

The ones in arch/arm were apparently all introduced accidentally by one
commit that correctly marked a lot of variables as __initconst.

Fixes: 19c233b79d ("ARM: appropriate __init annotation for const data")
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:11 +02:00
Arnd Bergmann
a4f11d61e3 IB/qib: fix false-postive maybe-uninitialized warning
commit f6aafac184 upstream.

aarch64-linux-gcc-7 complains about code it doesn't fully understand:

drivers/infiniband/hw/qib/qib_iba7322.c: In function 'qib_7322_txchk_change':
include/asm-generic/bitops/non-atomic.h:105:35: error: 'shadow' may be used uninitialized in this function [-Werror=maybe-uninitialized]

The code is right, and despite trying hard, I could not come up with a version
that I liked better than just adding a fake initialization here to shut up the
warning.

Fixes: f931551baf ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:11 +02:00
Len Brown
86c469bea4 tools/power turbostat: bugfix: GFXMHz column not changing
[ Upstream commit 22048c5485 ]

turbostat displays a GFXMHz column, which comes from reading
/sys/class/graphics/fb0/device/drm/card0/gt_cur_freq_mhz

But GFXMHz was not changing, even when a manual
cat /sys/class/graphics/fb0/device/drm/card0/gt_cur_freq_mhz
showed a new value.

It turns out that a rewind() on the open file is not sufficient,
fflush() (or a close/open) is needed to read fresh values.

Reported-by: Yaroslav Isakov <yaroslav.isakov@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:11 +02:00
Jon Mason
c126bc6b94 ARM: dts: BCM5301X: Fix memory start address
[ Upstream commit 88d1fa70c2 ]

Memory starts at 0x80000000, not 0.  0 "works" due to mirrior of the
first 128M of RAM to that address.  Anything greater than 128M will
quickly find nothing there.  Correcting the starting address has
everything working again.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
Fixes: 7eb05f6d ("ARM: dts: bcm5301x: Add BCM SVK DT files")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:11 +02:00
Gwendal Grignou
16db9205d3 libata: transport: Remove circular dependency at free time
[ Upstream commit d85fc67dd1 ]

Without this patch, failed probe would not free resources like irq.

ata port tdev object currently hold a reference to the ata port
object.  Therefore the ata port object release function will not get
called until the ata_tport_release is called. But that would never
happen, releasing the last reference of ata port dev is done by
scsi_host_release, which is called by ata_host_release when the ata
port object is released.

The ata device objects actually do not need to explicitly hold a
reference to their real counterpart, given the transport objects are
the children of these objects and device_add() is call for each child.
We know the parent will not be deleted until we call the child's
device_del().

Reported-by: Matthew Whitehead <tedheadster@gmail.com>
Tested-by: Matthew Whitehead <tedheadster@gmail.com>
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:11 +02:00
Charles Keepax
49c3226c06 ASoC: wm_adsp: Return an error on write to a disabled volatile control
[ Upstream commit 67430a39ca ]

Volatile controls should only be accessed when the firmware is active,
currently however writes to these controls will succeed, but the data
will be lost, if the firmware is powered down. Update this behaviour such
that an error is returned the same as it is for reads.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:11 +02:00
Darrick J. Wong
d86f4ea836 xfs: remove kmem_zalloc_greedy
[ Upstream commit 08b005f133 ]

The sole remaining caller of kmem_zalloc_greedy is bulkstat, which uses
it to grab 1-4 pages for staging of inobt records.  The infinite loop in
the greedy allocation function is causing hangs[1] in generic/269, so
just get rid of the greedy allocator in favor of kmem_zalloc_large.
This makes bulkstat somewhat more likely to ENOMEM if there's really no
pages to spare, but eliminates a source of hangs.

[1] http://lkml.kernel.org/r/20170301044634.rgidgdqqiiwsmfpj%40XZHOUW.usersys.redhat.com

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:11 +02:00
Heiner Kallweit
943411be40 i2c: meson: fix wrong variable usage in meson_i2c_put_data
[ Upstream commit 3b0277f198 ]

Most likely a copy & paste error.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: 30021e3707 ("i2c: add support for Amlogic Meson I2C controller")
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-08 10:26:11 +02:00