Re: [PATCH] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Mauro Carvalho Chehab
Em Fri, 7 Dec 2018 12:27:09 + Ian Arkver escreveu: > On 07/12/2018 11:37, Hans Verkuil wrote: > > On 12/07/2018 12:31 PM, Mauro Carvalho Chehab wrote: > >> Em Fri, 7 Dec 2018 12:14:50 +0100 > >> Hans Verkuil escreveu: > >> > >>> On 12/07/2018 11:56 AM, Mauro Carvalho Chehab wrote: >

[PATCH v2] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Mauro Carvalho Chehab
A common mistake is to assume that initializing a var with: struct foo f = { 0 }; Would initialize a zeroed struct. Actually, what this does is to initialize the first element of the struct to zero. According to C99 Standard 6.7.8.21: "If there are fewer initializers in a

Re: [PATCH] media: cetrus: return an error if alloc fails

2018-12-07 Thread Paul Kocialkowski
Hi, On Fri, 2018-12-07 at 06:13 -0500, Mauro Carvalho Chehab wrote: > As warned by smatch: > > drivers/staging/media/sunxi/cedrus/cedrus.c: > drivers/staging/media/sunxi/cedrus/cedrus.c:93 cedrus_init_ctrls() error: > potential null dereference 'ctx->ctrls'. (kzalloc returns null) > >

Re: [PATCH v2] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Paul Kocialkowski
Hi, On Fri, 2018-12-07 at 08:03 -0500, Mauro Carvalho Chehab wrote: > A common mistake is to assume that initializing a var with: > struct foo f = { 0 }; > > Would initialize a zeroed struct. Actually, what this does is > to initialize the first element of the struct to zero. > >

[git:media_tree/master] media: staging: media: imx: Use of_node_name_eq for node name comparisons

2018-12-07 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch were queued: Subject: media: staging: media: imx: Use of_node_name_eq for node name comparisons Author: Rob Herring Date:Wed Dec 5 14:50:42 2018 -0500 Convert string compares of DT node names to use

Re: [PATCH] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Mauro Carvalho Chehab
Em Fri, 7 Dec 2018 12:14:50 +0100 Hans Verkuil escreveu: > On 12/07/2018 11:56 AM, Mauro Carvalho Chehab wrote: > > A common mistake is to assume that initializing a var with: > > struct foo f = { 0 }; > > > > Would initialize a zeroed struct. Actually, what this does is > > to initialize

Re: [PATCH v9 05/13] media: dt-bindings: add bindings for i.MX7 media driver

2018-12-07 Thread Hans Verkuil
On 11/22/2018 04:18 PM, Rui Miguel Silva wrote: > Add bindings documentation for i.MX7 media drivers. > The imx7 MIPI CSI2 and imx7 CMOS Sensor Interface. > > Signed-off-by: Rui Miguel Silva > Reviewed-by: Rob Herring > Acked-by: Sakari Ailus Please move this patch to the beginning of the

Re: [PATCH v2] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Mauro Carvalho Chehab
Em Fri, 07 Dec 2018 14:21:44 +0100 Paul Kocialkowski escreveu: > Hi, > > On Fri, 2018-12-07 at 08:03 -0500, Mauro Carvalho Chehab wrote: > > A common mistake is to assume that initializing a var with: > > struct foo f = { 0 }; > > > > Would initialize a zeroed struct. Actually, what this

Re: [PATCH 2/4] arm64: hyperv: Add support for Hyper-V as a hypervisor

2018-12-07 Thread Will Deacon
On Thu, Nov 22, 2018 at 03:10:57AM +, k...@linuxonhyperv.com wrote: > From: Michael Kelley > > Add ARM64-specific code to enable Hyper-V. This code includes: > * Detecting Hyper-V and initializing the guest/Hyper-V interface > * Setting up Hyper-V's synthetic clocks > * Making hypercalls

Re: [PATCH 1/4] arm64: hyperv: Add core Hyper-V include files

2018-12-07 Thread Will Deacon
Hi all, On Thu, Nov 22, 2018 at 03:10:56AM +, k...@linuxonhyperv.com wrote: > From: Michael Kelley > > hyperv-tlfs.h defines Hyper-V interfaces from the Hyper-V Top Level > Functional Spec (TLFS). The TLFS is distinctly oriented to x86/x64, > and Hyper-V has not separated out the

