Every call to the function waitNextVerticalSync() used the macro
primaryWaitVerticalSync(), so the macro was removed and the function
waitNextVerticalSync() renamed to primary_wait_vertical_sync().
With this change, an unnecessary 'if' statement was removed together
with the lines within the 'else' statement, because it was never
satisfied.
The modified function was refined to better match the Kernel coding
style.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The original arm implementation uses dmac_map_area which is not
portable. Replace it with an architecture neutral version
which uses dma_map_sg.
As you can see that for larger page sizes, the dma_map_sg
implementation is faster then the original unportable dma_map_area
implementation.
Test dmac_map_area dma_map_page dma_map_sg
vchiq_test -b 4 10000 51us/iter 76us/iter 76us
vchiq_test -b 8 10000 70us/iter 82us/iter 91us
vchiq_test -b 16 10000 94us/iter 118us/iter 121us
vchiq_test -b 32 10000 146us/iter 173us/iter 187us
vchiq_test -b 64 10000 263us/iter 328us/iter 299us
vchiq_test -b 128 10000 529us/iter 631us/iter 595us
vchiq_test -b 256 10000 2285us/iter 2275us/iter 2001us
vchiq_test -b 512 10000 4372us/iter 4616us/iter 4123us
For message sizes >= 64KB, dma_map_sg is faster then dma_map_page.
For message size >= 256KB, the dma_map_sg is the fastest
implementation.
"Normal" messages sizes should be about 1MB which is beyond
the length that this change shows a speed increase.
This is v2 of the patch which includes extra WARN_ONs and
incorporates feedback from Eric Anholt <eric@anholt.net>.
Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes checkpatch warning: Missing a blank line after declarations
Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes checkpatch warning: line over 80 characters
Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes checkpatch warning: space before tabs
Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes checkpatch error: Macros with complex values should be enclosed in parentheses
Signed-off-by: Jiong Du <jiongdu0.0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
DPAA2 will not support MC firmware versions prior to MC v10.x.
Update the MC interface code and drivers to reflect this.
-update the object .h files and code that builds commands to include
the new command version in the command header
-object versions are no longer available in the object attributes,
so remove references to them and instead get the version from the
new get_api_version() command
-create/destroy commands for all objects have new arguments
-dpmng_get_container_id() is replaced by dprc_get_container_id()
This supports a hardware ABI change and thus to match the new ABI
all the above changes need to happen in a single patch.
All MC firmware versions >= 10 will be supported going forward.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Many source files have evolved without copyright date
updates. Update the dates to reflect work through
2016.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
improve and clarify miscellaneous comments in the bus driver
and allocator
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
improve some messages by shortening and rewording
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
clarify some error messages by printing the actual function name
involved
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
define pr_fmt so non dev_* messages will have an fsl-mc prefix
and remove "fsl-mc" from messages where it would now be redundant
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Be consistent and use kernel-preferred multi-line comment style
everywhere.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To improve readability for structs and function definitions, separate type
and variable name by a single space, instead of an inconsistent number of
tabs.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
align function arguments that were not aligned to the starting parenthesis
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
use one tab to separate name and value in #define definitions
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-German has moved on to other things and wished to be
removed as a maintainer
-cleanup the driver description to use the proper name
of the driver (i.e. the fsl-mc bus driver) and remove incorrect
references to Freescale
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Block comments should align the * on each line as reported by checkpatch.pl
Signed-off-by: Nadim Almas <nadim.902@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch introduces the function start_sync_ep() and relocates the
triggers for synchronization to this function.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch puts the synchronization procedure trigger for asynchronous
channels into the function hdm_configure_channel. Likewise, it removes
triggering of hardware specific synchronization for other channel types
from the probe function as it is not required.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch stops all started channels whenever the function most_nd_open
returns an error. Additionally, it renames variable wait_res to ret for
the consistency.
Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This is a patch to the vpfe_video.c file that fixes an indentation
warning reported by checkpatch.pl
Signed-off-by: Leo Sperling <leosperling97@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The ad5933_i2c_read function returns an error code to indicate
whether it could read data or not. However ad5933_work() ignores
this return code and just accesses the data unconditionally,
which gets detected by gcc as a possible bug:
drivers/staging/iio/impedance-analyzer/ad5933.c: In function 'ad5933_work':
drivers/staging/iio/impedance-analyzer/ad5933.c:649:16: warning: 'status' may be used uninitialized in this function [-Wmaybe-uninitialized]
This adds minimal error handling so we only evaluate the
data if it was correctly read.
Link: https://patchwork.kernel.org/patch/8110281/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fix missing space around operators in rtw_alloc2d function in
osdep_service.c
Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eliminates all checkpatch.pl BLOCK_COMMENT_STYLE warnings in
sm750fb, and coincidentally eliminates some line-length (80)
warnings.
Signed-off-by: Eric S. Stone <esstone@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Block comments should align the * on each line as reported by checkpatch.pl
Signed-off-by: Nadim Almas <nadim.902@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace direct comparisons to NULL i.e.
'x == NULL' with '!x'.
This problem was detected by checkpatch.
Signed-off-by: Maninder Singh <maninder.s2@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Semaphore are going away in the future, so remove the unused function
wilc_lock_timeout which calls a semaphore api but has no users.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch makes locking in visorchannel_signalempty statically
deterministic.
As a result this patch fixes the sparse warning:
Context imbalance in 'visorchannel_signalempty' - different lock
contexts for basic block.
The logic of the locking code doesn't change but the layout of the
original code is "frowned upon"
according to mails on sparse context checking.
Refactoring removes the warning and makes the code more readable.
Signed-off-by: Cathal Mullaney <chuckleberryfinn@gmail.com>
Tested-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sizeof(var) instead of sizeof(struct XXX) is preferred.
It also fix the following checkpatch.pl script warning:
WARNING: line over 80 characters
Fix this two in prism2mgmt.c file.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase fields of struct with underscores to comply
with the standard kernel coding style
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase struct name and fields with underscores to comply
with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace CamelCase define to comply with the standard kernel coding style.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
As per discusion with Lino Sanfilippo, memcpy is the proper way to copy
across dma memory, which also removes sparse warning that triggered
inquiry.
Signed-off-by: Ryan Swan <ryan@ryanswan.com>
Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>