aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-01-08Staging: vt6656: Fix unnecessary 'out of memory' messageSumit Pundir1-4/+1
This patch fixes one of the warnings as noted by checkpatch.pl related to unnecessary 'out of memory' message. This patch fixes the following checkpatch.pl error: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Sumit Pundir <[email protected]>
2018-01-08staging: rtl8192u: Replace mdelay with msleep in rtl8192_usb_probeJia-Ju Bai1-1/+1
rtl8192_usb_probe is not called in an interrupt handler nor holding a spinlock. The function mdelay in it can be replaced with msleep, to avoid busy wait. Signed-off-by: Jia-Ju Bai <[email protected]>
2018-01-08staging: comedi: adv_pci1760: fix typo in commentsRichard Sudaryono1-1/+1
Changed 'firware' to 'firmware' Signed-off-by: Richard Sudaryono <[email protected]>
2018-01-08Staging: rtlwifi: Remove unused variable and the codeShreeya Patel1-19/+1
Remove unused variable and also remove unused code associated with initializing the unused variable. Unused variable was detected using the following semantic patch by coccinelle. @@ type T; identifier i; constant C; @@ ( extern T i; | - T i; <+... when != i - i = C; ...+> ) Signed-off-by: Shreeya Patel <[email protected]>
2018-01-08staging: vc05_services: fix checkpatch.pl errorsSidong Yang2-10/+5
Fix some errors for wrong brace position reported by checkpatch. Signed-off-by: Sidong Yang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: vc04_services: Prefer WARN_ON_ONCE instead of if condition followed ↵Kishore KP1-2/+1
by BUG. Coccinelle suggested to use BUG_ON instead of if condition followed by BUG but BUG_ON should be used in situations where integrity of the system is no longer guaranteed. In this case, as suggested by Stefan Wahren, vchiq isn't critical. Since it is not critical, BUG_ON should be avoided. Replaced if condition followed by BUG with WARN_ON_ONCE. Signed-off-by: Kishore KP <[email protected]> Signed-off-by: Suniel Mahesh <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: vc04_services: Fix platform_no_drv_owner.cocci warnings.Kishore KP1-1/+0
Removed .owner field initialization, platform core does it automatically. Pointed out by Coccinelle. Signed-off-by: Kishore KP <[email protected]> Signed-off-by: Suniel Mahesh <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08Staging: wlan-ng: hfa384x_usb: fixed two line limit coding style issuesAndy Pusch1-2/+4
Fixed two coding style issues. Signed-off-by: Andy Pusch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08Staging: vme: vme_user: fixed an alignment coding style issuePhilippe Loctaux1-4/+7
Fixed a coding style issue. Signed-off-by: Philippe Loctaux <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: android: check the return value of register_shrinkerXiongwei Song1-1/+7
register_shrinker call is made in ashmem_init, it may return error code, so we need to check it. Signed-off-by: Xiongwei Song <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: android: check for error from register_shrinker in ↵Xiongwei Song3-5/+10
ion_heap_init_shrinker The function register_shrinker in ion_heap_init_shrinker may return an error, check it out. Meanwhile, ion_heap_init_shrinker has to a return value. Signed-off-by: Xiongwei Song <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: android: ashmem: add procfs fdinfo helperZhai Zhaoxuan1-0/+19
This print the inode number of backing file and the name in /proc/pid/fdinfo/fd. These information helps users to know which processes are sharing the same ashmem. Signed-off-by: Zhai Zhaoxuan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: most: convert macro to static functionGeorge Edward Bulmer1-5/+7
This fixes checkpatch warning: CHECK: Macro argument reuse 'buf' - possible side effects? Signed-off-by: George Edward Bulmer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: most: Fix identifiers to function parametersRavi Eluri2-4/+4
fixed "function definition argument should have an identifier name", with appropriate identifier names. Pointed out by checkpatch. Signed-off-by: Ravi Eluri <[email protected]> Signed-off-by: Suniel Mahesh <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: most: Avoid trailing semicolon for macrosRavi Eluri1-1/+1
Fixes checkpatch warning: macros should not use a trailing semicolon. Signed-off-by: Ravi Eluri <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08Staging: pi433 - fix ccheckpatch issue, updated include line.Derek Robson1-1/+1
Updated the include of compat.h to fix checkpatch error Signed-off-by: Derek Robson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: pi433: fix CamelCase for payload identifiersValentin Vidic4-6/+6
Fixes checkpatch warnings: CHECK: Avoid CamelCase: <payloadLength> CHECK: Avoid CamelCase: <payloadReady> Signed-off-by: Valentin Vidic <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: pi433: fix CamelCase for maxMinus variablesValentin Vidic3-17/+17
Fixes checkpatch warnings: CHECK: Avoid CamelCase: <maxMinus12> CHECK: Avoid CamelCase: <maxMinus24> CHECK: Avoid CamelCase: <maxMinus36> CHECK: Avoid CamelCase: <maxMinus48> CHECK: Avoid CamelCase: <maxMinus6> Signed-off-by: Valentin Vidic <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: pi433: remove unused rf69_reset_flag functionMarcin Ciupak2-13/+0
Function rf69_reset_flag is unused and should be removed. Signed-off-by: Marcin Ciupak <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: pi433: remove unused rf69_set_sync_tolerance functionMarcin Ciupak2-13/+0
Function rf69_set_sync_tolerance is unused and should be removed. Signed-off-by: Marcin Ciupak <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: update TODOGilad Ben-Yossef1-1/+1
Update TODO to reflect work done Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08stating: ccree: fix allocation of void sized bufGilad Ben-Yossef2-8/+10
We were allocating buffers using sizeof(*struct->field) where field was type void. Fix it by having a local variable with the real type. Cc: [email protected] Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: put pointer next to var nameGilad Ben-Yossef1-1/+1
Put pointer next to var name as per coding style. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: fold common code into service funcGilad Ben-Yossef1-223/+116
Fold common code in hash call into service functions. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: fix indentation of func paramsGilad Ben-Yossef1-26/+20
Fix indentation of some function params in hash code for better readability. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: do not map bufs in ahash_initGilad Ben-Yossef1-89/+103
hash_init was mapping DMA memory that were then being unmap in hash_digest/final/finup callbacks, which is against the Crypto API usage rules (see discussion at https://www.mail-archive.com/[email protected]/msg30077.html) Fix it by moving all buffer mapping/unmapping or each Crypto API op. This also properly deals with hash_import() not knowing if hash_init was called or not as it now no longer matters. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: allocate hash bufs inside req ctxGilad Ben-Yossef2-68/+12
Move to allocating the buffers needed for requests as part of the request structure instead of malloc'ing each one on it's own, making for simpler (and more efficient) code. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: use array for double bufferGilad Ben-Yossef3-37/+46
The ccree hash code is using a double buffer to hold data for processing but manages the buffers and their associated data count in two separate fields and uses a predicate to chose which to use. Move to using a proper 2 members array for a much cleaner code. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: remove unused fieldGilad Ben-Yossef1-1/+0
Remove unused struct field. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: use Makefile to include PM codeGilad Ben-Yossef4-32/+37
Replace ugly ifdefs with some inline macros and Makefile magic for optionally including power management related code for better readability. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: handle end of sg list gracefullyGilad Ben-Yossef1-1/+1
If we are asked for number of entries of an offset bigger than the sg list we should not crash. Cc: [email protected] Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: check DMA pool buf !NULL before freeGilad Ben-Yossef1-1/+2
If we ran out of DMA pool buffers, we get into the unmap code path with a NULL before. Deal with this by checking the virtual mapping is not NULL. Cc: [email protected] Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: failing the suspend is not an errorGilad Ben-Yossef1-7/+1
PM suspend returning a none zero value is not an error. It simply indicates a suspend is not advised right now so don't treat it as an error. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08stating: ccree: revert "staging: ccree: fix leak of import() after init()"Gilad Ben-Yossef1-7/+4
This reverts commit c5f39d07860c ("staging: ccree: fix leak of import() after init()") and commit aece09024414 ("staging: ccree: Uninitialized return in ssi_ahash_import()"). This is the wrong solution and ends up relying on uninitialized memory, although it was not obvious to me at the time. Cc: [email protected] Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: add backlog processingGilad Ben-Yossef5-42/+163
Crypto API tfm providers are required to provide a backlog service, if so indicated, that queues up requests in the case of the provider being busy and processing them later. The ccree driver did not provide this facility. Add it now. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: break send_request and fix ret valGilad Ben-Yossef5-94/+128
The send_request() function was handling both synchronous and asynchronous invocations, but were not handling the asynchronous case, which may be called in an atomic context, properly as it was sleeping. Start to fix the problem by breaking up the two use cases to separate functions calling a common internal service function and return error instead of sleeping for the asynchronous case. The next patch will complete the fix by implementing proper backlog handling. Fixes: abefd6741d ("staging: ccree: introduce CryptoCell HW driver"). Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: remove unused leftover fieldGilad Ben-Yossef1-1/+0
Remove the unused monitor_desc field. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: tag debugfs init/exit func properlyGilad Ben-Yossef1-2/+2
The debugfs global init and exit functions were missing __init and __exit tags, potentially wasting memory. Fix it by properly tagging them. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: copy larval digest from RAMGilad Ben-Yossef3-57/+68
The ccree driver was using a DMA operation to copy larval digest from the ccree SRAM to RAM. Replace it with a simple memcpy. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: pick alloc mem flags based on req flagsGilad Ben-Yossef5-35/+54
The ccree driver was allocating memory using GFP_KERNEL flag always, ignoring the flags set in the crypto request. Fix it by choosing gfp flags based on crypto request flags. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: remove GFP_DMA flag from mem allocsGilad Ben-Yossef2-10/+7
Remove bogus GFP_DMA flag from memory allocations. ccree driver does not operate over an ISA or similar limited bus. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: fold reg common defines into driverGilad Ben-Yossef3-17/+5
Fold the 2 macro defined in dx_reg_common.h into the file they are used in and delete the file. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: fold hash defs into queue defsGilad Ben-Yossef3-24/+13
Fold the two remaining enum in hash defs into the queue defs that are using them and delete the hash defs include file. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: SPDXify driverGilad Ben-Yossef31-435/+62
Replace verbatim GPL v2 copy with SPDX tag. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08staging: ccree: mark debug_regs[] as staticArnd Bergmann1-1/+1
The global array clashes with an existing symbol of the same name: drivers/staging/ccree/cc_debugfs.o:(.data+0x0): multiple definition of `debug_regs' drivers/mmc/host/s3cmci.o:(.data+0x70): first defined here We should fix both, this one addresses the ccree driver by removing the symbol from the global namespace. Fixes: 9bdd203b4dc8 ("s3cmci: add debugfs support for examining driver and hardware state") Fixes: b3ec9a6736f2 ("staging: ccree: staging: ccree: replace sysfs by debugfs interface") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08vboxvideo: Fix incorrect type in assignment sparse warningAlexander Kapshuk2-2/+2
Sparse emitted the following warning: ../drivers/staging/vboxvideo/vbox_fb.c:173:27: warning: incorrect type in assignment (different address spaces) ../drivers/staging/vboxvideo/vbox_fb.c:173:27: expected char [noderef] <asn:2>*screen_base ../drivers/staging/vboxvideo/vbox_fb.c:173:27: got void *virtual The vbox_bo buffer object kernel mapping is handled by a call to ttm_bo_kmap() prior to the assignment of bo->kmap.virtual to info->screen_base of type char __iomem*. Casting bo->kmap.virtual to char __iomem* in this assignment fixes the warning. vboxvideo: Fix address space of expression removal sparse warning Sparse emitted the following warning: ../drivers/staging/vboxvideo/vbox_main.c:64:25: warning: cast removes address space of expression vbox->vbva_buffers iomapping is handled by calling vbox_accel_init() from vbox_hw_init(). __force attribute is used in assignment to vbva to fix the warning. Signed-off-by: Alexander Kapshuk <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08drivers/fbtft: Remove unnecessary braces from if/elseLuis Gerhorst1-6/+5
The Linux kernel coding style states that braces should only be used when necessary. This fixes the checkpatch warning WARNING: line over 80 characters + } else if (display->regwidth == 8 && display->buswidth == 9 && par->spi) { introduced by patch #1. Signed-off-by: Luis Gerhorst <[email protected]> Acked-by: Jonny Schaefer <[email protected]> Acked-by: Alexander Wuerstlein <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08drivers/fbtft: Remove newline after else in else-ifLuis Gerhorst1-2/+1
This removes the following warning issued by checkpatch WARNING: suspect code indent for conditional statements (8, 8) + } else + if (display->regwidth == 8 && display->buswidth == 9 && par->spi) { Signed-off-by: Luis Gerhorst <[email protected]> Acked-by: Jonny Schaefer <[email protected]> Acked-by: Alexander Wuerstlein <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08Staging: lustre: Fix prefer kcalloc over kzalloc with multiplySumit Pundir1-1/+1
Use kcalloc for allocating an array instead of kzalloc with multiply. kcalloc is the preferred API. Issue reported by checkpatch.pl Signed-off-by: Sumit Pundir <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-01-08Staging: lustre: Fix prefer seq_puts to seq_printfSumit Pundir1-3/+3
Use seq_puts() for strings without format specifiers instead of seq_printf(). Issue reported by checkpatch.pl Signed-off-by: Sumit Pundir <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>