[PATCH] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Mauro Carvalho Chehab
A common mistake is to assume that initializing a var with: struct foo f = { 0 }; Would initialize a zeroed struct. Actually, what this does is to initialize the first element of the struct to zero. According to C99 Standard 6.7.8.21: "If there are fewer initializers in a

[PATCH] media: cetrus: return an error if alloc fails

2018-12-07 Thread Mauro Carvalho Chehab
As warned by smatch: drivers/staging/media/sunxi/cedrus/cedrus.c: drivers/staging/media/sunxi/cedrus/cedrus.c:93 cedrus_init_ctrls() error: potential null dereference 'ctx->ctrls'. (kzalloc returns null) While here, remove the memset(), as kzalloc() already zeroes the struct.

Re: [PATCH v9 01/13] media: staging/imx: refactor imx media device probe

2018-12-07 Thread Hans Verkuil
On 11/22/2018 04:18 PM, Rui Miguel Silva wrote: > Refactor and move media device initialization code to a new common > module, so it can be used by other devices, this will allow for example > a near to introduce imx7 CSI driver, to use this media device. > > Signed-off-by: Rui Miguel Silva >

Re: [PATCH] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Dan Carpenter
On Fri, Dec 07, 2018 at 09:31:06AM -0200, Mauro Carvalho Chehab wrote: > Em Fri, 7 Dec 2018 12:14:50 +0100 > Hans Verkuil escreveu: > > > On 12/07/2018 11:56 AM, Mauro Carvalho Chehab wrote: > > > A common mistake is to assume that initializing a var with: > > > struct foo f = { 0 }; > > > >

Re: [PATCH] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Hans Verkuil
On 12/07/2018 12:31 PM, Mauro Carvalho Chehab wrote: > Em Fri, 7 Dec 2018 12:14:50 +0100 > Hans Verkuil escreveu: > >> On 12/07/2018 11:56 AM, Mauro Carvalho Chehab wrote: >>> A common mistake is to assume that initializing a var with: >>> struct foo f = { 0 }; >>> >>> Would initialize a

Re: [PATCH v9 00/13] media: staging/imx7: add i.MX7 media driver

2018-12-07 Thread Hans Verkuil
On 11/22/2018 04:18 PM, Rui Miguel Silva wrote: > Hi, > This series introduces the Media driver to work with the i.MX7 SoC. it uses > the > already existing imx media core drivers but since the i.MX7, contrary to > i.MX5/6, do not have an IPU and because of that some changes in the imx media >

Re: [PATCH] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Hans Verkuil
On 12/07/2018 11:56 AM, Mauro Carvalho Chehab wrote: > A common mistake is to assume that initializing a var with: > struct foo f = { 0 }; > > Would initialize a zeroed struct. Actually, what this does is > to initialize the first element of the struct to zero. > > According to C99

Re: [PATCH v9 00/13] media: staging/imx7: add i.MX7 media driver

2018-12-07 Thread Dan Carpenter
On Fri, Dec 07, 2018 at 01:44:00PM +0100, Hans Verkuil wrote: > CHECK: Alignment should match open parenthesis > #936: FILE: drivers/staging/media/imx/imx7-mipi-csis.c:921: > + ret = v4l2_async_register_fwnode_subdev(mipi_sd, > + sizeof(struct

Re: [PATCH v9 05/13] media: dt-bindings: add bindings for i.MX7 media driver

2018-12-07 Thread Rui Miguel Silva
Hi Hans, On Fri 07 Dec 2018 at 12:39, Hans Verkuil wrote: On 11/22/2018 04:18 PM, Rui Miguel Silva wrote: Add bindings documentation for i.MX7 media drivers. The imx7 MIPI CSI2 and imx7 CMOS Sensor Interface. Signed-off-by: Rui Miguel Silva Reviewed-by: Rob Herring Acked-by: Sakari Ailus

