aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgnc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-05-25dgnc: fix multiple blank lines coding style problemAliza Minkov1-2/+0
According to the coding-style documentation, functions in source files should be separated with one blank line. Redundant blank lines were removed from this source file, in accordance with coding-style documentation. Signed-off-by: Aliza Minkov <minkov.al@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-16drivers/staging: refactor dgnc tty registration.Haim Daniel2-104/+59
-remove duplicate tty allocation code for serial and printer drivers. -add missing tty c_ispeed and c_ospeed initialization to 9600. -fix sparse warning: too long initializer-string for array of char. This patch was only unit tested due to lack of the actual hardware. Signed-off-by: Haim Daniel <haimdaniel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29staging: dgnc: remove error message taskTobin C. Harding1-2/+0
TODO file lists task to remove unnecessary error messages. There are no unnecessary error messages in the driver, this must have been done already. Remove task from TODO file. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29staging: dgnc: remove dead codeTobin C. Harding1-9/+0
Driver contains dead code, guarded with #ifdef's. We can safely remove this, it will be in the git history if it is later needed. Remove dead code. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29staging: dgnc: remove struct member magic numbersTobin C. Harding6-139/+119
Driver uses magic number members within structs, this is an antiquated method of catching data errors. We don't do things that way any more. Remove magic number struct members. Remove all checks to magic numbers. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29staging: dgnc: remove unnecessary commentsTobin C. Harding6-522/+97
TODO file lists task to remove unnecessary comments. Make initial attempt at removing unnecessary comments. Choose not to be to vicious in removal. We can remove more once the driver is cleaned up/tested some more. For functions with internal linkage, reduce the function comment where possible. For functions with external linkage, migrate the function comment to kernel doc format. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29staging: dgnc: remove double underscoreTobin C. Harding8-24/+26
Pre-processor header guards use double underscore, typically kernel code uses single underscore when defining header guards. 'endif' statement should include what is ending as a comment string. Remove double underscore, add comment string to 'endif' Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-29staging: dgnc: clean up header commentsTobin C. Harding5-235/+349
TODO file has task: remove unnecessary comments. Driver uses some custom comment format. Driver would be better if it used kernel doc format. Audit header file comments. Replace struct comments with kernel doc format comments. Remove unnecessary comments. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: dgnc: remove tracing prints in dgnc_tty.cAbhishek Bhardwaj1-4/+0
Remove tracing prints in dgnc_tty_send_xchar. The same functionality could be achieved by using ftrace. Signed-off-by: Abhishek Bhardwaj <abshkbh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: dgnc: preserve return codeTobin C. Harding1-3/+3
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>
2017-03-14staging: dgnc: remove useless switch-case statementsDaeseok Youn1-9/+1
The dgnc_tty_send_break() has a switch-case condition for msec. It is no use except case -1. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: dgnc: ch->ch_bd is already assigned to bd variableDaeseok Youn1-4/+4
The bd variables in functions are already assigned from ch->ch_bd but it is not used in those functions except checking NULL. The ch->ch_bd could be replaced with bd variable. Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: dgnc: remove explicit castTobin C. Harding1-1/+1
Function return type is 'int'. Returned variable is of type 'uint'. uint can be implicitly converted to int. Most significant bit is not set so there is no risk in implicit conversion. Remove unnecessary type cast. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: dgnc: fix whitespace before returnTobin C. Harding3-4/+14
Checkpatch emits CHECK: Blank lines aren't necessary before a close brace '}'. Previous attempts were made to make uniform the error handling in dgnc but improvements are still possible. Undo whitespace changes that should not have been made :(. Make return statement placement uniform throughout dgnc. Fix checkpatch CHECK. Make whitespace changes only. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: dgnc: return error code directlyTobin C. Harding1-36/+32
In various functions a return code variable is defined at the top of function, for example; rc = -ENODEV; and then the variable is returned. This makes it harder to read since it separates the error code from the return site. Return the error code directly instead of using a variable. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12staging: dgnc: remove item from TODO listTobin C. Harding1-1/+0
TODO file contains task to verify and correct function return sites. Need to check for and implement correct usage of goto's when there is work to be done before returning. Remove task from TODO list after already having completed audit of directory drivers/staging/dgnc. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12staging: dgnc: audit goto's in dgnc_ttyTobin C. Harding1-107/+112
TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12staging: dgnc: audit goto's in dgnc_mgmtTobin C. Harding1-17/+20
TODO file requests fix up of error handling. Audit dgnc_mgmt.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12staging: dgnc: audit goto's in dgnc_driverTobin C. Harding1-18/+5
TODO file requests fix up of error handling. Audit dgnc_driver.c and fix all return paths to be uniform and inline with kernel coding style. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07staging: dgnc: replace usleep_range with udelayAishwarya Pant1-1/+3
udelay is impelmented using a busy-wait loop and consumes CPU cycles while usleep_range is implemented using interrupts.cls_flush_uart_write() is called after a channel lock is acquired i.e. an atomic context. Hence delay in this method should use udelay instead of usleep_range. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07staging: dgnc: Constify ktermios structureGargi Sharma1-1/+1
The ktermios structure is a local default termios struct. All ports are initially created with this termios. Since, the structure is never modified, it can be declared as const. Coccinelle Script: @r disable optional_qualifier@ identifier s,i; position p; @@ static struct ktermios i@p = { ... }; @ok1@ identifier r.i; expression e; position p; @@ e = i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ktermios i = { ... }; File Size before: text data bss dec hex filename 25469 2048 256 27773 6c7d drivers/staging/dgnc/dgnc_tty.o File Size after: text data bss dec hex filename 25636 2016 256 27908 6d04 drivers/staging/dgnc/dgnc_tty.o Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: dgnc: replace udelay with usleep_rangeAishwarya Pant1-1/+1
Fix checkpatch warning on dgnc_cls.c: CHECK usleep_range is preferred over udelay. udelay(t) in function cls_uart_init is within non-atomic context and can be safely replaced by usleep_range(t, t + delta) where delta is t (as t is between 10 and 20 microseconds). Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-02sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>Ingo Molnar2-2/+2
Fix up affected files that include this signal functionality via sched.h. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-02-12staging: dgnc: dgnc_tty.c: fix argument list alignment issue.Nathan Howard1-4/+6
Fix checkpatch.pl issue of the form: "CHECK: Alignment should match open parenthesis". Signed-off-by: Nathan Howard <adanhawthorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: dgnc: update TODO fileFernando Apesteguia1-1/+0
Remove reference to checkpatch warnings since its output is now clean. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: fixed spelling error in TODO file for dgnc driverScott Matheina1-1/+1
fixed a missing letter in the TODO file 'unneeded' Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-07staging: dgnc: Fix lines longer than 80 charactersFernando Apesteguia1-25/+39
For two cases (beginning and end of the patch) I opted to create small functions instead of breaking the the lines in a weird way. The other changes are simple ones: either by breaking the line when appropriate or by turning a comment into a multi-line one. Signed-off-by: Fernando Apesteguia <fernando.apesteguia@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-07staging: dgnc: fix blank line after '{' warnings.Fernando Apesteguia1-6/+0
Remove blank lines between open brace and comment. Remove blank lines after comment in line with the rest of the comments of the file. Signed-off-by: Fernando Apesteguia <fernando.apesteguia@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-06staging: dgnc: fix unnamed parameterFernando Apesteguia1-2/+2
This patch fixes a checkpatch warning. Signed-off-by: Fernando Apesteguia <fernando.apesteguia@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-01staging: dgnc: remove sysfs filesGreg Kroah-Hartman6-770/+8
The dgnc driver has no business creating "custom" sysfs files just for a single tty driver. Combined with the odd way they are created, it's just a mess, so remove them entirely as I am tired of tripping over them when doing driver core changes. Cc: Lidza Louina <lidza.louina@gmail.com> Cc: Mark Hounschell <markh@compro.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21staging: dgnc: dgnc_tty: Remove blank linesVijai Kumar K1-2/+0
Fixes checkpatch warning: waitqueue_active without comment Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21staging: dgnc: digi.h Spelling correctionWalt Feasel1-1/+1
Make spelling correction for 'regular' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21staging: dgnc: digi.h Comment style modificationsWalt Feasel1-48/+47
Make modifications to comment style Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21staging: dgnc: dgnc_tty.c Spelling correctionsWalt Feasel1-5/+5
Make spelling corrections for 'transitions' and 'satisfy' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21staging: dgnc: dgnc_tty.c comment style modificationsWalt Feasel1-143/+86
Make modifications to comment style Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21staging: dgnc: dgnc_tty.c Align on parenthesisWalt Feasel1-7/+6
Make suggested checkpatch modification for CHECK: Alignment should match open parenthesis Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-21staging: dgnc: dgnc_tty.c Space preferred aroundWalt Feasel1-1/+1
Make suggested checkpatch modification for CHECK: spaces preferred around that '|' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_sysfs.c Delete blank lineWalt Feasel1-1/+0
Make modification to remove extra blank line Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_sysfs.c Comment style modificationsWalt Feasel1-1/+2
Make modifications to comment style Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_neo.h Spelling correctionWalt Feasel1-1/+1
Make spelling correction for 'control' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_neo.h Comment style modificationsWalt Feasel1-13/+11
Make modifications for comment style Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_neo.c Comment style modificationsWalt Feasel1-57/+54
Make modifications for comment style Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_mgmt.c Comment style modificationsWalt Feasel1-4/+2
Make modifications for comment style Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_driver.h Spelling correctionWalt Feasel1-1/+1
Make spelling correction for 'statements' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_driver.h Align columnsWalt Feasel1-10/+10
Make modifications to align columns Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_driver.h Comment style modificationsWalt Feasel1-97/+73
Make modifications to comment style Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_driver.c Blank line before }Walt Feasel1-1/+0
Make suggested checkpatch modification for CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_driver.c Remove blank linesWalt Feasel1-4/+0
Make suggested checkpatch modification for CHECK: Please don't use multiple blank lines Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_driver.c Comment style modificationsWalt Feasel1-37/+20
Make modifications to comment styles Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_cls.c Comment style modificationsWalt Feasel1-27/+17
Make modifications to comment style format Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>