openwrt/staging/blogic.git
7 years agostaging: ks7010: fix checkpatch LINE_SPACING
Tobin C. Harding [Tue, 21 Mar 2017 02:37:03 +0000 (13:37 +1100)]
staging: ks7010: fix checkpatch LINE_SPACING

Checkpatch emits CHECK: Please use a blank line after
function/struct/union/enum declarations.

Add blank line after function definition.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vchiq_arm: Fix MODULE_LICENSE
Stefan Wahren [Sat, 18 Mar 2017 08:42:11 +0000 (08:42 +0000)]
staging: vchiq_arm: Fix MODULE_LICENSE

Regarding to the header the driver is licensed under BSD and GPL.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: media: Unmap and release region obtained by ioremap_nocache
Arvind Yadav [Fri, 17 Mar 2017 06:51:23 +0000 (12:21 +0530)]
Staging: media: Unmap and release region obtained by ioremap_nocache

Free memory mapping, if vpfe_ipipe_init is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging:sm750fb: Code readability is improved.
Arushi Singhal [Mon, 20 Mar 2017 14:06:56 +0000 (19:36 +0530)]
staging:sm750fb: Code readability is improved.

New variables are added to make the code more readable.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8712: checkpatch: Avoid multiple line dereferences
Ding-Chi Wang [Sat, 18 Mar 2017 08:59:14 +0000 (16:59 +0800)]
staging: rtl8712: checkpatch: Avoid multiple line dereferences

"WARNING: Avoid multiple line dereference - prefer 'poid_par_priv->information_buf_len'"
"WARNING: Avoid multiple line dereference - prefer 'padapter->registrypriv.dev_network.Configuration'"
"WARNING: Avoid multiple line dereference - prefer 'Adapter->mppriv.workparam.io_value'"

Signed-off-by: Ding-Chi Wang <dcwang.tw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: libcfs: Define pr_fmt() to include relevant name
Narcisa Ana Maria Vasile [Sat, 18 Mar 2017 16:56:00 +0000 (18:56 +0200)]
staging: lustre: libcfs: Define pr_fmt() to include relevant name

Define a pr_fmt() for tracefile.c
Remove redundant prefix 'Lustre' from pr_*() calls.

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: libcfs: Replace printk() with pr_*()
Narcisa Ana Maria Vasile [Sat, 18 Mar 2017 16:55:25 +0000 (18:55 +0200)]
staging: lustre: libcfs: Replace printk() with pr_*()

Convert printk() calls into corresponding pr_*() calls.

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: media: atomisp: fix build errors when PM is disabled
Jérémy Lefaure [Tue, 21 Mar 2017 02:48:26 +0000 (22:48 -0400)]
staging: media: atomisp: fix build errors when PM is disabled

The function atomisp_restore_iumit_reg is unused when PM is disabled.
Adding __maybe_unused to the function definition avoids a warning.

The function atomisp_mrfld_power_down is defined only when PM is
enabled. So in atomisp_pci_probe, it should be called only when PM is
enabled.

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: atomisp: remove useless condition in if-statements
Daeseok Youn [Tue, 21 Mar 2017 02:12:57 +0000 (11:12 +0900)]
staging: atomisp: remove useless condition in if-statements

The css_pipe_id was checked with 'CSS_PIPE_ID_COPY' in previous if-
statement. In this case, if the css_pipe_id equals to 'CSS_PIPE_ID_COPY',
it could not enter the next if-statement. But the "next" if-statement
has the condition to check whether the css_pipe_id equals to
'CSS_PIPE_ID_COPY' or not. It should be removed.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: media: atomisp: Remove unnecessary braces.
Varsha Rao [Sun, 19 Mar 2017 12:36:24 +0000 (18:06 +0530)]
staging: media: atomisp: Remove unnecessary braces.

Remove braces which are not required to fix the check patch issue. The
following coccinelle script is used to fix this issue.

@@
expression e,e1;
@@
if(e)
-{
 e1;
-}

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: media: atomisp: Remove unnecessary blank lines.
Varsha Rao [Sun, 19 Mar 2017 12:33:13 +0000 (18:03 +0530)]
staging: media: atomisp: Remove unnecessary blank lines.

Remove multiple blank lines, which are not required. This patch fixes
the following check patch issue:

CHECK: Please don't use multiple blank lines

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: media: atomisp: Fix block comments warning.
Varsha Rao [Sun, 19 Mar 2017 12:30:04 +0000 (18:00 +0530)]
staging: media: atomisp: Fix block comments warning.

Use kernel preferred block commenting style, to fix the checkpatch
issue.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: media: atomisp: Added spaces around arithmetic operators.
Varsha Rao [Sun, 19 Mar 2017 12:27:21 +0000 (17:57 +0530)]
staging: media: atomisp: Added spaces around arithmetic operators.