Re: [PATCH] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Ian Arkver
On 07/12/2018 11:37, Hans Verkuil wrote: On 12/07/2018 12:31 PM, Mauro Carvalho Chehab wrote: Em Fri, 7 Dec 2018 12:14:50 +0100 Hans Verkuil escreveu: On 12/07/2018 11:56 AM, Mauro Carvalho Chehab wrote: A common mistake is to assume that initializing a var with: struct foo f = { 0

Re: [PATCH v9 01/13] media: staging/imx: refactor imx media device probe

2018-12-07 Thread Rui Miguel Silva
Hi Hans, Thanks for the review. On Fri 07 Dec 2018 at 12:38, Hans Verkuil wrote: On 11/22/2018 04:18 PM, Rui Miguel Silva wrote: Refactor and move media device initialization code to a new common module, so it can be used by other devices, this will allow for example a near to introduce imx7

Re: [PATCH v9 00/13] media: staging/imx7: add i.MX7 media driver

2018-12-07 Thread Rui Miguel Silva
Hi Hans and Dan, On Fri 07 Dec 2018 at 13:38, Dan Carpenter wrote: On Fri, Dec 07, 2018 at 01:44:00PM +0100, Hans Verkuil wrote: CHECK: Alignment should match open parenthesis #936: FILE: drivers/staging/media/imx/imx7-mipi-csis.c:921: + ret = v4l2_async_register_fwnode_subdev(mipi_sd, +

[PATCH 3/7] staging: erofs: localize UNALLOCATED_CACHED_PAGE placeholder

2018-12-07 Thread Gao Xiang
In practice, in order to do cached decompression rather than reuse them for in-place decompression and make full use of pages in page_pool instead of allocating as much as possible, an unallocated placeholder was introduce to mark all in compressed_pages[] and they will be replaced at the time of

[PATCH 2/7] staging: erofs: introduce MNGD_MAPPING helper

2018-12-07 Thread Gao Xiang
This patch introduces MNGD_MAPPING to wrap up sbi->managed_cache->i_mapping, which will be used to solve too many #ifdefs in a single function. No logic changes. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- The following lines will be changed in the next cleanup patch. -

[PATCH 7/7] staging: erofs: simplify `z_erofs_vle_submit_all'

2018-12-07 Thread Gao Xiang
Previously, there are too many hacked stuffs such as `__FSIO_1', `lstgrp_noio', `lstgrp_io' out there in `z_erofs_vle_submit_all'. Revisit the whole process by properly introducing jobqueue to represent each type of queued workgroups, furthermore hide all of crazyness behind independent separated

[PATCH 5/7] staging: erofs: refine compressed pages preload flow

2018-12-07 Thread Gao Xiang
Currently, there are two kinds of compressed pages in erofs: 1) file pages for the in-place decompression and 2) managed pages for cached decompression. Both are all stored in grp->compressed_pages[]. For managed pages, they could already exist or could be preloaded in this round, including

Re: [PATCH v2 1/3] binder: fix sparse warnings on locking context

2018-12-07 Thread Todd Kjos
On Thu, Dec 6, 2018 at 11:08 PM Greg Kroah-Hartman wrote: ... > But I thought I applied this back on November 26: > > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?h=char-misc-testing=324fa64cf4189094bc4df744a9e7214a1b81d845 > > You should have gotten an

Re: [PATCH 2/4] arm64: hyperv: Add support for Hyper-V as a hypervisor

2018-12-07 Thread Marc Zyngier
On 22/11/2018 03:10, k...@linuxonhyperv.com wrote: > From: Michael Kelley > > Add ARM64-specific code to enable Hyper-V. This code includes: > * Detecting Hyper-V and initializing the guest/Hyper-V interface > * Setting up Hyper-V's synthetic clocks > * Making hypercalls using the HVC

[PATCH 6/7] staging: erofs: redefine where `owned_workgrp_t' points

2018-12-07 Thread Gao Xiang
By design, workgroups are queued in the form of linked lists. Previously, it points to the next `z_erofs_vle_workgroup', which isn't flexible enough to simplify `z_erofs_vle_submit_all'. Let's fix it by pointing to the next `owned_workgrp_t' and use container_of to get its coresponding

[PATCH 0/7] staging: erofs: decompression fixes & cleanups

