aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/kpc2000/kpc2000 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-20staging: kpc2000: added missing clean-up to probe_core_uio.Jeremy Sowden1-0/+3
On error, probe_core_uio just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: kpc2000: added designated initializers to two structs.Jeremy Sowden1-5/+2
Fixed the following two sparse warnings by using designated initializers: drivers/staging/kpc2000/kpc2000/cell_probe.c:101:34: warning: Using plain integer as NULL pointer drivers/staging/kpc2000/kpc2000/cell_probe.c:364:34: warning: Using plain integer as NULL pointer Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: kpc2000: declare two functions as static.Jeremy Sowden1-2/+4
Two functions were not used outside the translation-unit in which they were defined. Declared them static. Fixes two sparse warnings: drivers/staging/kpc2000/kpc2000/cell_probe.c:98:5: warning: symbol 'probe_core_basic' was not declared. Should it be static? drivers/staging/kpc2000/kpc2000/cell_probe.c:288:5: warning: symbol 'probe_core_uio' was not declared. Should it be static? Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: kpc2000: inverted conditional in order to reduce indentation.Jeremy Sowden1-19/+24
Changed: for (...) { ... if (expr) { ... } } into: for (...) { ... if (!expr) continue; ... } in order to reduce indentation of conditional block. Fixed indentation of cases blocks at the same time. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: kpc2000: remove unused function kp2000_cdev_writeYueHaibing1-8/+0
There is no callers in tree, so can be removed. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-01staging: kpc2000: fix up build problems with readq()Greg Kroah-Hartman3-0/+3
The 0-day system found a bunch of warnings for when readq() is not defined on the platform, so fix this by including the linux/io-64-nonatomic-lo-hi.h file which will fix up these issues. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-30staging: kpc2000: Fix a stack information leak in kp2000_cdev_ioctl()Dan Carpenter1-0/+2
The kp2000_regs struct has a 4 byte hole between ->hw_rev and ->ssid so this could leak stack information to the user. This patch just memsets the whole struct to zero. Fixes: 7dc7967fc39a ("staging: kpc2000: add initial set of Daktronics drivers") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25staging: kpc2000: remove duplicated include from kp2000_module.cYueHaibing1-1/+0
Remove duplicated include. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25staging: kpc2000: Use memset to initialize resourcesNathan Chancellor1-4/+8
Clang warns: drivers/staging/kpc2000/kpc2000/cell_probe.c:96:38: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct resource resources[2] = {0}; ^ {} drivers/staging/kpc2000/kpc2000/cell_probe.c:314:38: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct resource resources[2] = {0}; ^ {} 2 warnings generated. One way to fix these warnings is to add additional braces like Clang suggests; however, there has been a bit of push back from some maintainers, who just prefer memset as it is unambiguous, doesn't depend on a particular compiler version, and properly initializes all subobjects [1][2]. Do that here so there are no more warnings. [1]: https://lore.kernel.org/lkml/022e41c0-8465-dc7a-a45c-64187ecd9684@amd.com/ [2]: https://lore.kernel.org/lkml/20181128.215241.702406654469517539.davem@davemloft.net/ Link: https://github.com/ClangBuiltLinux/linux/issues/455 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-20staging: kpc2000: add initial set of Daktronics driversGreg Kroah-Hartman8-0/+1266
These drivers have been outside of the kernel tree since the 2.x days, and it's time to bring them into the tree so they can get properly cleaned up. This first dump of drivers is based on a tarball Matt gave to me, minus an odd "dma" driver that I could not get to build at all. I renamed a few files, added the proper SPDX lines to it, added Kconfig entries and tied it into the kernel build. I also fixed up a number of initial obvious kernel build warnings, but left the odd bitfield warning that gcc is spitting out, as I'm not quite sure what to do about that. There's loads of low-hanging coding style cleanups in here for people to start attacking, as well as the more obvious logic and api cleanups as well. Cc: Matt Sickler <Matt.Sickler@daktronics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>