Add spaces around arithmetic operators (/, +, -), to fix the checkpatch
issue.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: Add support for simultanous HDMI and Headphone audio
Michael Zoran [Wed, 15 Mar 2017 00:01:25 +0000 (17:01 -0700)]
staging: bcm2835-audio: Add support for simultanous HDMI and Headphone audio

The firmware for the Raspberry PI already supports simultanous output
of audio through both the HDMI and the Headphone jack.  The current
implementation of ALSA doesn't expose this well to user mode since
the firmware audio is represented as a single card.

A newer approach is taken here and a virtual card is created for each
output(HDMI, Headphones, and Traditional ALSA).  The firmware has
the concept of channels or streams for which the number to use is
passed in the device tree. These streams are allocated to each of the
virtual cards.

As a side effect of this change, since each output is represented
independenly it's now very easy to use PulseAudio to control the
priorities of the outputs.

Testing:

Audacity and VLC were both loaded at the same time.  Each application
was assigned to a different card. With this change I was able to play
different music files at the same time through the HDMI and Headphones
jacks and control the audio independently.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agobcm2835-v4l2: Fix buffer overflow problem
Dave Stevenson [Tue, 14 Mar 2017 15:10:40 +0000 (08:10 -0700)]
bcm2835-v4l2: Fix buffer overflow problem

https://github.com/raspberrypi/linux/issues/1447
port_parameter_get() failed to account for the header
(u32 id and u32 size) in the size before memcpying
the response into the response buffer, so overrunning
the provided buffer by 8 bytes.

Account for those bytes, and also a belt-and-braces
check to ensure we never copy more than *value_size
bytes into value.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Tested-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vc04_services: make BCM_VIDEOCORE tristate
Arnd Bergmann [Mon, 20 Mar 2017 09:35:28 +0000 (10:35 +0100)]
staging: vc04_services: make BCM_VIDEOCORE tristate

Adding the 'bool' symbol brought back a randconfig build bug that
I had fixed before:

drivers/staging/built-in.o: In function `vchiq_probe':
(.text+0x1da30): undefined reference to `rpi_firmware_get'
drivers/staging/built-in.o: In function `vchiq_platform_init':
(.text+0x27494): undefined reference to `rpi_firmware_property'

The problem is that when RASPBERRYPI_FIRMWARE is a loadable module,
but BCM2835_VCHIQ can again be built-in. Making BCM_VIDEOCORE
itself tristate will make Kconfig honor the dependency correctly.