2018-12-07 Thread Gao Xiang
Hi, This patchset has been pending in the erofs mailing list for months. It mainly focuses on cleaning up io submission flow in the decompression subsystem in order to remove #ifdefs in related functions, which were used to differentiate whether cached decompression is enabled (rather than do

[PATCH 1/7] staging: erofs: fix use-after-free of on-stack `z_erofs_vle_unzip_io'

2018-12-07 Thread Gao Xiang
The root cause is the race as follows: Thread #0 Thread #1 z_erofs_vle_unzip_kickoff z_erofs_submit_and_unzip struct z_erofs_vle_unzip_io io[] atomic_add_return() wait_event()

[PATCH 4/7] staging: erofs: revisit the page submission flow

2018-12-07 Thread Gao Xiang
Previously, the submission flow works with cached compressed pages reclaim path in a tricky way, and it could be buggy if the reclaim path changes later without such tricky restrictions. For example, currently one PagePrivate(page) is evaluated without taking page lock (it only follows a

[PATCH 2/2] staging: rtl8188eu: reuse Hal_GetChnlGroup88E()

2018-12-07 Thread Michael Straube
Use Hal_GetChnlGroup88E() instead of duplicating it's code in get_rx_power_val_by_reg(). Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/rf.c | 17 +++-- .../staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 +-

[PATCH] hyperv: replace mutex_is_locked with lockdep

2018-12-07 Thread Stephen Hemminger
lockdep_assert_held is better at checking for locking requirements since it doesn't get confused if someone else is holding the mutex. Inspired by changes in network drivers by Lance Roy. Signed-off-by: Stephen Hemminger --- drivers/hv/channel_mgmt.c | 2 +- drivers/hv/connection.c | 2 +- 2

[PATCH] vmbus: fix subchannel removal

2018-12-07 Thread Stephen Hemminger
The changes to split ring allocation from open/close, broke the cleanup of subchannels. This resulted in problems using uio on network devices because the subchannel was left behind when the network device was unbound. The cause was in the disconnect logic which used list splice to move the

Re: [PATCH v5 02/12] gpu: ipu-csi: Swap fields according to input/output field types

2018-12-07 Thread Steve Longerbeam
Hi Philipp, can you review this patch and give it your ack? Thanks, Steve On 10/16/18 5:00 PM, Steve Longerbeam wrote: The function ipu_csi_init_interface() was inverting the F-bit for NTSC case, in the CCIR_CODE_1/2 registers. The result being that for NTSC bottom-top field order, the CSI

[PATCH 1/2] staging: rtl8188eu: simplify loop in rtl88eu_phy_iq_calibrate()

2018-12-07 Thread Michael Straube
Zeroing the array result[m][n] and setting only the values at even 'n's simplifies the code and slightly reduces object file size. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/phy.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

Re: [PATCH] Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0"

2018-12-07 Thread Shreeya Patel
On Thu, 2018-12-06 at 15:40 +0300, Dan Carpenter wrote: > On Wed, Dec 05, 2018 at 02:59:53PM -0700, Jeremy Fertic wrote: > > On Thu, Dec 06, 2018 at 01:25:55AM +0530, Shreeya Patel wrote: > > > On Tue, 2018-12-04 at 18:49 -0700, Jeremy Fertic wrote: > > > > This reverts commit

Re: [linux-sunxi] [PATCH v2 15/15] arm64: dts: allwinner: a64: Add Video Engine node

2018-12-07 Thread Jernej Škrabec
Hi! Dne sreda, 05. december 2018 ob 10:24:44 CET je Paul Kocialkowski napisal(a): > This adds the Video Engine node for the A64. Since it can map the whole > DRAM range, there is no particular need for a reserved memory node > (unlike platforms preceding the A33). > > Signed-off-by: Paul

[PATCH v1] binder: implement binderfs

2018-12-07 Thread Christian Brauner
As discussed at Linux Plumbers Conference 2018 in Vancouver [1] this is the implementation of binderfs. binderfs is a backwards-compatible filesystem for Android's binder ipc mechanism. Each ipc namespace will mount a new binderfs instance. Mounting binderfs multiple times at different locations