[PATCH v2 19/41] media: atomisp: remove kvmalloc/kvcalloc abstractions

2020-05-29 Thread Mauro Carvalho Chehab
The sh_css layer adds an abstraction for kvmalloc/kvcalloc. Get rid of them. Most of the work here was done by this small coccinelle script: @@ expression size; @@ - sh_css_malloc(size) + kvmalloc(size, GFP_KERNEL) @@ expression n; expression size; @@ - sh_css_calloc(n, size) + kvcalloc(n, si

[PATCH v2 35/41] media: atomisp: provide more details about the firmware binaries

2020-05-29 Thread Mauro Carvalho Chehab
In order to make easier to identify what a firmware file contains, add more info at the firmware dump log facility. Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/pci/atomisp_compat_css20.c | 39 +-- .../media/atomisp/pci/ia_css_acc_types.h | 4 +- .../media/at

[PATCH v2 37/41] media: atomisp: allow passing firmware name at modprobe time

2020-05-29 Thread Mauro Carvalho Chehab
It can be useful to be able to test different firmware files at modprobe time, in order to be able to test different variants without much efforts. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/atomisp_v4l2.c | 30 --- 1 file changed, 19 insertions(+), 1

[PATCH v2 31/41] media: atomisp: get rid of an error abstraction layer

2020-05-29 Thread Mauro Carvalho Chehab
There is an abstraction layer there meant to convert to the Linux standard error codes. As the driver now use such errors everywhere. we can get rid of this. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/atomisp_cmd.c | 2 +- .../pci/camera/util/interface/ia_css_util.

[PATCH v2 24/41] media: atomisp: Remove unnecessary NULL check in atomisp_param

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: drivers/staging/media/atomisp/pci/atomisp_cmd.c:4278:17: warning: address of 'config->info' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!&config->info) { ~ ^~~~ config cannot be NULL because it c

[PATCH v2 34/41] media: atomisp: get rid of system_types.h

2020-05-29 Thread Mauro Carvalho Chehab
This is just a wrapper for system_local.h. Signed-off-by: Mauro Carvalho Chehab --- .../base/refcount/interface/ia_css_refcount.h | 2 +- .../input_formatter_global.h | 2 +- .../pci/hive_isp_css_common/irq_global.h | 2 +- .../pci/hive_isp_css_common/isp_global.h |

[PATCH v2 02/41] media: atomisp: get rid of the hrt/hive_isp_css_mm_hrt abstraction layer

2020-05-29 Thread Mauro Carvalho Chehab
Simplify the code by removing this extra memory management abstraction layer. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/Makefile| 1 - .../staging/media/atomisp/pci/atomisp_acc.c | 24 --- .../staging/media/atomisp/pci/atomisp_cmd.c | 2 +- .../medi

[PATCH v2 40/41] media: atomisp: get rid of set_fs() dirty hacks

2020-05-29 Thread Mauro Carvalho Chehab
This file was based on an older version of the V4L2 compat32 code, which had this ugly hack. Change the code to remove the hack. Yet, the entire compat32 code is currently commented out. So, let's add a FIXME note at the code, as we may need to check if some of the atomisp specific ioctls would re

[PATCH v2 08/41] media: atomisp: get rid of memory_access.c

2020-05-29 Thread Mauro Carvalho Chehab
Now that we have everything in place, we can get rid of the memory_access abstraction layer. Now, everything related to heterogeneous memory management (hmm) is under hmm.c & related pools. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/Makefile| 1 - .../stagin

[PATCH v2 33/41] media: atomisp: get rid of a bunch of other wrappers

2020-05-29 Thread Mauro Carvalho Chehab
There are too many wrapper functions at atomisp_compat_css20.c. Get rid of another set of such wrappers. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/atomisp_cmd.c | 156 +- .../media/atomisp/pci/atomisp_compat.h| 79 - .../media/atomisp/pci/atom

[PATCH v2 12/41] media: atomisp: get rid of a warning message

2020-05-29 Thread Mauro Carvalho Chehab
There's a warning message about an unused code. The code that were using it were commented out, due to a problem causing the firmware load to fail on the machines we're using for testing. Change the place where we're commenting the code out, in order to avoid the warning. Fixes: 95d1f398c4dc ("me

[PATCH v2 09/41] media: atomisp: hmm_bo: untag user pointers

2020-05-29 Thread Mauro Carvalho Chehab
The kernel ABI was extended to allow pass tagged user pointers. Untag the pointers in this function. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c b/d

[PATCH v2 04/41] media: atomisp: go one step further to drop ia_css_memory_access.c

2020-05-29 Thread Mauro Carvalho Chehab
Move the attrs handling into hmm, simplifying even further what the ia_css_memory_access.c file does. Yet, the returned type for ia_css_memory_access.c is an integer, instead of a pointer. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/include/hmm/hmm.h | 3 ++- .../media

[PATCH v2 10/41] media: atomisp: add debug message to help debugging hmm code

2020-05-29 Thread Mauro Carvalho Chehab
The hmm code is partially based on a fork from 3.10 code, and has bugs. Add debug there to help tracking what happens there. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/media/ato

[PATCH v2 27/41] media: atomisp: avoid an extra memset() when alloc memory

2020-05-29 Thread Mauro Carvalho Chehab
Use the variant which zeroes the memory when allocating, instead of having an explicit memset. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c | 3 +-- drivers/staging/media/atomisp/pci/sh_css.c | 3 +-- 2 files changed,

[PATCH v2 13/41] media: atomisp: fix driver caps

2020-05-29 Thread Mauro Carvalho Chehab
This device driver is not MC-centric. So, remove the wrong caps from it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_subdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.c b/drivers

[PATCH v2 05/41] media: atomisp: get rid of mmgr_load and mmgr_store

2020-05-29 Thread Mauro Carvalho Chehab
Those functions are just wrappers for hmm_load/hmm_store. Signed-off-by: Mauro Carvalho Chehab --- .../pci/hive_isp_css_common/host/debug.c | 8 +++--- .../hive_isp_css_common/host/debug_private.h | 8 +++--- .../memory_access/memory_access.h | 20 - drivers/stagi

[PATCH v2 00/41] More atomisp fixes and cleanups

2020-05-29 Thread Mauro Carvalho Chehab
The first 20 patches on this series were already submitted, but I forgot to c/c linux-media. So, I'm just resending, without any changes. Most of them are working at the memory management abstraction, cleaning it, removing abstraction layers and getting rid of legacy stuff. Patch 20 contains an im

[PATCH v2 28/41] media: atomisp: remove some trivial wrappers from compat css20

2020-05-29 Thread Mauro Carvalho Chehab
There are tons of code inside atomisp_compat_css20.c, but several of them are just trivial wrappers to other functions. Getting rid of all of them will take some time, but let's start getting rid of some of the trivial ones. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci

[PATCH v2 16/41] media: atomisp: improve warning for IRQ enable function

2020-05-29 Thread Mauro Carvalho Chehab
If something gets wrong when enabling or disabling an IRQ, we should know better about what happened. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/ato

[PATCH v2 36/41] media: atomisp: print firmware data during load

2020-05-29 Thread Mauro Carvalho Chehab
While there's a way to list the firmware binaries in runtime, it is worth to also print it during firmware load. One advantage is that this code also introduces additional checks with regards to invalid firmware types, which can be useful to identify problems. Signed-off-by: Mauro Carvalho Chehab

[PATCH v2 39/41] media: atomisp: add some debug messages when binaries are used

2020-05-29 Thread Mauro Carvalho Chehab
The ISP firmware logic is complex, as several binaries are contained into a single file. Print debug messages: - with a stack dump if binary not found; - when a firmware is selected. Signed-off-by: Mauro Carvalho Chehab --- .../atomisp/pci/runtime/binary/src/binary.c | 31

[PATCH v2 38/41] media: atomisp: add a debug message at hmm free

2020-05-29 Thread Mauro Carvalho Chehab
In order to check if aren't there any memory leaks, let's add a debug print for hmm_free(). Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm.c b/drivers/staging/me

[PATCH v2 07/41] media: atomisp: change the type returned by mmgr alloc

2020-05-29 Thread Mauro Carvalho Chehab
The mmgr alloc code returns a different type than hmm, due to some abstraction layer. Change the driver to use just one type to represent the hmm memory. Signed-off-by: Mauro Carvalho Chehab --- .../base/refcount/interface/ia_css_refcount.h | 13 ++-- .../atomisp/pci/base/refcount/src/refcount.

[PATCH v2 06/41] media: atomisp: get rid of unused memory_realloc code

2020-05-29 Thread Mauro Carvalho Chehab
The code for it is commented out, probably because it is broken or uneeded for the driver to work. So, let's get rid of it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/Makefile| 1 - .../pci/hive_isp_css_include/memory_realloc.h | 38 - .../media/atomi

[PATCH v2 22/41] media: atomisp: Remove second increment of count in atomisp_subdev_probe

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: ../drivers/staging/media/atomisp/pci/atomisp_v4l2.c:1097:3: warning: variable 'count' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis] count++; ^ This was probably unintentional, remove it. Li