Fixes: 6bbfe4a76158 ("staging: vc04_services: Create new BCM_VIDEOCORE setting for VideoCore services.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vc04_services: fix NULL pointer dereference on pointer 'service'
Colin Ian King [Mon, 20 Mar 2017 14:08:50 +0000 (14:08 +0000)]
staging: vc04_services: fix NULL pointer dereference on pointer 'service'

Currently, if pservice is null then service is set to NULL and immediately
afterwards service is dereferenced causing a null pointer dereference. Fix
this by bailing out early of the function with a null return.

Detected by CoverityScan, CID#1419681 ("Explicit null dereferenced")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: atomisp: simplify if statement in atomisp_get_sensor_fps()
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>
7 years agoatomisp: remove a sysfs error message that can be used to log spam
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>
7 years agostaging: atomisp: remove redudant condition in if-statement
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>
7 years agostaging: atomisp: remove else statement after return
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>
7 years agostaging/atomisp: add ACPI dependency
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>
7 years agostaging/atomisp: add PCI dependency
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>
7 years agostaging/atomisp: add VIDEO_V4L2_SUBDEV_API dependency
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>
7 years agostaging/atomisp: remove sh_css_lace_stat code
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>
7 years agostating/atomisp: fix -Wold-style-definition warning
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>
7 years agostaging/atomisp: fix empty-body warning
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>
7 years agostaging: media: atomisp: add missing dependencies in Kconfig
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>
7 years agostaging: media: atomisp: select REGMAP_I2C needed by ap1302.c
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>
7 years agoStaging: atomisp: fix an uninitialized variable bug
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>
7 years agoStaging: atomisp: fix locking in alloc_user_pages()
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>
7 years agoatomisp: remove another pair of 2400/2401 differences
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>
7 years agoatomisp/imx: Fix locking bug on error path
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>
7 years agoatomisp: ia_css_bh_hmem_encode is a no-op so remove it
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>
7 years agoatomisp: remove another layer of allocator indirection
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>
7 years agoatomisp: remove the unused debug wrapping from the mmgr layer
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>
7 years agoatomisp: remove aa kernel wrappers
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>
7 years agoatomisp: remove the iefd2 kernel
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>
7 years agostaging: unisys: include: channel.h: Fix #define formatting
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>
7 years agostaging: unisys: include: visorbus.h: Fix #define formatting
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>
7 years agostaging: unisys: include: iochannel.h: Fix #define formatting
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>
7 years agostaging: unisys: visorhba: visorhba_main.c: Fix #define formatting
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>
7 years agostaging: unisys: visorinput: visorinput.c: Fix #define formatting
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>
7 years agostaging: unisys: visorbus: vmcallinterface.h: Fix #define formatting
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>
7 years agostaging: unisys: visorbus: vbuschannel.h: Fix #define formatting
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>
7 years agostaging: unisys: visorbus: visorchipset.c: Fix #define formatting
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>
7 years agostaging: unisys: visorbus: controlvmchannel.h: Fix #define formatting
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>
7 years agostaging: unisys: visorbus: visorbus_main.c: Fix #define formatting
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>
7 years agostaging: unisys: visorbus: visorchannel.c: Fix #define formatting
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>
7 years agostaging: unisys: visorbus: remove #pragma directive
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>
7 years agostaging: unisys: visornic: remove inline functions
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>
7 years agostaging: unisys: include: remove irrelevant comments
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>
7 years agostaging: unisys: include: removed unused function declarations
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>
7 years agostaging: unisys: include: remove macro lengthof
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>
7 years agostaging: unisys: visorbus: Remove pointer cast that causes sparse warning
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>
7 years agostaging: unisys: include: simplify spar_check_channel_client
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>
7 years agostaging: unisys: include: Add function definition argument identifier
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>
7 years agostaging: unisys: visorinput: Remove unnecessary usage of local variable
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>
7 years agostaging: unisys: visorbus: Rename what vmcallinterface.h #define
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>
7 years agostaging: unisys: visornic: Move function to appropriate location
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>
7 years agostaging: unisys: include: Change out-of-date references
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>
7 years agostaging: unisys: visorbus: Rename #define VMCALL_IO_CONTROLVM_ADDR
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>
7 years agostaging: unisys: visorbus: Remove useless checks in visorbus_main.c
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>
7 years agostaging: unisys: include: Remove unused visorchannel #defines
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>
7 years agostaging: unisys: include: Wrap macro argument in parenthesis
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>
7 years agostaging: unisys: visorbus: remove inline keyword in visorchannel.c
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>
7 years agostaging: unisys: visorbus: remove inline keyword from visorchipset
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>
7 years agostaging: unisys: visorhba: remove inline keyword
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>
7 years agostaging: unisys: visorbus: remove unused functions in visorchipset
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>
7 years agostaging: unisys: include: remove unused macro spar_signal_init
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>
7 years agostaging: unisys: include: remove unused function spar_check_channel_server
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>
7 years agostaging: unisys: visorbus: removed unused structure pci_id
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>
7 years agostaging: unisys: visorbus_main: removed revference to virtpci
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>
7 years agostaging: unisys: include: replaced COVERQ with DIV_ROUND_UP
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>
7 years agoStaging: wilc1000: fix two typos in #define's
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>
7 years agostaging: wilc1000: fix incorrect copy of pmkid data
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>
7 years agostaging: media: atomisp: add missing include in vlv2_plat_clock.c
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>
7 years agostaging: lustre: llite: rw26: Remove unused function definition
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>
7 years agostaging: speakup: move those functions which do outgoing serial comms, into serialio.c
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>
7 years agoStaging: goldfish: use __func__ instead of embedded function names
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>
7 years agoRevert "staging: media: atomisp: fill properly hmm_bo_type_strings when ION is disabled"
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>
7 years agostaging: gdm724x: fix checkpatch.pl camelCase warning
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>
7 years agostaging: vt6655: Copy argument names from function definition to declaration to fix...
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>
7 years agostaging: sm750fb: Removes unused variable from sm750_hw_copyarea
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>
7 years agostaging: wilc1000: Remove unnecessary brackets
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>
7 years agostaging: wilc1000: Correct name of variables
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>
7 years agostaging: wilc1000: Declare variables to top of function
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>
7 years agostaging: dgnc: preserve return code
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>
7 years agostaging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT
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>
7 years agostaging: ks7010: fix checkpatch BLOCK_COMMENT_STYLE
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>
7 years agostaging: ks7010: fix checkpatch SPACING
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>
7 years agostaging: ks7010: remove dead code
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>
7 years agostaging: ks7010: remove superfluous comments
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>
7 years agostaging: ks7010: remove custom return values
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>
7 years agostaging: ks7010: fix off by one error
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>
7 years agostaging: atomicsp: fix a loop timeout
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>
7 years agostaging: rtl8192u: Remove multiple assignments
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>
7 years agostaging: rtl8188eu: removed blank lines coding style problem
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>
7 years agostaging: rtl8188eu: fix some inverted conditions
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>
7 years agostaging: vc04_services: Replace typedef with struct
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>