Daeseok Youn [Mon, 20 Mar 2017 14:42:55 +0000 (14:42 +0000)]
staging: atomisp: simplify if statement in atomisp_get_sensor_fps()
If v4l2_subdev_call() gets the global frame interval values,
it returned 0 and it could be checked whether numerator is zero or not.
If the numerator is not zero, the fps could be calculated in this function.
If not, it just returns 0.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:42:41 +0000 (14:42 +0000)]
atomisp: remove a sysfs error message that can be used to log spam
Instead of logging this just report ERANGE as an error, which will give something close to the
right user space report.
The others of these were already removed by Dan Carpenter's patch.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Mon, 20 Mar 2017 14:42:23 +0000 (14:42 +0000)]
staging: atomisp: remove redudant condition in if-statement
The V4L2_FIELD_ANY is zero, so the (!field) is same meaning
with (field == V4L2_FIELD_ANY) in if-statement.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Mon, 20 Mar 2017 14:42:15 +0000 (14:42 +0000)]
staging: atomisp: remove else statement after return
It doesn't need to have else statement after return.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:42:05 +0000 (14:42 +0000)]
staging/atomisp: add ACPI dependency
Without ACPI, some of the code fails to build:
media/atomisp/platform/intel-mid/atomisp_gmin_platform.c: In function 'atomisp_register_i2c_module':
media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:174:7: error: dereferencing pointer to incomplete type 'struct acpi_device'
We could work around that in the code, but since we already have a hard
dependency on x86, adding the ACPI dependency seems to be the easiest
solution.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:55 +0000 (14:41 +0000)]
staging/atomisp: add PCI dependency
Without CONFIG_PCI, config space reads never return any data,
leading to undefined behavior that gcc warns about:
platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32_raw':
platform/intel-mid/intel_mid_pcihelpers.c:66:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized]
platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32_raw_ext':
platform/intel-mid/intel_mid_pcihelpers.c:84:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized]
platform/intel-mid/intel_mid_pcihelpers.c: In function 'intel_mid_msgbus_read32':
platform/intel-mid/intel_mid_pcihelpers.c:137:9: error: 'data' is used uninitialized in this function [-Werror=uninitialized]
With a dependency on CONFIG_PCI, we don't get this warning. This seems
safe as PCI config space accessors should always return something
when PCI is enabled.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:47 +0000 (14:41 +0000)]
staging/atomisp: add VIDEO_V4L2_SUBDEV_API dependency
The driver fails to build if this is disabled, so we need an explicit
Kconfig dependency:
drivers/staging/media/atomisp/pci/atomisp2/./atomisp_cmd.c:6085:48: error: 'struct v4l2_subdev_fh' has no member named 'pad'
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:38 +0000 (14:41 +0000)]
staging/atomisp: remove sh_css_lace_stat code
I ran into a build warning on my randconfig build box:
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c: In function 'ia_css_lace_statistics_free':
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:2845:64: error: parameter 'me' set but not used [-Werror=unused-but-set-parameter]
It turns out that not only the parameter is unused but the entire function has no
caller. Let's just remove it.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:29 +0000 (14:41 +0000)]
stating/atomisp: fix -Wold-style-definition warning
ia_css_dequeue_param_buffers does not have an arguement type, causing a warning:
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c: In function 'ia_css_dequeue_param_buffers':
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:3728:6: error: old-style function definition [-Werror=old-style-definition]
This adds a 'void' keywork to silence the warning.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Mon, 20 Mar 2017 14:41:20 +0000 (14:41 +0000)]
staging/atomisp: fix empty-body warning
Defining a debug function to nothing causes a warning with an empty block
after if()/else():
drivers/staging/media/atomisp/i2c/ov2680.c: In function 'ov2680_s_stream':
drivers/staging/media/atomisp/i2c/ov2680.c:1208:55: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
This changes the empty debug statement to dev_dbg(), which by default also
does nothing, but avoids this warning and also checks the format string.
As a side-effect, we can now use dynamic debugging to turn on the
output at runtime.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Mon, 20 Mar 2017 14:41:02 +0000 (14:41 +0000)]
staging: media: atomisp: add missing dependencies in Kconfig
Two dependencies were missing to build atomisp drivers:
_ MEDIA_CONTROLLER: to use the entity field of v4l2_subdev structure. Since
every atomisp driver needs MEDIA_CONTROLLER has a dependency, let's add it
to INTEL_ATOMISP
_ EFI: to use efivar_entry_get:
drivers/built-in.o: In function `gmin_get_config_var':
(.text+0xe062b): undefined reference to `efivar_entry_get'
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Mon, 20 Mar 2017 14:40:50 +0000 (14:40 +0000)]
staging: media: atomisp: select REGMAP_I2C needed by ap1302.c
REGMAP_I2C should be enabled to build the driver ap1302 because it uses
regmap functions.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 20 Mar 2017 14:40:41 +0000 (14:40 +0000)]
Staging: atomisp: fix an uninitialized variable bug
There are some error paths in atomisp_css_frame_allocate() which don't
initialize "res" so it could lead us to try release random memory.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Mon, 20 Mar 2017 14:40:32 +0000 (14:40 +0000)]
Staging: atomisp: fix locking in alloc_user_pages()
We call this function with the lock held and should also return with the
lock held as well. This one error path is not-consistent because we
should return without the lock held.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:40:20 +0000 (14:40 +0000)]
atomisp: remove another pair of 2400/2401 differences
The first of these checks the PCI identifier in order to decide what to do so needs no
ifdef. The other is simply a variation on what is dumped for debug - so favour dumping the
most.
Signed-off-by Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:40:06 +0000 (14:40 +0000)]
atomisp/imx: Fix locking bug on error path
This was reported by Dan Carpenter. When we error with an IMX 227 we don't release
the lock and the sensor would then hang.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:39:21 +0000 (14:39 +0000)]
atomisp: ia_css_bh_hmem_encode is a no-op so remove it
This is a do nothing function so we can replace it with nothing and eliminate it entirely.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:38:59 +0000 (14:38 +0000)]
atomisp: remove another layer of allocator indirection
Our driver only ever uses one set of routines for the allocators used by the CSS layer to
manage memory and the memory management on the ISP. We can thus remove the function vectors
and simply call the intended routines directly.
These routines in turn are simply wrappers around another layer of code so remove this
second layer of wrappers and call the hrt methods directly. In time we can remove this layer
of indirection as well.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:38:42 +0000 (14:38 +0000)]
atomisp: remove the unused debug wrapping from the mmgr layer
We don't need this layer of indirection and the debugging information is not used. With
this removed we can then go on to try and remove the abstraction layer entirely.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:38:27 +0000 (14:38 +0000)]
atomisp: remove aa kernel wrappers
The aa kernel is used but it consists of nothing more than a set of wrappers
for a memset and an assignment. Replace these at the calling points with the
memset and assignment.
Keep the structures for now - those should disappear as the next layer up
gets unwrapped.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alan Cox [Mon, 20 Mar 2017 14:38:13 +0000 (14:38 +0000)]
atomisp: remove the iefd2 kernel
While this is included and the headers pulled in nothing actually uses this
functionality in the driver, so remove it.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:27 +0000 (11:27 -0400)]
staging: unisys: include: channel.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:26 +0000 (11:27 -0400)]
staging: unisys: include: visorbus.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:25 +0000 (11:27 -0400)]
staging: unisys: include: iochannel.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:24 +0000 (11:27 -0400)]
staging: unisys: visorhba: visorhba_main.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:23 +0000 (11:27 -0400)]
staging: unisys: visorinput: visorinput.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:22 +0000 (11:27 -0400)]
staging: unisys: visorbus: vmcallinterface.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:21 +0000 (11:27 -0400)]
staging: unisys: visorbus: vbuschannel.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:20 +0000 (11:27 -0400)]
staging: unisys: visorbus: visorchipset.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:19 +0000 (11:27 -0400)]
staging: unisys: visorbus: controlvmchannel.h: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:18 +0000 (11:27 -0400)]
staging: unisys: visorbus: visorbus_main.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:17 +0000 (11:27 -0400)]
staging: unisys: visorbus: visorchannel.c: Fix #define formatting
In an effort to create a more uniform coding style within the Unisys
s-Par driver set, this patch adjusts the formatting of all #define
directives within this source file to match the following template,
and thereby eliminate irregular usage of whitespace:
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
The amount of whitespace used between the <token> and the <value> is
dependent on what is needed to make the surrounding #define directives
as uniform as possible.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:16 +0000 (11:27 -0400)]
staging: unisys: visorbus: remove #pragma directive
This patch removes the #pragma directive from visorchannel.h
and adds the __packed keyword to all structs to suppress structure
padding.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:15 +0000 (11:27 -0400)]
staging: unisys: visornic: remove inline functions
This patch removes inline functions in visornic_main.c.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:14 +0000 (11:27 -0400)]
staging: unisys: include: remove irrelevant comments
This patch removes comments that are no longer relevant
in channel.h.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:13 +0000 (11:27 -0400)]
staging: unisys: include: removed unused function declarations
This patch removes the unused function declarations
in channel.h.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jon Frisch [Fri, 17 Mar 2017 15:27:12 +0000 (11:27 -0400)]
staging: unisys: include: remove macro lengthof
This patch removes the unused macro lengthof.
Signed-off-by: Jon Frisch <jon.frisch@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:11 +0000 (11:27 -0400)]
staging: unisys: visorbus: Remove pointer cast that causes sparse warning
Removes unnecessary cast of to __iomem of a non-io-mapped pointer, thereby
eliminating the following sparse warning:
visorchannel.c:159:17: warning: cast adds address space to expression (<asn:2>)
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Fri, 17 Mar 2017 15:27:10 +0000 (11:27 -0400)]
staging: unisys: include: simplify spar_check_channel_client
The function spar_check_channel_client shouldn't need to do
readq's, it is referencing a local copy of the channel
header. Simplify it to just access the fields directly.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:09 +0000 (11:27 -0400)]
staging: unisys: include: Add function definition argument identifier
Adds identifier to function definition arguments to satisfy checkpatch
warnings:
WARNING: function definition argument 'struct visor_driver *' should also
have an identifier name
WARNING: function definition argument 'struct visor_driver *' should also
have an identifier name
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:08 +0000 (11:27 -0400)]
staging: unisys: visorinput: Remove unnecessary usage of local variable
Remove local variable on stack by directly returning the value in the
array.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:07 +0000 (11:27 -0400)]
staging: unisys: visorbus: Rename what vmcallinterface.h #define
Renames __IOMONINTF_H__ to __VMCALLINTERFACE_H__, which more closely
reflects the naming conventions of the code.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:06 +0000 (11:27 -0400)]
staging: unisys: visornic: Move function to appropriate location
Move function add_physinfo_entries() to visornic_main.c, which is the
only function where it is used.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:05 +0000 (11:27 -0400)]
staging: unisys: include: Change out-of-date references
Replace references to virtpci to visornic in iochannel.h.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:04 +0000 (11:27 -0400)]
staging: unisys: visorbus: Rename #define VMCALL_IO_CONTROLVM_ADDR
Rename #define VMCALL_IO_CONTROLVM_ADDR to VMCALL_CONTROLVM_ADDR, as this
vmcall can be used by any partition, not just the IO partition.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:03 +0000 (11:27 -0400)]
staging: unisys: visorbus: Remove useless checks in visorbus_main.c
Removes checks that all visor_device instances have an associated
visorchannel. Due to the design of the s-Par drivers these checks are
unnecessary.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:02 +0000 (11:27 -0400)]
staging: unisys: include: Remove unused visorchannel #defines
Removes unused #defines pertaining to visorchannel UUIDs.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Fri, 17 Mar 2017 15:27:01 +0000 (11:27 -0400)]
staging: unisys: include: Wrap macro argument in parenthesis
Addresses checkpatch check by wrapping macro argument in parenthesis.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:27:00 +0000 (11:27 -0400)]
staging: unisys: visorbus: remove inline keyword in visorchannel.c
Removed inline keyword from functions sig_read_data and
sig_write_data in visorchannel.c
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:59 +0000 (11:26 -0400)]
staging: unisys: visorbus: remove inline keyword from visorchipset
Removed inline keyword from the functions in visorchipset:
* issue_vmcall_io_controlvm_addr()
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:58 +0000 (11:26 -0400)]
staging: unisys: visorhba: remove inline keyword
Removed inline keyword from the function complete_taskmgmt_command
in visorhba_main.c
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:57 +0000 (11:26 -0400)]
staging: unisys: visorbus: remove unused functions in visorchipset
Removed unused functions issue_vmcall_update_physical_time() and
issue_vmcall_query_guest_virtual_time_offset() from visorchipset.c
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:56 +0000 (11:26 -0400)]
staging: unisys: include: remove unused macro spar_signal_init
Removed unused macro spar_signal_init from channel.h
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:55 +0000 (11:26 -0400)]
staging: unisys: include: remove unused function spar_check_channel_server
Removed unused function spar_check_channel_server from channel.h
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sameer Wadgaonkar [Fri, 17 Mar 2017 15:26:54 +0000 (11:26 -0400)]
staging: unisys: visorbus: removed unused structure pci_id
Removed unused structure pci_id from controlvmchannel.h
Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Curtin [Fri, 17 Mar 2017 15:26:53 +0000 (11:26 -0400)]
staging: unisys: visorbus_main: removed revference to virtpci
The comment referencing virtpci was irrelevant.
Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Curtin [Fri, 17 Mar 2017 15:26:52 +0000 (11:26 -0400)]
staging: unisys: include: replaced COVERQ with DIV_ROUND_UP
COVERQ is functionally equivalent to DIV_ROUND_UP and was only used
to define the COVER macro.
Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dylan Leggio [Fri, 17 Mar 2017 00:57:03 +0000 (20:57 -0400)]
Staging: wilc1000: fix two typos in #define's
GAS_INTIAL_REQ should be GAS_INITIAL_REQ.
GAS_INTIAL_RSP should be GAS_INITIAL_RSP.
Improves readability of code.
Signed-off-by: Dylan Leggio <dleggio1@binghamton.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Thu, 16 Mar 2017 23:21:45 +0000 (23:21 +0000)]
staging: wilc1000: fix incorrect copy of pmkid data
The pmkid data is meant be be copied to the previous item in the
pmkidlist, however the code is just copying the data to itself because
the src index into pmkidlist is the same as the dst index into pmkidlist.
Fix this with i + 1 instead of i.
Detected by CoverityScan,CID#
13339465 ("Overlapping buffer in memory copy")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Fri, 17 Mar 2017 02:31:09 +0000 (22:31 -0400)]
staging: media: atomisp: add missing include in vlv2_plat_clock.c
To use IO functions like writel, readl, ioremap_nocache and iounmap,
linux/io.h should be included.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Fri, 17 Mar 2017 03:25:51 +0000 (08:55 +0530)]
staging: lustre: llite: rw26: Remove unused function definition
The patch removes unused function definition ll_get_user_pages().
The use of ll_get_user_pages() was replaced with iov_iter_get_pages_alloc()
in commit
91f79c43d1b54d7154b118860d81b39bad07dfff.
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Okash Khawaja [Thu, 16 Mar 2017 08:10:17 +0000 (08:10 +0000)]
staging: speakup: move those functions which do outgoing serial comms, into serialio.c
This moves spk_synth_immediate and spk_serial_synth_probe functions into
serialio.c. These functions do outgoing serial comms. The move is a step
towards collecting all serial comms in serialio.c. This also renames
spk_synth_immediate to spk_serial_synth_immediate.
Code inside those functions has not been changed. Along the way, this patch
also fixes a couple of spots which were calling spk_synth_immediate directly,
so that the calls now happen via the spk_syth struct.
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mohsin Shan [Thu, 16 Mar 2017 03:51:42 +0000 (20:51 -0700)]
Staging: goldfish: use __func__ instead of embedded function names
Embedded function names are less appropriate to use when
refactoring, can cause function renaming. Prefer the use
of "%s", __func__ to embedded function names
Signed-off-by: Mohsin Shan <mohsinshan1k@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Fri, 17 Mar 2017 02:13:51 +0000 (22:13 -0400)]
Revert "staging: media: atomisp: fill properly hmm_bo_type_strings when ION is disabled"
This reverts commit
fde469701c7efabebf885e785edf367bfb1a8f3f.
Adding a preprocessor condition is not the best solution to fix this
issue. Let's revert this commit before fixing this problem in a more
appropriate way.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 15 Mar 2017 20:34:20 +0000 (22:34 +0200)]
staging: gdm724x: fix checkpatch.pl camelCase warning
Fixes the checkpatch.pl warning: Avoid CamelCase
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tuomo Rinne [Wed, 15 Mar 2017 21:32:43 +0000 (21:32 +0000)]
staging: vt6655: Copy argument names from function definition to declaration to fix checkpatch warnings
Copied function argument names from definition to delcaration. This
fixes some checkpatch warnings.
Signed-off-by: Tuomo Rinne <tuomo.rinne@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Wed, 15 Mar 2017 03:32:13 +0000 (23:32 -0400)]
staging: sm750fb: Removes unused variable from sm750_hw_copyarea
Removes unused variable opSign from sm750_hw_copyarea. Identified
using coccinelle script 'unused.cocci'.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tamara Diaconita [Tue, 14 Mar 2017 12:10:38 +0000 (14:10 +0200)]
staging: wilc1000: Remove unnecessary brackets
Remove unnecessary brackets and correspondingly unindent code.
Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tamara Diaconita [Tue, 14 Mar 2017 12:10:37 +0000 (14:10 +0200)]
staging: wilc1000: Correct name of variables
Correct misspelled variables: 'happended' to 'happened' to make the
code grammatically correct.
Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tamara Diaconita [Tue, 14 Mar 2017 12:10:36 +0000 (14:10 +0200)]
staging: wilc1000: Declare variables to top of function
Move declaration of variables to top of function to make the code more
readable.
Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 14 Mar 2017 23:44:29 +0000 (10:44 +1100)]
staging: dgnc: preserve return code
Return code from tty_check_change() should be being
preserved.
Preserve return code from call to tty_check_change().
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 05:14:38 +0000 (16:14 +1100)]
staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT
Checkpatch emits WARNING and CHECK for prototype declarations.
WARNING: function definition argument 'void *' should also have an identifier name
CHECK: Alignment should match open parenthesis
Also prototype parameters wrap more than is necessary.
Tidy up function prototypes. Fix 5 error/warning instances.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 05:14:37 +0000 (16:14 +1100)]
staging: ks7010: fix checkpatch BLOCK_COMMENT_STYLE
Checkpatch emits WARNING: Block comments use a trailing */ on a
separate line.
Move comments to (kernel doc format) struct comment.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 05:14:36 +0000 (16:14 +1100)]
staging: ks7010: fix checkpatch SPACING
Checkpatch emits WARNING: Unnecessary space before function pointer
arguments.
Remove unnecessary space before function pointer.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 02:57:32 +0000 (13:57 +1100)]
staging: ks7010: remove dead code
Driver has dead code compiled out using preprocessor directives. TODO
file asks for these not to be removed - ignore this.
Remove dead code. Remove 'do not remove #if 0/1 ...' from TODO file.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 02:57:31 +0000 (13:57 +1100)]
staging: ks7010: remove superfluous comments
Driver uses custom function comment format. These comments are on
functions with internal likage. Comment string /*--------/* adds
nothing to the driver. Comment 'Wireless Handler' does not have allot
of meaning.
Remove superfluous function comments. Leave comments that add meaning.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Tue, 14 Mar 2017 10:20:12 +0000 (21:20 +1100)]
staging: ks7010: remove custom return values
Driver code uses custom return values (often positive) to signal error
condition instead of using standard kernel error codes.
Replace custom return values with standard kernel error codes.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobin C. Harding [Wed, 15 Mar 2017 01:01:07 +0000 (12:01 +1100)]
staging: ks7010: fix off by one error
Bug introduced in commit
7676b72 by Tobin C. Harding.
Remove equals sign from comparison, fixing off by one error.
Fixes: 7676b72428e8 ("staging: ks7010: move comparison to right hand side")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:56:44 +0000 (10:56 +0300)]
staging: atomicsp: fix a loop timeout
It's a post-op loop so we timeout with "max_wait" set to -1, not 0.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Tue, 14 Mar 2017 18:43:21 +0000 (00:13 +0530)]
staging: rtl8192u: Remove multiple assignments
This patch removes multiple assignments by factorizing them.
This was done with Coccinelle for the if branch. For the else part
the change was done manually since Coccinelle only detects constants.
Braces were also added to the else part to remove the checkpatch
warning, "braces should be on all arms of if-else statements".
@@
identifier i1,i2;
constant c;
@@
- i1=i2=c;
+ i1=c;
+ i2=c;
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrii Vladyka [Tue, 14 Mar 2017 09:29:44 +0000 (11:29 +0200)]
staging: rtl8188eu: removed blank lines coding style problem
Fix 'multiple blank lines' coding style problem reported by checkpatch.pl.
Signed-off-by: Andrii Vladyka <tulup@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:56:19 +0000 (10:56 +0300)]
staging: rtl8188eu: fix some inverted conditions
We converted these conditions from == NULL and != NULL but messed up
and inverted some.
Fixes: e31447f934d3 ("staging: rtl8188eu: Replace x==NULL by !x")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Wed, 15 Mar 2017 16:47:41 +0000 (22:17 +0530)]
staging: vc04_services: Replace typedef with struct
Using typedef for a structure type and upper case struct names is not
suggested in Linux kernel coding style guidelines. Hence, occurences
of typedefs have been removed and struct names converted to lowercase
in the file. Grep was also used to ensure that all occurence of the
typedefs have been removed. The module compiles without any warnings
or errors.
Script 1:
@r1@
type T;
@@
typedef struct { ... } T;
@script:python c1@
T2;
T << r1.T;
@@
if T[-2:] =="_T":
coccinelle.T2 = T[:-2].lower();
print T
else:
coccinelle.T2=T.lower();
@r2@
type r1.T;
identifier c1.T2;
@@
-typedef
struct
+ T2
{ ... }
-T
;
@r3@
type r1.T;
identifier c1.T2;
@@
- T
+ struct T2
Script 2:
@@
typedef VCHIQ_ELEMENT_T;
@@
(
- VCHIQ_ELEMENT_T
+ struct vchiq_element
)
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gargi Sharma [Wed, 15 Mar 2017 13:11:11 +0000 (18:41 +0530)]
staging: vc04_services: Remove type and function prototype
The function prototype is for a function that is not even in
the kernel, and hence has been removed.
The type VCHIQ_SHARED_MEM_INFO_T is not used anywhere in the
kernel as well.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jean-Baptiste Abbadie [Tue, 14 Mar 2017 19:14:20 +0000 (20:14 +0100)]
staging: vc04_services: Remove unused functions
These four functions are not used and report errors with sparse.
Signed-off-by: Jean-Baptiste Abbadie <jb@abbadie.fr>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Wed, 15 Mar 2017 18:09:21 +0000 (14:09 -0400)]
staging: media: atomisp: remove duplicate includes
These duplicate includes have been found with scripts/checkincludes.pl
but they have been removed manually to avoid removing false positives.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jérémy Lefaure [Wed, 15 Mar 2017 18:09:20 +0000 (14:09 -0400)]
staging: media: atomisp: fill properly hmm_bo_type_strings when ION is disabled
When CONFIG_ION is disabled, HMM_BO_LAST is 3. In this case, "i" should
not be added in hmm_bo_type_strings.
Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Wed, 15 Mar 2017 05:56:19 +0000 (14:56 +0900)]
staging: atomisp: fix "alignment should match open parenthesis"
Fix checkpatch.pl issues in atomisp_cmd.c
: "CHECK: Alignment should match open parenthesis"
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Wed, 15 Mar 2017 05:55:58 +0000 (14:55 +0900)]
staging: atomisp: remove useless #ifdef ISP2401 on top of atomisp_cmd.c
There is no reason to have "#ifdef ISP2401" condition
on top of atomisp_cmd.c file
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Wed, 15 Mar 2017 05:55:29 +0000 (14:55 +0900)]
staging: atomisp: fix inconsistent indenting
Fix warnings from the smatch tool
atomisp_cmd.c:5698
atomisp_set_fmt_to_snr() warn: inconsistent indenting
atomisp_cmd.c:5714
atomisp_set_fmt_to_snr() warn: inconsistent indenting
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Youn [Wed, 15 Mar 2017 05:55:06 +0000 (14:55 +0900)]
staging: atomisp: fix unsigned int comparison with less than zero
Fix warnings from the smatch tool
atomisp_cmd.c:2649
atomisp_set_array_res() warn:
unsigned 'config->width' is never less than zero.
atomisp_cmd.c:2650
atomisp_set_array_res() warn:
unsigned 'config->height' is never less than zero.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Wed, 15 Mar 2017 04:03:14 +0000 (00:03 -0400)]
staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_get_size
Repaces pointer comparison to 0 with NULL in ia_css_queue_get_size
to improve code readability. Identified with coccinelle script
'badzero.cocci'.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Wed, 15 Mar 2017 04:03:09 +0000 (00:03 -0400)]
staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_dequeue
Repaces pointer comparison to 0 with NULL in ia_css_queue_dequeue
to improve code readability. Identified with coccinelle script
'badzero.cocci'.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tahia Khan [Wed, 15 Mar 2017 04:03:05 +0000 (00:03 -0400)]
staging: atomisp: Removes pointer comparison to 0 in ia_css_queue_enqueue
Repaces pointer comparison to 0 with NULL in ia_css_queue_enqueue
to improve code readability. Identified with coccinelle script
'badzero.cocci'.
Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tobias Regnery [Tue, 14 Mar 2017 11:47:17 +0000 (12:47 +0100)]
staging: media: atomisp: fix build error in ov5693 driver
The ov5693 driver unconditionally uses the entity member of struct v4l2_subdev.
However this member is conditionally compiled in if CONFIG_MEDIA_CONTROLLER is
set. This results in the following build error if CONFIG_MEDIA_CONTROLLER is
not set:
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c: In function 'ov5693_remove':
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:1961:31: error: 'struct v4l2_subdev' has no member named 'entity'
media_entity_cleanup(&dev->sd.entity);
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2023:9: error: 'struct v4l2_subdev' has no member named 'entity'
dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
^
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2045:39: error: 'struct v4l2_subdev' has no member named 'entity'
ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
Add the corresponding Kconfig dependency to solve this error.
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:53:52 +0000 (10:53 +0300)]
Staging: atomisp: kfreeing a devm allocated pointer
We shouldn't pass devm allocated pointers to kfree() or it leads to a
double free.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:55:01 +0000 (10:55 +0300)]
staging: atomisp: silence an array overflow warning
Static checkers complain that we should check if "i" is in bounds
before we check if "var8[i]" is a NUL char. This bug is harmless but
also easy to fix.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:51:50 +0000 (10:51 +0300)]
staging/atomisp: silence uninitialized variable warnings
These print an uninitialized value for "opt". Let's just remove the
printk.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 14 Mar 2017 07:51:31 +0000 (10:51 +0300)]
staging: atomisp: off by one in atomisp_acc_load_extensions()
We should be doing i-- on all error paths but we don't if the loop
finishes successfully. I've re-arranged this so that we don't read
beyond the end of acc_flag_to_pipe[] array.
Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Tue, 14 Mar 2017 05:40:21 +0000 (06:40 +0100)]
staging: media: atomisp: fix semicolon.cocci warnings
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>