[PATCH v2 21/41] media: atomisp: Clean up if block in sh_css_sp_init_stage

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: ../drivers/staging/media/atomisp/pci/sh_css_sp.c:1039:23: warning: address of 'binary->in_frame_info' will always evaluate to 'true' [-Wpointer-bool-conversion] } else if (&binary->in_frame_info) { ~~ ^

[PATCH v2 20/41] media: atomisp: avoid OOPS due to non-existing ref_frames

2020-05-29 Thread Mauro Carvalho Chehab
stage->args->delay_frames array could point to NULL frames. What's weird is that we didn't notice this behavior with the Intel Aero Yocto code. Handle it, while adding a notice at the code, as this could be due to some broken pipeline setup. Signed-off-by: Mauro Carvalho Chehab --- .../pci/isp

[PATCH v2 18/41] media: atomisp: add more comments about frame allocation

2020-05-29 Thread Mauro Carvalho Chehab
The frame allocation logic happens differently for userptr or normal mmap. On a quick look, this sounded to be unbalanced, but the logic should actually work for both cases. Add an extra comment to reflect it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_io

[PATCH v2 29/41] media: atomisp: do another round of coding style cleanup

2020-05-29 Thread Mauro Carvalho Chehab
Run checkpatch --fix-inline again, in order to get rid of some additional issues that got introduced (or that checkpatch can now detect). This should help preventing receiving random cleanups, while keeping the code on a better shape. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/med

[PATCH v2 01/41] media: atomisp: simplify hive_isp_css_mm_hrt wrapper

2020-05-29 Thread Mauro Carvalho Chehab
The code there is a wrapper for hmm/ wrapper. Simplify it, and get rid of ION-specific code. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/Makefile| 5 -- .../media/atomisp/include/hmm/hmm_bo.h| 9 --- .../staging/media/atomisp/pci/atomisp_acc.c | 2

[PATCH v2 25/41] media: atomisp: Avoid overflow in compute_blending

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c:129:35: warning: implicit conversion from 'unsigned long' to 'int32_t' (aka 'int') changes value from 18446744073709543424 to -8192 [-Wconstant-conversion] return MAX(MIN(isp

[PATCH v2 32/41] media: atomisp: don't cause a warn if probe failed

2020-05-29 Thread Mauro Carvalho Chehab
When probe fails, it is possible that hmm_init() to not be called. On such case, hmm_cleanup() will cause a WARN_ON(). Avoid it by adding an explicit check at hmm_cleanup() to ensure that the hmm code was properly initialized. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomi

[PATCH v2 23/41] media: atomisp: Remove unnecessary NULL checks in ia_css_pipe_load_extension

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: ../drivers/staging/media/atomisp/pci/sh_css.c:8537:14: warning: address of 'pipe->output_stage' will always evaluate to 'true' [-Wpointer-bool-conversion] if (&pipe->output_stage) ~~ ~~^~~~ ../drivers/staging/medi

[PATCH v2 11/41] media: atomisp: use Yocto Aero default hmm pool sizes

2020-05-29 Thread Mauro Carvalho Chehab
Yocto Aero driver has a different default for hmm pools. Use the definitions there. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_

[PATCH v2 17/41] media: atomisp: add debug functions for received events

2020-05-29 Thread Mauro Carvalho Chehab
For debugging purposes, it helps to know what event was actually received. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp_compat_css20.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/dr

[PATCH v2 03/41] media: atomisp: reduce abstraction at ia_css_memory_access

2020-05-29 Thread Mauro Carvalho Chehab
Yet another memory abstraction layer. Getting rid of this may be a little trickier, but let's reduce it to a minimal. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/include/hmm/hmm.h | 3 - .../memory_access/memory_access.h | 61 +-- drivers/sta

[PATCH v2 15/41] media: atomisp: add debug for hmm alloc

2020-05-29 Thread Mauro Carvalho Chehab
The hmm code is still complex and has bugs. Add a debug print when memory gets allocated, in order to help identifying what's happening out there. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/hmm/hmm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH v2 14/41] media: atomisp: use pin_user_pages() for memory allocation

2020-05-29 Thread Mauro Carvalho Chehab
Instead of using a hacked version of an old copy of get_user_pages(), use pin_user_pages(). Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/include/hmm/hmm_bo.h| 2 + .../staging/media/atomisp/pci/hmm/hmm_bo.c| 145 +++--- 2 files changed, 24 insertions(+), 1

[PATCH v2 26/41] media: atomisp: Remove binary_supports_input_format

2020-05-29 Thread Mauro Carvalho Chehab
From: Nathan Chancellor Clang warns: drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:1707:64: warning: implicit conversion from enumeration type 'const enum ia_css_frame_format' to different enumeration type 'enum atomisp_input_format' [-Wenum-conversion] binary_supports_in

Re: [PATCH 9/9] staging: media: atomisp: add PMIC_OPREGION dependency

2020-05-29 Thread Mauro Carvalho Chehab
Em Fri, 29 May 2020 20:11:29 -0700 Nathan Chancellor escreveu: > On Fri, May 29, 2020 at 10:00:31PM +0200, Arnd Bergmann wrote: > > Without that driver, there is a link failure in > > > > ERROR: modpost: "intel_soc_pmic_exec_mipi_pmic_seq_element" > > [drivers/staging/media/atomisp/pci/atomisp_g

Re: [PATCH 9/9] staging: media: atomisp: add PMIC_OPREGION dependency

2020-05-29 Thread Nathan Chancellor
On Fri, May 29, 2020 at 10:00:31PM +0200, Arnd Bergmann wrote: > Without that driver, there is a link failure in > > ERROR: modpost: "intel_soc_pmic_exec_mipi_pmic_seq_element" > [drivers/staging/media/atomisp/pci/atomisp_gmin_platform.ko] undefined! > > Add an explicit Kconfig dependency. > > S

Re: [PATCH 8/9] staging: media: atomisp: disable all custom formats

2020-05-29 Thread Nathan Chancellor
On Fri, May 29, 2020 at 10:00:30PM +0200, Arnd Bergmann wrote: > clang points out the usage of an incorrect enum type in the > list of supported image formats: > > drivers/staging/media/atomisp/pci/atomisp_subdev.c:49:65: error: implicit > conversion from enumeration type 'enum ia_css_frame_forma

Re: [PATCH 7/9] staging: media: atomisp: fix enum type mixups

2020-05-29 Thread Nathan Chancellor
On Fri, May 29, 2020 at 10:00:29PM +0200, Arnd Bergmann wrote: > Some function calls pass an incorrect enum type: > > drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:858:16: > error: implicit conversion from enumeration type 'input_system_ID_t' to > different enumeratio

Re: [PATCH 5/9] staging: media: atomisp: fix stack overflow in init_pipe_defaults()

2020-05-29 Thread Nathan Chancellor
On Fri, May 29, 2020 at 10:00:27PM +0200, Arnd Bergmann wrote: > When building with clang, multiple copies of the structures to be > initialized are passed around on the stack and copied locally, using an > insane amount of stack space: > > drivers/staging/media/atomisp/pci/sh_css.c:2371:1: error:

Re: [PATCH 3/9] staging: media: atomisp: annotate an unused function

2020-05-29 Thread Nathan Chancellor
On Fri, May 29, 2020 at 10:00:25PM +0200, Arnd Bergmann wrote: > atomisp_mrfld_power() has no more callers and produces > a warning: > > drivers/staging/media/atomisp/pci/atomisp_v4l2.c:764:12: error: unused > function 'atomisp_mrfld_power' [-Werror,-Wunused-function] > > Mark the function as un

Re: [PATCH 2/9] staging: media: atomisp: declare 'struct device' before using it

2020-05-29 Thread Nathan Chancellor
On Fri, May 29, 2020 at 10:00:24PM +0200, Arnd Bergmann wrote: > In some configurations, including this header leads to a warning: > > drivers/staging/media/atomisp//pci/sh_css_firmware.h:41:38: error: > declaration of 'struct device' will not be visible outside of this function > [-Werror,-Wvis

Re: [PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check

2020-05-29 Thread Nathan Chancellor
On Fri, May 29, 2020 at 10:31:44PM +0200, Arnd Bergmann wrote: > On Fri, May 29, 2020 at 10:23 PM Arnd Bergmann wrote: > > > > On Fri, May 29, 2020 at 10:04 PM 'Nick Desaulniers' via Clang Built > > Linux wrote: > > > > > > See also Nathan's 7 patch series. > > > https://lore.kernel.org/lkml/2020

Re: [PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check

2020-05-29 Thread Arnd Bergmann
On Fri, May 29, 2020 at 10:23 PM Arnd Bergmann wrote: > > On Fri, May 29, 2020 at 10:04 PM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > See also Nathan's 7 patch series. > > https://lore.kernel.org/lkml/20200527071150.3381228-1-natechancel...@gmail.com/ > > > > Might be some overlap

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread John Hubbard
On 2020-05-29 04:53, Dan Carpenter wrote: ... What are the runtime implications of this patch? I'm still not clear on that honestly. Instead of incrementing each page's refcount by 1 (with get_user_pages()), pin_user_pages*() will increment by GUP_PIN_COUNTING_BIAS, which is 1024. That by itse

Re: [PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check

2020-05-29 Thread Arnd Bergmann
On Fri, May 29, 2020 at 10:04 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > See also Nathan's 7 patch series. > https://lore.kernel.org/lkml/20200527071150.3381228-1-natechancel...@gmail.com/ > > Might be some overlap between series? > Probably. I really should have checked when I saw th

[PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check

2020-05-29 Thread Arnd Bergmann
Checking the pointer to a member of a struct against NULL is pointless as clang points out: drivers/staging/media/atomisp/pci/atomisp_cmd.c:4278:17: error: address of 'config->info' will always evaluate to 'true' Check the original pointer instead, which may also be unnecessary here, but makes a

[PATCH 8/9] staging: media: atomisp: disable all custom formats

2020-05-29 Thread Arnd Bergmann
clang points out the usage of an incorrect enum type in the list of supported image formats: drivers/staging/media/atomisp/pci/atomisp_subdev.c:49:65: error: implicit conversion from enumeration type 'enum ia_css_frame_format' to different enumeration type 'enum atomisp_input_format' [-Werror,-W

[PATCH 7/9] staging: media: atomisp: fix enum type mixups

2020-05-29 Thread Arnd Bergmann
Some function calls pass an incorrect enum type: drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_system.c:858:16: error: implicit conversion from enumeration type 'input_system_ID_t' to different enumeration type 'gp_device_ID_t' [-Werror,-Wenum-conversion] gp_device_rst

[PATCH 6/9] staging: media: atomisp: fix type mismatch

2020-05-29 Thread Arnd Bergmann
The caller passes a variable of a different enum type: drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c:1707:64: error: implicit conversion from enumeration type 'const enum ia_css_frame_format' to different enumeration type 'enum atomisp_input_format' [-Werror,-Wenum-conversion]

[PATCH 4/9] staging: media: atomisp: fix a type conversion warning

2020-05-29 Thread Arnd Bergmann
clang complains that the type conversion in the MAX() macro contains an implied integer overflow to a signed number: drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/ia_css_xnr3.host.c:129:35: error: implicit conversion from 'unsigned long' to 'int32_t' (aka 'int') changes value from 184

[PATCH 5/9] staging: media: atomisp: fix stack overflow in init_pipe_defaults()

2020-05-29 Thread Arnd Bergmann
When building with clang, multiple copies of the structures to be initialized are passed around on the stack and copied locally, using an insane amount of stack space: drivers/staging/media/atomisp/pci/sh_css.c:2371:1: error: stack frame size of 26864 bytes in function 'create_pipe' [-Werror,-Wfr

[PATCH 3/9] staging: media: atomisp: annotate an unused function

2020-05-29 Thread Arnd Bergmann
atomisp_mrfld_power() has no more callers and produces a warning: drivers/staging/media/atomisp/pci/atomisp_v4l2.c:764:12: error: unused function 'atomisp_mrfld_power' [-Werror,-Wunused-function] Mark the function as unused while the PM code is being debugged, expecting that it will be used agai

[PATCH 9/9] staging: media: atomisp: add PMIC_OPREGION dependency

2020-05-29 Thread Arnd Bergmann
Without that driver, there is a link failure in ERROR: modpost: "intel_soc_pmic_exec_mipi_pmic_seq_element" [drivers/staging/media/atomisp/pci/atomisp_gmin_platform.ko] undefined! Add an explicit Kconfig dependency. Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/Kconfig | 1 +

[PATCH 2/9] staging: media: atomisp: declare 'struct device' before using it

2020-05-29 Thread Arnd Bergmann
In some configurations, including this header leads to a warning: drivers/staging/media/atomisp//pci/sh_css_firmware.h:41:38: error: declaration of 'struct device' will not be visible outside of this function [-Werror,-Wvisibility] Make sure the struct tag is known before declaring a function t

[PATCH] staging: qlge: qlge_main.c: fixed spaces coding style issues

2020-05-29 Thread Jil Rouceau
Fixed the missing spaces before and after binary operators. Signed-off-by: Jil Rouceau --- drivers/staging/qlge/qlge_main.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index c92820f0796

Re: [PATCH 00/10] staging: wfx: introduce nl80211 vendor extensions

2020-05-29 Thread Kalle Valo
Jérôme Pouiller writes: > On Wednesday 27 May 2020 14:34:37 CEST Kalle Valo wrote: >> Jerome Pouiller writes: >> >> > This series introduces some nl80211 vendor extensions to the wfx driver. >> > >> > This series may lead to some discussions: >> > >> > 1. Patch 7 allows to change the dynamic

[PATCH] media: atomisp: get rid of set_fs() dirty hacks

2020-05-29 Thread Mauro Carvalho Chehab
This file was based on an older version of the V4L2 compat32 code, which had this ugly hack. Change the code to remove the hack. Yet, the entire compat32 code is currently commented out. So, let's add a FIXME note at the code, as we may need to check if some of the atomisp specific ioctls would re

[PATCH v2] staging: wfx: fix coherency of hif_scan() prototype

2020-05-29 Thread Jerome Pouiller
From: Jérôme Pouiller The function hif_scan() return the timeout for the completion of the scan request. It is the only function from hif_tx.c that return another thing than just an error code. This behavior is not coherent with the rest of file. Worse, if value returned is positive, the caller c

[PATCH 2/2] staging: wfx: drop useless loop

2020-05-29 Thread Jerome Pouiller
From: Jérôme Pouiller It is guarantee that the loop will stop at first iteration. So drop the loop. Fixes: 6bf418c50f98a ("staging: wfx: change the way to choose frame to send") Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 19 --- 1 file changed, 8 insertion

[PATCH 1/2] staging: wfx: fix AC priority

2020-05-29 Thread Jerome Pouiller
From: Jérôme Pouiller In order to work properly all the queues of the device must be filled (the device chooses itself the queue to use depending of AC parameters and other things). It is the job of wfx_tx_queues_get_skb() to choose which queue must be filled. However, the sorting algorithm was i

Re: [PATCH 4/5] iio: light: lm3533-als: remove explicit parent assignment

2020-05-29 Thread Ardelean, Alexandru
On Fri, 2020-05-29 at 12:16 +0200, Johan Hovold wrote: > [External] > > On Fri, May 22, 2020 at 11:22:07AM +0300, Alexandru Ardelean wrote: > > This assignment is the more peculiar of the bunch as it assigns the parent > > of the platform-device's device (i.e. pdev->dev.parent) as the IIO device's

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread Dan Carpenter
Anyway, can you resend with the commit message re-written. To me the information that's most useful is from the lwn article: "In short, if pages are being pinned for access to the data contained within those pages, pin_user_pages() should be used. For cases where the intent is to manip

Re: [PATCH 4/5] iio: light: lm3533-als: remove explicit parent assignment

2020-05-29 Thread Johan Hovold
On Fri, May 22, 2020 at 11:22:07AM +0300, Alexandru Ardelean wrote: > This assignment is the more peculiar of the bunch as it assigns the parent > of the platform-device's device (i.e. pdev->dev.parent) as the IIO device's > parent. > > It's unclear whether this is intentional or not. > Hence it is

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread John Hubbard
On 2020-05-29 00:46, Dan Carpenter wrote: On Fri, May 29, 2020 at 11:57:09AM +0530, Souptick Joarder wrote: On Fri, May 29, 2020 at 11:46 AM Souptick Joarder wrote: On Thu, May 28, 2020 at 4:34 PM Dan Carpenter wrote: On Thu, May 28, 2020 at 02:32:42AM +0530, Souptick Joarder wrote: This

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread Dan Carpenter
On Fri, May 29, 2020 at 11:57:09AM +0530, Souptick Joarder wrote: > On Fri, May 29, 2020 at 11:46 AM Souptick Joarder > wrote: > > > > On Thu, May 28, 2020 at 4:34 PM Dan Carpenter > > wrote: > > > > > > On Thu, May 28, 2020 at 02:32:42AM +0530, Souptick Joarder wrote: > > > > This code was usi

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread Dan Carpenter
On Fri, May 29, 2020 at 12:38:20AM -0700, John Hubbard wrote: > On 2020-05-28 23:27, Souptick Joarder wrote: > > On Fri, May 29, 2020 at 11:46 AM Souptick Joarder > > wrote: > > > > > > On Thu, May 28, 2020 at 4:34 PM Dan Carpenter > > > wrote: > > > > > > > > On Thu, May 28, 2020 at 02:32:42

Re: [PATCH] staging: gasket: Convert get_user_pages*() --> pin_user_pages*()

2020-05-29 Thread John Hubbard
On 2020-05-28 23:27, Souptick Joarder wrote: On Fri, May 29, 2020 at 11:46 AM Souptick Joarder wrote: On Thu, May 28, 2020 at 4:34 PM Dan Carpenter wrote: On Thu, May 28, 2020 at 02:32:42AM +0530, Souptick Joarder wrote: This code was using get_user_pages_fast(), in a "Case 2" scenario (DM