aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/kpc2000/kpc_dma (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-03-25Staging: kpc2000: kpc_dma: Use kcalloc over kzalloc.Sam Muhammed1-1/+2
Replace kzalloc(sizeof(...) * n, ...) with kcalloc(n, sizeof(...), ...) since kcalloc is the preferred API in case of allocating with multiply. Checkpatch.pl: WARNING: Prefer kcalloc over kzalloc with multiply. Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com> Link: https://lore.kernel.org/r/4b8339d1e81e497c3c2f0dad57a9587338ec82b1.1585143581.git.jane.pnx9@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25Staging: kpc2000: kpc_dma: Use the SPDK comment style.Sam Muhammed3-3/+3
SPDK-License-Identifier comment should have this form // SPDX-License-Identifier: <GPL-...> Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com> Link: https://lore.kernel.org/r/7531e3e3fa7c046e93d2caaa6fa2e76c5c53f04d.1585143581.git.jane.pnx9@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25Staging: kpc2000: kpc_dma: Include the preferred header.Sam Muhammed1-1/+1
<linux/io.h> is the preferred header to include instead of <asm/io.h>. Checkpatch.pl WARNING: Use #include <linux/io.h> instead of <asm/io.h> Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com> Link: https://lore.kernel.org/r/c7a824c3a2ddc5f44bd89504b8c03a328d69f81d.1585143581.git.jane.pnx9@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25Staging: kpc2000: kpc_dma: Remove unnecessary braces.Sam Muhammed3-16/+12
Remove braces of single statement blocks, they are not really needed. Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com> Link: https://lore.kernel.org/r/0a3ec63321dce008fc8dd790f42ef8490135b307.1585143581.git.jane.pnx9@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25Staging: kpc2000: kpc_dma: Use sizeof(*var) in kzalloc().Sam Muhammed2-2/+2
kzalloc(sizeof(*var), ...) was the format been used across the driver, which is the preferred format, but missed two instances, correct them to match the coding standards. Checkpatch.pl CHECK: Prefer kzalloc(sizeof(*var)...) over kzalloc(sizeof(struct var)...) Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com> Link: https://lore.kernel.org/r/bbb3adbd20ae89db6a0d3360bc09d22eed778e86.1585143581.git.jane.pnx9@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25Staging: kpc2000: kpc_dma: Remove comparison to NULL.Sam Muhammed3-9/+9
Comparison to NULL been used across the driver, remove them and use (!var) instead. Checkpatch.pl: CHECK: Comparison to NULL could be written "!desc"... etc Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com> Link: https://lore.kernel.org/r/f344afba0a8bb0413941a63678688435f04a96b4.1585143581.git.jane.pnx9@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-29Merge tag 'staging-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-2/+0
Pull staging and IIO updates from Greg KH: "Here is the big staging/iio driver patches for 5.6-rc1 Included in here are: - lots of new IIO drivers and updates for that subsystem - the usual huge quantity of minor cleanups for staging drivers - removal of the following staging drivers: - isdn/avm - isdn/gigaset - isdn/hysdn - octeon-usb - octeon ethernet Overall we deleted far more lines than we added, removing over 40k of old and obsolete driver code. All of these changes have been in linux-next for a while with no reported issues" * tag 'staging-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (353 commits) staging: most: usb: check for NULL device staging: next: configfs: fix release link staging: most: core: fix logging messages staging: most: core: remove container struct staging: most: remove struct device core driver staging: most: core: drop device reference staging: most: remove device from interface structure staging: comedi: drivers: fix spelling mistake "to" -> "too" staging: exfat: remove fs_func struct. staging: wilc1000: avoid mutex unlock without lock in wilc_wlan_handle_txq() staging: wilc1000: return zero on success and non-zero on function failure staging: axis-fifo: replace spinlock with mutex staging: wilc1000: remove unused code prior to throughput enhancement in SPI staging: wilc1000: added 'wilc_' prefix for 'struct assoc_resp' name staging: wilc1000: move firmware API struct's to separate header file staging: wilc1000: remove use of infinite loop conditions staging: kpc2000: rename variables with kpc namespace staging: vt6656: Remove memory buffer from vnt_download_firmware. staging: vt6656: Just check NEWRSR_DECRYPTOK for RX_FLAG_DECRYPTED. staging: vt6656: Use vnt_rx_tail struct for tail variables. ...
2020-01-06remove ioremap_nocache and devm_ioremap_nocacheChristoph Hellwig1-1/+1
ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
2020-01-03staging: kpc2000: remove unnecessary assertions in kpc_dma_transferAditya Pakki1-2/+0
In kpc_dma_transfer(), the assertion that priv is NULL and priv->ldev is NULL, are never satisfied. The two callers of the function, dereference the fields before the function is called. This patch removes the two BUG_ON calls. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Link: https://lore.kernel.org/r/20191219172118.17456-1-pakki001@umn.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-03staging: kpc2000: Fix long constant sparse warningHarsh Jain1-4/+4
It fixed following warning in kpc2000 driver "constant XXXX is so big it is unsigned long" Signed-off-by: Harsh Jain <harshjain32@gmail.com> Link: https://lore.kernel.org/r/20190831115532.2398-1-harshjain32@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-31Revert "staging: kpc2000: Convert put_page() to put_user_page*()"Greg Kroah-Hartman1-6/+11
This reverts commit 8e7cb7352ec85e9e4fbbd7bfe6c5c5a6806f70e3. Bharath writes: Could you drop this patch from the staging-next tree? This is because John is making some changes to the put_user_page*() functions. He has submitted a patch recently removing put_user_page_dirty() function which is being used in this patch. This might break the kernel build if John's patch gets merged in. I ll submit a patch once the put_user_page*() apis are fixed. Reported-by: Bharath Vedartham <linux.bhar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30staging: kpc2000: Convert put_page() to put_user_page*()Bharath Vedartham1-11/+6
For pages that were retained via get_user_pages*(), release those pages via the new put_user_page*() routines, instead of via put_page(). This is part a tree-wide conversion, as described in commit fc1d8e7cca2d ("mm: introduce put_user_page*(), placeholder versions"). Cc: Ira Weiny <ira.weiny@intel.com> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Jérôme Glisse <jglisse@redhat.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Matt Sickler <Matt.Sickler@daktronics.com> Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Reviewed-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com> Link: https://lore.kernel.org/r/1564058658-3551-1-git-send-email-linux.bhar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-04staging: kpc2000: simplify comparison to NULL in fileops.cSimon Sandström1-1/+1
Fixes checkpatch warning "Comparison to NULL could be written [...]". Signed-off-by: Simon Sandström <simon@nikanor.nu> Link: https://lore.kernel.org/r/20190704060811.10330-4-simon@nikanor.nu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-04staging: kpc2000: simplify comparison to NULL in dma.cSimon Sandström1-2/+2
Fixes checkpatch warning "Comparison to NULL could be written [...]". Signed-off-by: Simon Sandström <simon@nikanor.nu> Link: https://lore.kernel.org/r/20190704060811.10330-3-simon@nikanor.nu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21Staging: kpc2000: kpc_dma: Fix platform_no_drv_owner.cocci warningsYueHaibing1-1/+0
Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-13staging: kpc2000: removed DMA AIO implementation.Jeremy Sowden2-83/+21
The existing implementation for doing DMA via asynchronous IO didn't work and there was no longer a use-case for it. Removed it. Fixed a few checkpatch warnings about too-long lines and extraneous braces in the process. Reported-by: Matt Sickler <matt.sickler@daktronics.com> Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-13Staging: kpc2000: kpc_dma: Make some symbols staticYueHaibing1-1/+1
Fix sparse warnings: drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:46:6: warning: symbol 'kpc_dma_del_device' was not declared. Should it be static? drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:84:1: warning: symbol 'dev_attr_engine_regs' was not declared. Should it be static? drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:91:14: warning: symbol 'kpc_dma_class' was not declared. Should it be static? drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:199:24: warning: symbol 'kpc_dma_plat_driver_i' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-13staging: kpc2000: Fix: 'kpc_dma_del_device' and other symbols were not declaredRishiraj Manwatkar1-3/+3
This patch removes the Sparse generated warnings. Following warnings are reported by Sparse: drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:46:6: warning: symbol 'kpc_dma_del_device' was not declared. Should it be static? drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:91:14: warning: symbol 'kpc_dma_class' was not declared. Should it be static? drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:199:24: warning: symbol 'kpc_dma_plat_driver_i' was not declared. Should it be static? Signed-off-by: Rishiraj Manwatkar <manwatkar@outlook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-10staging: kpc2000: remove unnecessary debug prints in kpc_dma_driver.cSimon Sandström1-4/+0
Debug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-10staging: kpc2000: remove unnecessary debug prints in fileops.cSimon Sandström1-17/+0
Debug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-10staging: kpc2000: remove unnecessary debug prints in dma.cSimon Sandström1-4/+0
Debug prints that are used only to inform about function entry or exit can be removed as ftrace can be used to get this information. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-06staging: kpc2000: Use '%zu' for printing 'size_t' typeFabio Estevam1-1/+1
In order to print a 'size_t' type the '%zu' specifier needs to be used. Change it accordingly in order to fix the following build warning: drivers/staging/kpc2000/kpc_dma/fileops.c:57:35: warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'size_t {aka unsigned int}' [-Wformat=] Reported-by: Build bot for Mark Brown <broonie@kernel.org> Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-06staging: staging: kpc2000: kpc_dma: fix symbol 'kpc_dma_add_device' was not declared.Valerio Genovese1-1/+1
This was reported by sparse: drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:39:7: warning: symbol 'kpc_dma_add_device ' was not declared. Should it be static? Signed-off-by: Valerio Genovese <valerio.click@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-03Merge 5.2-rc3 into staging-nextGreg Kroah-Hartman1-3/+1
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30staging: kpc2000: Change to use DIV_ROUND_UPNishka Dasgupta1-4/+1
Use macro DIV_ROUND_UP instead of an equivalent sequence of operations. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: kpc2000: double unlock in error handling in kpc_dma_transfer()Dan Carpenter1-2/+0
The goto err_descr_too_many; calls unlock_engine() so this unlocks twice. Fixes: 7df95299b94a ("staging: kpc2000: Add DMA driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: kpc2000: fix build error on xtensaMax Filippov1-1/+1
kpc2000/kpc_dma/fileops.c includes asm/uaccess.h instead of linux/uaccess.h, which results in the following build error on xtensa architecture: In file included from drivers/staging/kpc2000/kpc_dma/fileops.c:11: arch/xtensa/include/asm/uaccess.h: In function ‘clear_user’: arch/xtensa/include/asm/uaccess.h:40:22: error: implicit declaration of function ‘uaccess_kernel’; ... #define __kernel_ok (uaccess_kernel()) ^~~~~~~~~~~~~~ Include linux/uaccess.h to fix that. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: kpc_dma: include <linux/io.h> instead of <asm/io.h>Puranjay Mohan1-1/+1
Fix following checkpatch.pl warning by including <linux/io.h> instead of <asm/io.h>. WARNING: Use #include <linux/io.h> instead of <asm/io.h> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: kpc_dma: Resolve cast warning and use const for file_operationVandana BN2-2/+2
This Patch resolves unnecessary cast warning and const file_operations reported by checkpath.pl WARNING: unnecessary cast may hide bugs WARNING: struct file_operations should normally be const Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: kpc_dma: Resolve warning to use __func__ insted of funtion name reported by checkpatch.Vandana BN3-25/+25
This patch resolves warnings to use __func__ insted of funtion name. WARNING: Prefer using '"%s...", __func__' to using 'setup_dma_engine', this function's name, in a string Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: kpc_dma: Resolve warning Missing blank line after declarations & labels not to be indented.Vandana BN4-13/+29
This patch resloves below warnings reported by checkpath in kpc_dma WARNING: Missing a blank line after declarations WARNING: labels should not be indented CHECK: Please don't use multiple blank lines CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: kpc_dma: Resolve checkpath errors Macros in paranthesis & trailing statements on next line.Vandana BN1-3/+5
This patch fixes below errors reported by checkpath ERROR: Macros with complex values should be enclosed in parentheses CHECK: Prefer using the BIT macro ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: kpc_dma: Resolve code indent and trailing statements on next line errors reported by checkpatch.Vandana BN1-4/+8
This patch fixes code indentaion error reported by checkpath ERROR: switch and case should be at the same indent ERROR: trailing statements should be on next line Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: kpc_dma: Resolve checkpatch space errors around brace '{', '!' and open paranthesis '('.Vandana BN3-52/+52
This patch resolves below errors reported by checkpath ERROR: space required before the open brace '{' ERROR: space prohibited after that '!' (ctx:BxW) ERROR: space prohibited after that open parenthesis '(' Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: kpc_dma: Resolve space errors around pointers and function declarations reported by checkpatch.Vandana BN4-14/+14
This patch resolves below errors reported by checkpatch ERROR: "(foo*)" should be "(foo *)" ERROR: "foo * bar" should be "foo *bar" ERROR: "foo __init bar" should be "foo __init bar" ERROR: "foo __exit bar" should be "foo __exit bar" Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: kpc_dma: Resolve trailing whitespace error reported by checkpatchVandana BN4-131/+131
Resolve trailing whitespace error from checkpatch.pl ERROR: trailing whitespace Signed-off-by: Vandana BN <bnvandana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: kpc2000: Cleanup in kpc_dma_transfer()Madhumitha Prabakaran1-1/+1
Remove unnecessary typecast in kzalloc function. In addition to that replace kzalloc(sizeof(*acd)) over kzalloc(sizeof(struct aio_cb_data)) to maintain Linux kernel style. Issue suggested by Coccinelle. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25staging: kpc2000: Add DMA driverMatt Sickler6-0/+1169
Add Daktronics DMA driver. I've added the SPDX license identifiers, Kconfig entry, and cleaned up as many of the warnings as I could. The AIO support code will be removed in a future patch. Signed-off-by: Matt Sickler <matt.sickler@daktronics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>