summaryrefslogtreecommitdiff
path: root/drivers/staging/dgnc
AgeCommit message (Collapse)Author
2017-03-29staging: dgnc: remove error message taskTobin C. Harding
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. Harding
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. Harding
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. Harding
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. Harding
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. Harding
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 Bhardwaj
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. Harding
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 Youn
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 Youn
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. Harding
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. Harding
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. Harding
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. Harding
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. Harding
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. Harding
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. Harding
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 Pant
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 Sharma
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 Pant
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 ↵Ingo Molnar
<linux/sched.h> into <linux/sched/signal.h> 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 Howard
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 Apesteguia
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 Matheina
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 Apesteguia
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 Apesteguia
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 Apesteguia
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-Hartman
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 K
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
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 Feasel
Make modifications to comment style format Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-19staging: dgnc: dgnc_cls.h Spelling correctionWalt Feasel
Make spelling correction for 'control' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14staging: dgnc: re-arrange functions for removing forward declarationsDaeseok Youn
Re-arrange the functions for removing forward declarations in dgnc_driver.c Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>